hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/include/linux/mfd/mt6397/core.h
....@@ -1,19 +1,21 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (c) 2014 MediaTek Inc.
34 * Author: Flora Fu, MediaTek
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 as
7
- * published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
135 */
146
157 #ifndef __MFD_MT6397_CORE_H__
168 #define __MFD_MT6397_CORE_H__
9
+
10
+#include <linux/mutex.h>
11
+#include <linux/notifier.h>
12
+
13
+enum chip_id {
14
+ MT6323_CHIP_ID = 0x23,
15
+ MT6358_CHIP_ID = 0x58,
16
+ MT6391_CHIP_ID = 0x91,
17
+ MT6397_CHIP_ID = 0x97,
18
+};
1719
1820 enum mt6397_irq_numbers {
1921 MT6397_IRQ_SPKL_AB = 0,
....@@ -54,6 +56,7 @@
5456 struct mt6397_chip {
5557 struct device *dev;
5658 struct regmap *regmap;
59
+ struct notifier_block pm_nb;
5760 int irq;
5861 struct irq_domain *irq_domain;
5962 struct mutex irqlock;
....@@ -62,6 +65,11 @@
6265 u16 irq_masks_cache[2];
6366 u16 int_con[2];
6467 u16 int_status[2];
68
+ u16 chip_id;
69
+ void *irq_data;
6570 };
6671
72
+int mt6358_irq_init(struct mt6397_chip *chip);
73
+int mt6397_irq_init(struct mt6397_chip *chip);
74
+
6775 #endif /* __MFD_MT6397_CORE_H__ */