mfd: mt6397: Modify suspend/resume behavior

Some pmics don't need backup interrupt settings, so we change to use
pm notifier for the pmics which are necessary to store settings.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Hsin-Hsiung Wang 2020-04-21 11:00:07 +08:00 committed by Lee Jones
parent 8f3d9f3542
commit 4e2e7cfec1
3 changed files with 36 additions and 31 deletions

View file

@ -8,6 +8,7 @@
#define __MFD_MT6397_CORE_H__
#include <linux/mutex.h>
#include <linux/notifier.h>
enum chip_id {
MT6323_CHIP_ID = 0x23,
@ -54,6 +55,7 @@ enum mt6397_irq_numbers {
struct mt6397_chip {
struct device *dev;
struct regmap *regmap;
struct notifier_block pm_nb;
int irq;
struct irq_domain *irq_domain;
struct mutex irqlock;