Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: mt6358-irq: Add MT6357 PMIC support

Add MT6357 PMIC IRQ support.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220531124959.202787-6-fparent@baylibre.com

authored by

Fabien Parent and committed by
Lee Jones
738654be de58cee8

+25
+24
drivers/mfd/mt6358-irq.c
··· 3 3 // Copyright (c) 2020 MediaTek Inc. 4 4 5 5 #include <linux/interrupt.h> 6 + #include <linux/mfd/mt6357/core.h> 7 + #include <linux/mfd/mt6357/registers.h> 6 8 #include <linux/mfd/mt6358/core.h> 7 9 #include <linux/mfd/mt6358/registers.h> 8 10 #include <linux/mfd/mt6359/core.h> ··· 18 16 #include <linux/regmap.h> 19 17 20 18 #define MTK_PMIC_REG_WIDTH 16 19 + 20 + static const struct irq_top_t mt6357_ints[] = { 21 + MT6357_TOP_GEN(BUCK), 22 + MT6357_TOP_GEN(LDO), 23 + MT6357_TOP_GEN(PSC), 24 + MT6357_TOP_GEN(SCK), 25 + MT6357_TOP_GEN(BM), 26 + MT6357_TOP_GEN(HK), 27 + MT6357_TOP_GEN(AUD), 28 + MT6357_TOP_GEN(MISC), 29 + }; 21 30 22 31 static const struct irq_top_t mt6358_ints[] = { 23 32 MT6358_TOP_GEN(BUCK), ··· 50 37 MT6359_TOP_GEN(HK), 51 38 MT6359_TOP_GEN(AUD), 52 39 MT6359_TOP_GEN(MISC), 40 + }; 41 + 42 + static struct pmic_irq_data mt6357_irqd = { 43 + .num_top = ARRAY_SIZE(mt6357_ints), 44 + .num_pmic_irqs = MT6357_IRQ_NR, 45 + .top_int_status_reg = MT6357_TOP_INT_STATUS0, 46 + .pmic_ints = mt6357_ints, 53 47 }; 54 48 55 49 static struct pmic_irq_data mt6358_irqd = { ··· 231 211 struct pmic_irq_data *irqd; 232 212 233 213 switch (chip->chip_id) { 214 + case MT6357_CHIP_ID: 215 + chip->irq_data = &mt6357_irqd; 216 + break; 217 + 234 218 case MT6358_CHIP_ID: 235 219 case MT6366_CHIP_ID: 236 220 chip->irq_data = &mt6358_irqd;
+1
include/linux/mfd/mt6397/core.h
··· 12 12 13 13 enum chip_id { 14 14 MT6323_CHIP_ID = 0x23, 15 + MT6357_CHIP_ID = 0x57, 15 16 MT6358_CHIP_ID = 0x58, 16 17 MT6359_CHIP_ID = 0x59, 17 18 MT6366_CHIP_ID = 0x66,