xref: /linux/drivers/mfd/da9052-core.c (revision d9cba48358d858a1edea877d7b7b0bce58cee850)
184c99db8SAshish Jangam /*
284c99db8SAshish Jangam  * Device access for Dialog DA9052 PMICs.
384c99db8SAshish Jangam  *
484c99db8SAshish Jangam  * Copyright(c) 2011 Dialog Semiconductor Ltd.
584c99db8SAshish Jangam  *
684c99db8SAshish Jangam  * Author: David Dajun Chen <dchen@diasemi.com>
784c99db8SAshish Jangam  *
884c99db8SAshish Jangam  *  This program is free software; you can redistribute  it and/or modify it
984c99db8SAshish Jangam  *  under  the terms of  the GNU General  Public License as published by the
1084c99db8SAshish Jangam  *  Free Software Foundation;  either version 2 of the  License, or (at your
1184c99db8SAshish Jangam  *  option) any later version.
1284c99db8SAshish Jangam  */
1384c99db8SAshish Jangam 
1484c99db8SAshish Jangam #include <linux/device.h>
1584c99db8SAshish Jangam #include <linux/delay.h>
1684c99db8SAshish Jangam #include <linux/input.h>
1784c99db8SAshish Jangam #include <linux/interrupt.h>
1884c99db8SAshish Jangam #include <linux/irq.h>
1984c99db8SAshish Jangam #include <linux/mutex.h>
2084c99db8SAshish Jangam #include <linux/mfd/core.h>
2184c99db8SAshish Jangam #include <linux/slab.h>
2284c99db8SAshish Jangam #include <linux/module.h>
2384c99db8SAshish Jangam 
2484c99db8SAshish Jangam #include <linux/mfd/da9052/da9052.h>
2584c99db8SAshish Jangam #include <linux/mfd/da9052/pdata.h>
2684c99db8SAshish Jangam #include <linux/mfd/da9052/reg.h>
2784c99db8SAshish Jangam 
2884c99db8SAshish Jangam #define DA9052_NUM_IRQ_REGS		4
2984c99db8SAshish Jangam #define DA9052_IRQ_MASK_POS_1		0x01
3084c99db8SAshish Jangam #define DA9052_IRQ_MASK_POS_2		0x02
3184c99db8SAshish Jangam #define DA9052_IRQ_MASK_POS_3		0x04
3284c99db8SAshish Jangam #define DA9052_IRQ_MASK_POS_4		0x08
3384c99db8SAshish Jangam #define DA9052_IRQ_MASK_POS_5		0x10
3484c99db8SAshish Jangam #define DA9052_IRQ_MASK_POS_6		0x20
3584c99db8SAshish Jangam #define DA9052_IRQ_MASK_POS_7		0x40
3684c99db8SAshish Jangam #define DA9052_IRQ_MASK_POS_8		0x80
3784c99db8SAshish Jangam 
3884c99db8SAshish Jangam static bool da9052_reg_readable(struct device *dev, unsigned int reg)
3984c99db8SAshish Jangam {
4084c99db8SAshish Jangam 	switch (reg) {
4184c99db8SAshish Jangam 	case DA9052_PAGE0_CON_REG:
4284c99db8SAshish Jangam 	case DA9052_STATUS_A_REG:
4384c99db8SAshish Jangam 	case DA9052_STATUS_B_REG:
4484c99db8SAshish Jangam 	case DA9052_STATUS_C_REG:
4584c99db8SAshish Jangam 	case DA9052_STATUS_D_REG:
4684c99db8SAshish Jangam 	case DA9052_EVENT_A_REG:
4784c99db8SAshish Jangam 	case DA9052_EVENT_B_REG:
4884c99db8SAshish Jangam 	case DA9052_EVENT_C_REG:
4984c99db8SAshish Jangam 	case DA9052_EVENT_D_REG:
5084c99db8SAshish Jangam 	case DA9052_FAULTLOG_REG:
5184c99db8SAshish Jangam 	case DA9052_IRQ_MASK_A_REG:
5284c99db8SAshish Jangam 	case DA9052_IRQ_MASK_B_REG:
5384c99db8SAshish Jangam 	case DA9052_IRQ_MASK_C_REG:
5484c99db8SAshish Jangam 	case DA9052_IRQ_MASK_D_REG:
5584c99db8SAshish Jangam 	case DA9052_CONTROL_A_REG:
5684c99db8SAshish Jangam 	case DA9052_CONTROL_B_REG:
5784c99db8SAshish Jangam 	case DA9052_CONTROL_C_REG:
5884c99db8SAshish Jangam 	case DA9052_CONTROL_D_REG:
5984c99db8SAshish Jangam 	case DA9052_PDDIS_REG:
6084c99db8SAshish Jangam 	case DA9052_INTERFACE_REG:
6184c99db8SAshish Jangam 	case DA9052_RESET_REG:
6284c99db8SAshish Jangam 	case DA9052_GPIO_0_1_REG:
6384c99db8SAshish Jangam 	case DA9052_GPIO_2_3_REG:
6484c99db8SAshish Jangam 	case DA9052_GPIO_4_5_REG:
6584c99db8SAshish Jangam 	case DA9052_GPIO_6_7_REG:
6684c99db8SAshish Jangam 	case DA9052_GPIO_14_15_REG:
6784c99db8SAshish Jangam 	case DA9052_ID_0_1_REG:
6884c99db8SAshish Jangam 	case DA9052_ID_2_3_REG:
6984c99db8SAshish Jangam 	case DA9052_ID_4_5_REG:
7084c99db8SAshish Jangam 	case DA9052_ID_6_7_REG:
7184c99db8SAshish Jangam 	case DA9052_ID_8_9_REG:
7284c99db8SAshish Jangam 	case DA9052_ID_10_11_REG:
7384c99db8SAshish Jangam 	case DA9052_ID_12_13_REG:
7484c99db8SAshish Jangam 	case DA9052_ID_14_15_REG:
7584c99db8SAshish Jangam 	case DA9052_ID_16_17_REG:
7684c99db8SAshish Jangam 	case DA9052_ID_18_19_REG:
7784c99db8SAshish Jangam 	case DA9052_ID_20_21_REG:
7884c99db8SAshish Jangam 	case DA9052_SEQ_STATUS_REG:
7984c99db8SAshish Jangam 	case DA9052_SEQ_A_REG:
8084c99db8SAshish Jangam 	case DA9052_SEQ_B_REG:
8184c99db8SAshish Jangam 	case DA9052_SEQ_TIMER_REG:
8284c99db8SAshish Jangam 	case DA9052_BUCKA_REG:
8384c99db8SAshish Jangam 	case DA9052_BUCKB_REG:
8484c99db8SAshish Jangam 	case DA9052_BUCKCORE_REG:
8584c99db8SAshish Jangam 	case DA9052_BUCKPRO_REG:
8684c99db8SAshish Jangam 	case DA9052_BUCKMEM_REG:
8784c99db8SAshish Jangam 	case DA9052_BUCKPERI_REG:
8884c99db8SAshish Jangam 	case DA9052_LDO1_REG:
8984c99db8SAshish Jangam 	case DA9052_LDO2_REG:
9084c99db8SAshish Jangam 	case DA9052_LDO3_REG:
9184c99db8SAshish Jangam 	case DA9052_LDO4_REG:
9284c99db8SAshish Jangam 	case DA9052_LDO5_REG:
9384c99db8SAshish Jangam 	case DA9052_LDO6_REG:
9484c99db8SAshish Jangam 	case DA9052_LDO7_REG:
9584c99db8SAshish Jangam 	case DA9052_LDO8_REG:
9684c99db8SAshish Jangam 	case DA9052_LDO9_REG:
9784c99db8SAshish Jangam 	case DA9052_LDO10_REG:
9884c99db8SAshish Jangam 	case DA9052_SUPPLY_REG:
9984c99db8SAshish Jangam 	case DA9052_PULLDOWN_REG:
10084c99db8SAshish Jangam 	case DA9052_CHGBUCK_REG:
10184c99db8SAshish Jangam 	case DA9052_WAITCONT_REG:
10284c99db8SAshish Jangam 	case DA9052_ISET_REG:
10384c99db8SAshish Jangam 	case DA9052_BATCHG_REG:
10484c99db8SAshish Jangam 	case DA9052_CHG_CONT_REG:
10584c99db8SAshish Jangam 	case DA9052_INPUT_CONT_REG:
10684c99db8SAshish Jangam 	case DA9052_CHG_TIME_REG:
10784c99db8SAshish Jangam 	case DA9052_BBAT_CONT_REG:
10884c99db8SAshish Jangam 	case DA9052_BOOST_REG:
10984c99db8SAshish Jangam 	case DA9052_LED_CONT_REG:
11084c99db8SAshish Jangam 	case DA9052_LEDMIN123_REG:
11184c99db8SAshish Jangam 	case DA9052_LED1_CONF_REG:
11284c99db8SAshish Jangam 	case DA9052_LED2_CONF_REG:
11384c99db8SAshish Jangam 	case DA9052_LED3_CONF_REG:
11484c99db8SAshish Jangam 	case DA9052_LED1CONT_REG:
11584c99db8SAshish Jangam 	case DA9052_LED2CONT_REG:
11684c99db8SAshish Jangam 	case DA9052_LED3CONT_REG:
11784c99db8SAshish Jangam 	case DA9052_LED_CONT_4_REG:
11884c99db8SAshish Jangam 	case DA9052_LED_CONT_5_REG:
11984c99db8SAshish Jangam 	case DA9052_ADC_MAN_REG:
12084c99db8SAshish Jangam 	case DA9052_ADC_CONT_REG:
12184c99db8SAshish Jangam 	case DA9052_ADC_RES_L_REG:
12284c99db8SAshish Jangam 	case DA9052_ADC_RES_H_REG:
12384c99db8SAshish Jangam 	case DA9052_VDD_RES_REG:
12484c99db8SAshish Jangam 	case DA9052_VDD_MON_REG:
12584c99db8SAshish Jangam 	case DA9052_ICHG_AV_REG:
12684c99db8SAshish Jangam 	case DA9052_ICHG_THD_REG:
12784c99db8SAshish Jangam 	case DA9052_ICHG_END_REG:
12884c99db8SAshish Jangam 	case DA9052_TBAT_RES_REG:
12984c99db8SAshish Jangam 	case DA9052_TBAT_HIGHP_REG:
13084c99db8SAshish Jangam 	case DA9052_TBAT_HIGHN_REG:
13184c99db8SAshish Jangam 	case DA9052_TBAT_LOW_REG:
13284c99db8SAshish Jangam 	case DA9052_T_OFFSET_REG:
13384c99db8SAshish Jangam 	case DA9052_ADCIN4_RES_REG:
13484c99db8SAshish Jangam 	case DA9052_AUTO4_HIGH_REG:
13584c99db8SAshish Jangam 	case DA9052_AUTO4_LOW_REG:
13684c99db8SAshish Jangam 	case DA9052_ADCIN5_RES_REG:
13784c99db8SAshish Jangam 	case DA9052_AUTO5_HIGH_REG:
13884c99db8SAshish Jangam 	case DA9052_AUTO5_LOW_REG:
13984c99db8SAshish Jangam 	case DA9052_ADCIN6_RES_REG:
14084c99db8SAshish Jangam 	case DA9052_AUTO6_HIGH_REG:
14184c99db8SAshish Jangam 	case DA9052_AUTO6_LOW_REG:
14284c99db8SAshish Jangam 	case DA9052_TJUNC_RES_REG:
14384c99db8SAshish Jangam 	case DA9052_TSI_CONT_A_REG:
14484c99db8SAshish Jangam 	case DA9052_TSI_CONT_B_REG:
14584c99db8SAshish Jangam 	case DA9052_TSI_X_MSB_REG:
14684c99db8SAshish Jangam 	case DA9052_TSI_Y_MSB_REG:
14784c99db8SAshish Jangam 	case DA9052_TSI_LSB_REG:
14884c99db8SAshish Jangam 	case DA9052_TSI_Z_MSB_REG:
14984c99db8SAshish Jangam 	case DA9052_COUNT_S_REG:
15084c99db8SAshish Jangam 	case DA9052_COUNT_MI_REG:
15184c99db8SAshish Jangam 	case DA9052_COUNT_H_REG:
15284c99db8SAshish Jangam 	case DA9052_COUNT_D_REG:
15384c99db8SAshish Jangam 	case DA9052_COUNT_MO_REG:
15484c99db8SAshish Jangam 	case DA9052_COUNT_Y_REG:
15584c99db8SAshish Jangam 	case DA9052_ALARM_MI_REG:
15684c99db8SAshish Jangam 	case DA9052_ALARM_H_REG:
15784c99db8SAshish Jangam 	case DA9052_ALARM_D_REG:
15884c99db8SAshish Jangam 	case DA9052_ALARM_MO_REG:
15984c99db8SAshish Jangam 	case DA9052_ALARM_Y_REG:
16084c99db8SAshish Jangam 	case DA9052_SECOND_A_REG:
16184c99db8SAshish Jangam 	case DA9052_SECOND_B_REG:
16284c99db8SAshish Jangam 	case DA9052_SECOND_C_REG:
16384c99db8SAshish Jangam 	case DA9052_SECOND_D_REG:
16484c99db8SAshish Jangam 	case DA9052_PAGE1_CON_REG:
16584c99db8SAshish Jangam 		return true;
16684c99db8SAshish Jangam 	default:
16784c99db8SAshish Jangam 		return false;
16884c99db8SAshish Jangam 	}
16984c99db8SAshish Jangam }
17084c99db8SAshish Jangam 
17184c99db8SAshish Jangam static bool da9052_reg_writeable(struct device *dev, unsigned int reg)
17284c99db8SAshish Jangam {
17384c99db8SAshish Jangam 	switch (reg) {
17484c99db8SAshish Jangam 	case DA9052_PAGE0_CON_REG:
17584c99db8SAshish Jangam 	case DA9052_IRQ_MASK_A_REG:
17684c99db8SAshish Jangam 	case DA9052_IRQ_MASK_B_REG:
17784c99db8SAshish Jangam 	case DA9052_IRQ_MASK_C_REG:
17884c99db8SAshish Jangam 	case DA9052_IRQ_MASK_D_REG:
17984c99db8SAshish Jangam 	case DA9052_CONTROL_A_REG:
18084c99db8SAshish Jangam 	case DA9052_CONTROL_B_REG:
18184c99db8SAshish Jangam 	case DA9052_CONTROL_C_REG:
18284c99db8SAshish Jangam 	case DA9052_CONTROL_D_REG:
18384c99db8SAshish Jangam 	case DA9052_PDDIS_REG:
18484c99db8SAshish Jangam 	case DA9052_RESET_REG:
18584c99db8SAshish Jangam 	case DA9052_GPIO_0_1_REG:
18684c99db8SAshish Jangam 	case DA9052_GPIO_2_3_REG:
18784c99db8SAshish Jangam 	case DA9052_GPIO_4_5_REG:
18884c99db8SAshish Jangam 	case DA9052_GPIO_6_7_REG:
18984c99db8SAshish Jangam 	case DA9052_GPIO_14_15_REG:
19084c99db8SAshish Jangam 	case DA9052_ID_0_1_REG:
19184c99db8SAshish Jangam 	case DA9052_ID_2_3_REG:
19284c99db8SAshish Jangam 	case DA9052_ID_4_5_REG:
19384c99db8SAshish Jangam 	case DA9052_ID_6_7_REG:
19484c99db8SAshish Jangam 	case DA9052_ID_8_9_REG:
19584c99db8SAshish Jangam 	case DA9052_ID_10_11_REG:
19684c99db8SAshish Jangam 	case DA9052_ID_12_13_REG:
19784c99db8SAshish Jangam 	case DA9052_ID_14_15_REG:
19884c99db8SAshish Jangam 	case DA9052_ID_16_17_REG:
19984c99db8SAshish Jangam 	case DA9052_ID_18_19_REG:
20084c99db8SAshish Jangam 	case DA9052_ID_20_21_REG:
20184c99db8SAshish Jangam 	case DA9052_SEQ_STATUS_REG:
20284c99db8SAshish Jangam 	case DA9052_SEQ_A_REG:
20384c99db8SAshish Jangam 	case DA9052_SEQ_B_REG:
20484c99db8SAshish Jangam 	case DA9052_SEQ_TIMER_REG:
20584c99db8SAshish Jangam 	case DA9052_BUCKA_REG:
20684c99db8SAshish Jangam 	case DA9052_BUCKB_REG:
20784c99db8SAshish Jangam 	case DA9052_BUCKCORE_REG:
20884c99db8SAshish Jangam 	case DA9052_BUCKPRO_REG:
20984c99db8SAshish Jangam 	case DA9052_BUCKMEM_REG:
21084c99db8SAshish Jangam 	case DA9052_BUCKPERI_REG:
21184c99db8SAshish Jangam 	case DA9052_LDO1_REG:
21284c99db8SAshish Jangam 	case DA9052_LDO2_REG:
21384c99db8SAshish Jangam 	case DA9052_LDO3_REG:
21484c99db8SAshish Jangam 	case DA9052_LDO4_REG:
21584c99db8SAshish Jangam 	case DA9052_LDO5_REG:
21684c99db8SAshish Jangam 	case DA9052_LDO6_REG:
21784c99db8SAshish Jangam 	case DA9052_LDO7_REG:
21884c99db8SAshish Jangam 	case DA9052_LDO8_REG:
21984c99db8SAshish Jangam 	case DA9052_LDO9_REG:
22084c99db8SAshish Jangam 	case DA9052_LDO10_REG:
22184c99db8SAshish Jangam 	case DA9052_SUPPLY_REG:
22284c99db8SAshish Jangam 	case DA9052_PULLDOWN_REG:
22384c99db8SAshish Jangam 	case DA9052_CHGBUCK_REG:
22484c99db8SAshish Jangam 	case DA9052_WAITCONT_REG:
22584c99db8SAshish Jangam 	case DA9052_ISET_REG:
22684c99db8SAshish Jangam 	case DA9052_BATCHG_REG:
22784c99db8SAshish Jangam 	case DA9052_CHG_CONT_REG:
22884c99db8SAshish Jangam 	case DA9052_INPUT_CONT_REG:
22984c99db8SAshish Jangam 	case DA9052_BBAT_CONT_REG:
23084c99db8SAshish Jangam 	case DA9052_BOOST_REG:
23184c99db8SAshish Jangam 	case DA9052_LED_CONT_REG:
23284c99db8SAshish Jangam 	case DA9052_LEDMIN123_REG:
23384c99db8SAshish Jangam 	case DA9052_LED1_CONF_REG:
23484c99db8SAshish Jangam 	case DA9052_LED2_CONF_REG:
23584c99db8SAshish Jangam 	case DA9052_LED3_CONF_REG:
23684c99db8SAshish Jangam 	case DA9052_LED1CONT_REG:
23784c99db8SAshish Jangam 	case DA9052_LED2CONT_REG:
23884c99db8SAshish Jangam 	case DA9052_LED3CONT_REG:
23984c99db8SAshish Jangam 	case DA9052_LED_CONT_4_REG:
24084c99db8SAshish Jangam 	case DA9052_LED_CONT_5_REG:
24184c99db8SAshish Jangam 	case DA9052_ADC_MAN_REG:
24284c99db8SAshish Jangam 	case DA9052_ADC_CONT_REG:
24384c99db8SAshish Jangam 	case DA9052_ADC_RES_L_REG:
24484c99db8SAshish Jangam 	case DA9052_ADC_RES_H_REG:
24584c99db8SAshish Jangam 	case DA9052_VDD_RES_REG:
24684c99db8SAshish Jangam 	case DA9052_VDD_MON_REG:
24784c99db8SAshish Jangam 	case DA9052_ICHG_THD_REG:
24884c99db8SAshish Jangam 	case DA9052_ICHG_END_REG:
24984c99db8SAshish Jangam 	case DA9052_TBAT_HIGHP_REG:
25084c99db8SAshish Jangam 	case DA9052_TBAT_HIGHN_REG:
25184c99db8SAshish Jangam 	case DA9052_TBAT_LOW_REG:
25284c99db8SAshish Jangam 	case DA9052_T_OFFSET_REG:
25384c99db8SAshish Jangam 	case DA9052_AUTO4_HIGH_REG:
25484c99db8SAshish Jangam 	case DA9052_AUTO4_LOW_REG:
25584c99db8SAshish Jangam 	case DA9052_AUTO5_HIGH_REG:
25684c99db8SAshish Jangam 	case DA9052_AUTO5_LOW_REG:
25784c99db8SAshish Jangam 	case DA9052_AUTO6_HIGH_REG:
25884c99db8SAshish Jangam 	case DA9052_AUTO6_LOW_REG:
25984c99db8SAshish Jangam 	case DA9052_TSI_CONT_A_REG:
26084c99db8SAshish Jangam 	case DA9052_TSI_CONT_B_REG:
26184c99db8SAshish Jangam 	case DA9052_COUNT_S_REG:
26284c99db8SAshish Jangam 	case DA9052_COUNT_MI_REG:
26384c99db8SAshish Jangam 	case DA9052_COUNT_H_REG:
26484c99db8SAshish Jangam 	case DA9052_COUNT_D_REG:
26584c99db8SAshish Jangam 	case DA9052_COUNT_MO_REG:
26684c99db8SAshish Jangam 	case DA9052_COUNT_Y_REG:
26784c99db8SAshish Jangam 	case DA9052_ALARM_MI_REG:
26884c99db8SAshish Jangam 	case DA9052_ALARM_H_REG:
26984c99db8SAshish Jangam 	case DA9052_ALARM_D_REG:
27084c99db8SAshish Jangam 	case DA9052_ALARM_MO_REG:
27184c99db8SAshish Jangam 	case DA9052_ALARM_Y_REG:
27284c99db8SAshish Jangam 	case DA9052_PAGE1_CON_REG:
27384c99db8SAshish Jangam 		return true;
27484c99db8SAshish Jangam 	default:
27584c99db8SAshish Jangam 		return false;
27684c99db8SAshish Jangam 	}
27784c99db8SAshish Jangam }
27884c99db8SAshish Jangam 
27984c99db8SAshish Jangam static bool da9052_reg_volatile(struct device *dev, unsigned int reg)
28084c99db8SAshish Jangam {
28184c99db8SAshish Jangam 	switch (reg) {
28284c99db8SAshish Jangam 	case DA9052_STATUS_A_REG:
28384c99db8SAshish Jangam 	case DA9052_STATUS_B_REG:
28484c99db8SAshish Jangam 	case DA9052_STATUS_C_REG:
28584c99db8SAshish Jangam 	case DA9052_STATUS_D_REG:
28684c99db8SAshish Jangam 	case DA9052_EVENT_A_REG:
28784c99db8SAshish Jangam 	case DA9052_EVENT_B_REG:
28884c99db8SAshish Jangam 	case DA9052_EVENT_C_REG:
28984c99db8SAshish Jangam 	case DA9052_EVENT_D_REG:
29084c99db8SAshish Jangam 	case DA9052_FAULTLOG_REG:
29184c99db8SAshish Jangam 	case DA9052_CHG_TIME_REG:
29284c99db8SAshish Jangam 	case DA9052_ADC_RES_L_REG:
29384c99db8SAshish Jangam 	case DA9052_ADC_RES_H_REG:
29484c99db8SAshish Jangam 	case DA9052_VDD_RES_REG:
29584c99db8SAshish Jangam 	case DA9052_ICHG_AV_REG:
29684c99db8SAshish Jangam 	case DA9052_TBAT_RES_REG:
29784c99db8SAshish Jangam 	case DA9052_ADCIN4_RES_REG:
29884c99db8SAshish Jangam 	case DA9052_ADCIN5_RES_REG:
29984c99db8SAshish Jangam 	case DA9052_ADCIN6_RES_REG:
30084c99db8SAshish Jangam 	case DA9052_TJUNC_RES_REG:
30184c99db8SAshish Jangam 	case DA9052_TSI_X_MSB_REG:
30284c99db8SAshish Jangam 	case DA9052_TSI_Y_MSB_REG:
30384c99db8SAshish Jangam 	case DA9052_TSI_LSB_REG:
30484c99db8SAshish Jangam 	case DA9052_TSI_Z_MSB_REG:
30584c99db8SAshish Jangam 	case DA9052_COUNT_S_REG:
30684c99db8SAshish Jangam 	case DA9052_COUNT_MI_REG:
30784c99db8SAshish Jangam 	case DA9052_COUNT_H_REG:
30884c99db8SAshish Jangam 	case DA9052_COUNT_D_REG:
30984c99db8SAshish Jangam 	case DA9052_COUNT_MO_REG:
31084c99db8SAshish Jangam 	case DA9052_COUNT_Y_REG:
31184c99db8SAshish Jangam 	case DA9052_ALARM_MI_REG:
31284c99db8SAshish Jangam 		return true;
31384c99db8SAshish Jangam 	default:
31484c99db8SAshish Jangam 		return false;
31584c99db8SAshish Jangam 	}
31684c99db8SAshish Jangam }
31784c99db8SAshish Jangam 
31884c99db8SAshish Jangam static struct resource da9052_rtc_resource = {
31984c99db8SAshish Jangam 	.name = "ALM",
32084c99db8SAshish Jangam 	.start = DA9052_IRQ_ALARM,
32184c99db8SAshish Jangam 	.end   = DA9052_IRQ_ALARM,
32284c99db8SAshish Jangam 	.flags = IORESOURCE_IRQ,
32384c99db8SAshish Jangam };
32484c99db8SAshish Jangam 
32584c99db8SAshish Jangam static struct resource da9052_onkey_resource = {
32684c99db8SAshish Jangam 	.name = "ONKEY",
32784c99db8SAshish Jangam 	.start = DA9052_IRQ_NONKEY,
32884c99db8SAshish Jangam 	.end   = DA9052_IRQ_NONKEY,
32984c99db8SAshish Jangam 	.flags = IORESOURCE_IRQ,
33084c99db8SAshish Jangam };
33184c99db8SAshish Jangam 
33284c99db8SAshish Jangam static struct resource da9052_bat_resources[] = {
33384c99db8SAshish Jangam 	{
33484c99db8SAshish Jangam 		.name = "BATT TEMP",
33584c99db8SAshish Jangam 		.start = DA9052_IRQ_TBAT,
33684c99db8SAshish Jangam 		.end   = DA9052_IRQ_TBAT,
33784c99db8SAshish Jangam 		.flags = IORESOURCE_IRQ,
33884c99db8SAshish Jangam 	},
33984c99db8SAshish Jangam 	{
34084c99db8SAshish Jangam 		.name = "DCIN DET",
34184c99db8SAshish Jangam 		.start = DA9052_IRQ_DCIN,
34284c99db8SAshish Jangam 		.end   = DA9052_IRQ_DCIN,
34384c99db8SAshish Jangam 		.flags = IORESOURCE_IRQ,
34484c99db8SAshish Jangam 	},
34584c99db8SAshish Jangam 	{
34684c99db8SAshish Jangam 		.name = "DCIN REM",
34784c99db8SAshish Jangam 		.start = DA9052_IRQ_DCINREM,
34884c99db8SAshish Jangam 		.end   = DA9052_IRQ_DCINREM,
34984c99db8SAshish Jangam 		.flags = IORESOURCE_IRQ,
35084c99db8SAshish Jangam 	},
35184c99db8SAshish Jangam 	{
35284c99db8SAshish Jangam 		.name = "VBUS DET",
35384c99db8SAshish Jangam 		.start = DA9052_IRQ_VBUS,
35484c99db8SAshish Jangam 		.end   = DA9052_IRQ_VBUS,
35584c99db8SAshish Jangam 		.flags = IORESOURCE_IRQ,
35684c99db8SAshish Jangam 	},
35784c99db8SAshish Jangam 	{
35884c99db8SAshish Jangam 		.name = "VBUS REM",
35984c99db8SAshish Jangam 		.start = DA9052_IRQ_VBUSREM,
36084c99db8SAshish Jangam 		.end   = DA9052_IRQ_VBUSREM,
36184c99db8SAshish Jangam 		.flags = IORESOURCE_IRQ,
36284c99db8SAshish Jangam 	},
36384c99db8SAshish Jangam 	{
36484c99db8SAshish Jangam 		.name = "CHG END",
36584c99db8SAshish Jangam 		.start = DA9052_IRQ_CHGEND,
36684c99db8SAshish Jangam 		.end   = DA9052_IRQ_CHGEND,
36784c99db8SAshish Jangam 		.flags = IORESOURCE_IRQ,
36884c99db8SAshish Jangam 	},
36984c99db8SAshish Jangam };
37084c99db8SAshish Jangam 
37184c99db8SAshish Jangam static struct resource da9052_tsi_resources[] = {
37284c99db8SAshish Jangam 	{
37384c99db8SAshish Jangam 		.name = "PENDWN",
37484c99db8SAshish Jangam 		.start = DA9052_IRQ_PENDOWN,
37584c99db8SAshish Jangam 		.end   = DA9052_IRQ_PENDOWN,
37684c99db8SAshish Jangam 		.flags = IORESOURCE_IRQ,
37784c99db8SAshish Jangam 	},
37884c99db8SAshish Jangam 	{
37984c99db8SAshish Jangam 		.name = "TSIRDY",
38084c99db8SAshish Jangam 		.start = DA9052_IRQ_TSIREADY,
38184c99db8SAshish Jangam 		.end   = DA9052_IRQ_TSIREADY,
38284c99db8SAshish Jangam 		.flags = IORESOURCE_IRQ,
38384c99db8SAshish Jangam 	},
38484c99db8SAshish Jangam };
38584c99db8SAshish Jangam 
386*d9cba483SMark Brown static struct mfd_cell __devinitdata da9052_subdev_info[] = {
38784c99db8SAshish Jangam 	{
38884c99db8SAshish Jangam 		.name = "da9052-regulator",
38984c99db8SAshish Jangam 		.id = 1,
39084c99db8SAshish Jangam 	},
39184c99db8SAshish Jangam 	{
39284c99db8SAshish Jangam 		.name = "da9052-regulator",
39384c99db8SAshish Jangam 		.id = 2,
39484c99db8SAshish Jangam 	},
39584c99db8SAshish Jangam 	{
39684c99db8SAshish Jangam 		.name = "da9052-regulator",
39784c99db8SAshish Jangam 		.id = 3,
39884c99db8SAshish Jangam 	},
39984c99db8SAshish Jangam 	{
40084c99db8SAshish Jangam 		.name = "da9052-regulator",
40184c99db8SAshish Jangam 		.id = 4,
40284c99db8SAshish Jangam 	},
40384c99db8SAshish Jangam 	{
40484c99db8SAshish Jangam 		.name = "da9052-regulator",
40584c99db8SAshish Jangam 		.id = 5,
40684c99db8SAshish Jangam 	},
40784c99db8SAshish Jangam 	{
40884c99db8SAshish Jangam 		.name = "da9052-regulator",
40984c99db8SAshish Jangam 		.id = 6,
41084c99db8SAshish Jangam 	},
41184c99db8SAshish Jangam 	{
41284c99db8SAshish Jangam 		.name = "da9052-regulator",
41384c99db8SAshish Jangam 		.id = 7,
41484c99db8SAshish Jangam 	},
41584c99db8SAshish Jangam 	{
41684c99db8SAshish Jangam 		.name = "da9052-regulator",
41784c99db8SAshish Jangam 		.id = 8,
41884c99db8SAshish Jangam 	},
41984c99db8SAshish Jangam 	{
42084c99db8SAshish Jangam 		.name = "da9052-regulator",
42184c99db8SAshish Jangam 		.id = 9,
42284c99db8SAshish Jangam 	},
42384c99db8SAshish Jangam 	{
42484c99db8SAshish Jangam 		.name = "da9052-regulator",
42584c99db8SAshish Jangam 		.id = 10,
42684c99db8SAshish Jangam 	},
42784c99db8SAshish Jangam 	{
42884c99db8SAshish Jangam 		.name = "da9052-regulator",
42984c99db8SAshish Jangam 		.id = 11,
43084c99db8SAshish Jangam 	},
43184c99db8SAshish Jangam 	{
43284c99db8SAshish Jangam 		.name = "da9052-regulator",
43384c99db8SAshish Jangam 		.id = 12,
43484c99db8SAshish Jangam 	},
43584c99db8SAshish Jangam 	{
43684c99db8SAshish Jangam 		.name = "da9052-regulator",
43784c99db8SAshish Jangam 		.id = 13,
43884c99db8SAshish Jangam 	},
43984c99db8SAshish Jangam 	{
44084c99db8SAshish Jangam 		.name = "da9052-regulator",
44184c99db8SAshish Jangam 		.id = 14,
44284c99db8SAshish Jangam 	},
44384c99db8SAshish Jangam 	{
44484c99db8SAshish Jangam 		.name = "da9052-onkey",
44584c99db8SAshish Jangam 		.resources = &da9052_onkey_resource,
44684c99db8SAshish Jangam 		.num_resources = 1,
44784c99db8SAshish Jangam 	},
44884c99db8SAshish Jangam 	{
44984c99db8SAshish Jangam 		.name = "da9052-rtc",
45084c99db8SAshish Jangam 		.resources = &da9052_rtc_resource,
45184c99db8SAshish Jangam 		.num_resources = 1,
45284c99db8SAshish Jangam 	},
45384c99db8SAshish Jangam 	{
45484c99db8SAshish Jangam 		.name = "da9052-gpio",
45584c99db8SAshish Jangam 	},
45684c99db8SAshish Jangam 	{
45784c99db8SAshish Jangam 		.name = "da9052-hwmon",
45884c99db8SAshish Jangam 	},
45984c99db8SAshish Jangam 	{
46084c99db8SAshish Jangam 		.name = "da9052-leds",
46184c99db8SAshish Jangam 	},
46284c99db8SAshish Jangam 	{
46384c99db8SAshish Jangam 		.name = "da9052-wled1",
46484c99db8SAshish Jangam 	},
46584c99db8SAshish Jangam 	{
46684c99db8SAshish Jangam 		.name = "da9052-wled2",
46784c99db8SAshish Jangam 	},
46884c99db8SAshish Jangam 	{
46984c99db8SAshish Jangam 		.name = "da9052-wled3",
47084c99db8SAshish Jangam 	},
47184c99db8SAshish Jangam 	{
47284c99db8SAshish Jangam 		.name = "da9052-tsi",
47384c99db8SAshish Jangam 		.resources = da9052_tsi_resources,
47484c99db8SAshish Jangam 		.num_resources = ARRAY_SIZE(da9052_tsi_resources),
47584c99db8SAshish Jangam 	},
47684c99db8SAshish Jangam 	{
47784c99db8SAshish Jangam 		.name = "da9052-bat",
47884c99db8SAshish Jangam 		.resources = da9052_bat_resources,
47984c99db8SAshish Jangam 		.num_resources = ARRAY_SIZE(da9052_bat_resources),
48084c99db8SAshish Jangam 	},
48184c99db8SAshish Jangam 	{
48284c99db8SAshish Jangam 		.name = "da9052-watchdog",
48384c99db8SAshish Jangam 	},
48484c99db8SAshish Jangam };
48584c99db8SAshish Jangam 
48684c99db8SAshish Jangam static struct regmap_irq da9052_irqs[] = {
48784c99db8SAshish Jangam 	[DA9052_IRQ_DCIN] = {
48884c99db8SAshish Jangam 		.reg_offset = 0,
48984c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_1,
49084c99db8SAshish Jangam 	},
49184c99db8SAshish Jangam 	[DA9052_IRQ_VBUS] = {
49284c99db8SAshish Jangam 		.reg_offset = 0,
49384c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_2,
49484c99db8SAshish Jangam 	},
49584c99db8SAshish Jangam 	[DA9052_IRQ_DCINREM] = {
49684c99db8SAshish Jangam 		.reg_offset = 0,
49784c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_3,
49884c99db8SAshish Jangam 	},
49984c99db8SAshish Jangam 	[DA9052_IRQ_VBUSREM] = {
50084c99db8SAshish Jangam 		.reg_offset = 0,
50184c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_4,
50284c99db8SAshish Jangam 	},
50384c99db8SAshish Jangam 	[DA9052_IRQ_VDDLOW] = {
50484c99db8SAshish Jangam 		.reg_offset = 0,
50584c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_5,
50684c99db8SAshish Jangam 	},
50784c99db8SAshish Jangam 	[DA9052_IRQ_ALARM] = {
50884c99db8SAshish Jangam 		.reg_offset = 0,
50984c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_6,
51084c99db8SAshish Jangam 	},
51184c99db8SAshish Jangam 	[DA9052_IRQ_SEQRDY] = {
51284c99db8SAshish Jangam 		.reg_offset = 0,
51384c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_7,
51484c99db8SAshish Jangam 	},
51584c99db8SAshish Jangam 	[DA9052_IRQ_COMP1V2] = {
51684c99db8SAshish Jangam 		.reg_offset = 0,
51784c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_8,
51884c99db8SAshish Jangam 	},
51984c99db8SAshish Jangam 	[DA9052_IRQ_NONKEY] = {
52084c99db8SAshish Jangam 		.reg_offset = 1,
52184c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_1,
52284c99db8SAshish Jangam 	},
52384c99db8SAshish Jangam 	[DA9052_IRQ_IDFLOAT] = {
52484c99db8SAshish Jangam 		.reg_offset = 1,
52584c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_2,
52684c99db8SAshish Jangam 	},
52784c99db8SAshish Jangam 	[DA9052_IRQ_IDGND] = {
52884c99db8SAshish Jangam 		.reg_offset = 1,
52984c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_3,
53084c99db8SAshish Jangam 	},
53184c99db8SAshish Jangam 	[DA9052_IRQ_CHGEND] = {
53284c99db8SAshish Jangam 		.reg_offset = 1,
53384c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_4,
53484c99db8SAshish Jangam 	},
53584c99db8SAshish Jangam 	[DA9052_IRQ_TBAT] = {
53684c99db8SAshish Jangam 		.reg_offset = 1,
53784c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_5,
53884c99db8SAshish Jangam 	},
53984c99db8SAshish Jangam 	[DA9052_IRQ_ADC_EOM] = {
54084c99db8SAshish Jangam 		.reg_offset = 1,
54184c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_6,
54284c99db8SAshish Jangam 	},
54384c99db8SAshish Jangam 	[DA9052_IRQ_PENDOWN] = {
54484c99db8SAshish Jangam 		.reg_offset = 1,
54584c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_7,
54684c99db8SAshish Jangam 	},
54784c99db8SAshish Jangam 	[DA9052_IRQ_TSIREADY] = {
54884c99db8SAshish Jangam 		.reg_offset = 1,
54984c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_8,
55084c99db8SAshish Jangam 	},
55184c99db8SAshish Jangam 	[DA9052_IRQ_GPI0] = {
55284c99db8SAshish Jangam 		.reg_offset = 2,
55384c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_1,
55484c99db8SAshish Jangam 	},
55584c99db8SAshish Jangam 	[DA9052_IRQ_GPI1] = {
55684c99db8SAshish Jangam 		.reg_offset = 2,
55784c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_2,
55884c99db8SAshish Jangam 	},
55984c99db8SAshish Jangam 	[DA9052_IRQ_GPI2] = {
56084c99db8SAshish Jangam 		.reg_offset = 2,
56184c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_3,
56284c99db8SAshish Jangam 	},
56384c99db8SAshish Jangam 	[DA9052_IRQ_GPI3] = {
56484c99db8SAshish Jangam 		.reg_offset = 2,
56584c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_4,
56684c99db8SAshish Jangam 	},
56784c99db8SAshish Jangam 	[DA9052_IRQ_GPI4] = {
56884c99db8SAshish Jangam 		.reg_offset = 2,
56984c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_5,
57084c99db8SAshish Jangam 	},
57184c99db8SAshish Jangam 	[DA9052_IRQ_GPI5] = {
57284c99db8SAshish Jangam 		.reg_offset = 2,
57384c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_6,
57484c99db8SAshish Jangam 	},
57584c99db8SAshish Jangam 	[DA9052_IRQ_GPI6] = {
57684c99db8SAshish Jangam 		.reg_offset = 2,
57784c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_7,
57884c99db8SAshish Jangam 	},
57984c99db8SAshish Jangam 	[DA9052_IRQ_GPI7] = {
58084c99db8SAshish Jangam 		.reg_offset = 2,
58184c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_8,
58284c99db8SAshish Jangam 	},
58384c99db8SAshish Jangam 	[DA9052_IRQ_GPI8] = {
58484c99db8SAshish Jangam 		.reg_offset = 3,
58584c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_1,
58684c99db8SAshish Jangam 	},
58784c99db8SAshish Jangam 	[DA9052_IRQ_GPI9] = {
58884c99db8SAshish Jangam 		.reg_offset = 3,
58984c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_2,
59084c99db8SAshish Jangam 	},
59184c99db8SAshish Jangam 	[DA9052_IRQ_GPI10] = {
59284c99db8SAshish Jangam 		.reg_offset = 3,
59384c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_3,
59484c99db8SAshish Jangam 	},
59584c99db8SAshish Jangam 	[DA9052_IRQ_GPI11] = {
59684c99db8SAshish Jangam 		.reg_offset = 3,
59784c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_4,
59884c99db8SAshish Jangam 	},
59984c99db8SAshish Jangam 	[DA9052_IRQ_GPI12] = {
60084c99db8SAshish Jangam 		.reg_offset = 3,
60184c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_5,
60284c99db8SAshish Jangam 	},
60384c99db8SAshish Jangam 	[DA9052_IRQ_GPI13] = {
60484c99db8SAshish Jangam 		.reg_offset = 3,
60584c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_6,
60684c99db8SAshish Jangam 	},
60784c99db8SAshish Jangam 	[DA9052_IRQ_GPI14] = {
60884c99db8SAshish Jangam 		.reg_offset = 3,
60984c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_7,
61084c99db8SAshish Jangam 	},
61184c99db8SAshish Jangam 	[DA9052_IRQ_GPI15] = {
61284c99db8SAshish Jangam 		.reg_offset = 3,
61384c99db8SAshish Jangam 		.mask = DA9052_IRQ_MASK_POS_8,
61484c99db8SAshish Jangam 	},
61584c99db8SAshish Jangam };
61684c99db8SAshish Jangam 
61784c99db8SAshish Jangam static struct regmap_irq_chip da9052_regmap_irq_chip = {
61884c99db8SAshish Jangam 	.name = "da9052_irq",
61984c99db8SAshish Jangam 	.status_base = DA9052_EVENT_A_REG,
62084c99db8SAshish Jangam 	.mask_base = DA9052_IRQ_MASK_A_REG,
62184c99db8SAshish Jangam 	.ack_base = DA9052_EVENT_A_REG,
62284c99db8SAshish Jangam 	.num_regs = DA9052_NUM_IRQ_REGS,
62384c99db8SAshish Jangam 	.irqs = da9052_irqs,
62484c99db8SAshish Jangam 	.num_irqs = ARRAY_SIZE(da9052_irqs),
62584c99db8SAshish Jangam };
62684c99db8SAshish Jangam 
62784c99db8SAshish Jangam struct regmap_config da9052_regmap_config = {
62884c99db8SAshish Jangam 	.reg_bits = 8,
62984c99db8SAshish Jangam 	.val_bits = 8,
63084c99db8SAshish Jangam 
63184c99db8SAshish Jangam 	.cache_type = REGCACHE_RBTREE,
63284c99db8SAshish Jangam 
63384c99db8SAshish Jangam 	.max_register = DA9052_PAGE1_CON_REG,
63484c99db8SAshish Jangam 	.readable_reg = da9052_reg_readable,
63584c99db8SAshish Jangam 	.writeable_reg = da9052_reg_writeable,
63684c99db8SAshish Jangam 	.volatile_reg = da9052_reg_volatile,
63784c99db8SAshish Jangam };
63884c99db8SAshish Jangam EXPORT_SYMBOL_GPL(da9052_regmap_config);
63984c99db8SAshish Jangam 
640*d9cba483SMark Brown int __devinit da9052_device_init(struct da9052 *da9052, u8 chip_id)
64184c99db8SAshish Jangam {
64284c99db8SAshish Jangam 	struct da9052_pdata *pdata = da9052->dev->platform_data;
64384c99db8SAshish Jangam 	struct irq_desc *desc;
64484c99db8SAshish Jangam 	int ret;
64584c99db8SAshish Jangam 
64684c99db8SAshish Jangam 	mutex_init(&da9052->io_lock);
64784c99db8SAshish Jangam 
64884c99db8SAshish Jangam 	if (pdata && pdata->init != NULL)
64984c99db8SAshish Jangam 		pdata->init(da9052);
65084c99db8SAshish Jangam 
65184c99db8SAshish Jangam 	da9052->chip_id = chip_id;
65284c99db8SAshish Jangam 
65384c99db8SAshish Jangam 	if (!pdata || !pdata->irq_base)
65484c99db8SAshish Jangam 		da9052->irq_base = -1;
65584c99db8SAshish Jangam 	else
65684c99db8SAshish Jangam 		da9052->irq_base = pdata->irq_base;
65784c99db8SAshish Jangam 
65884c99db8SAshish Jangam 	ret = regmap_add_irq_chip(da9052->regmap, da9052->chip_irq,
65984c99db8SAshish Jangam 				  IRQF_TRIGGER_LOW | IRQF_ONESHOT,
66084c99db8SAshish Jangam 				  da9052->irq_base, &da9052_regmap_irq_chip,
66184c99db8SAshish Jangam 				  NULL);
66284c99db8SAshish Jangam 	if (ret < 0)
66384c99db8SAshish Jangam 		goto regmap_err;
66484c99db8SAshish Jangam 
66584c99db8SAshish Jangam 	desc = irq_to_desc(da9052->chip_irq);
66684c99db8SAshish Jangam 	da9052->irq_base = regmap_irq_chip_get_base(desc->action->dev_id);
66784c99db8SAshish Jangam 
66884c99db8SAshish Jangam 	ret = mfd_add_devices(da9052->dev, -1, da9052_subdev_info,
66984c99db8SAshish Jangam 			      ARRAY_SIZE(da9052_subdev_info), NULL, 0);
67084c99db8SAshish Jangam 	if (ret)
67184c99db8SAshish Jangam 		goto err;
67284c99db8SAshish Jangam 
67384c99db8SAshish Jangam 	return 0;
67484c99db8SAshish Jangam 
67584c99db8SAshish Jangam err:
67684c99db8SAshish Jangam 	mfd_remove_devices(da9052->dev);
67784c99db8SAshish Jangam regmap_err:
67884c99db8SAshish Jangam 	return ret;
67984c99db8SAshish Jangam }
68084c99db8SAshish Jangam 
68184c99db8SAshish Jangam void da9052_device_exit(struct da9052 *da9052)
68284c99db8SAshish Jangam {
68384c99db8SAshish Jangam 	regmap_del_irq_chip(da9052->chip_irq,
68484c99db8SAshish Jangam 			    irq_get_irq_data(da9052->irq_base)->chip_data);
68584c99db8SAshish Jangam 	mfd_remove_devices(da9052->dev);
68684c99db8SAshish Jangam }
68784c99db8SAshish Jangam 
68884c99db8SAshish Jangam MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
68984c99db8SAshish Jangam MODULE_DESCRIPTION("DA9052 MFD Core");
69084c99db8SAshish Jangam MODULE_LICENSE("GPL");
691