Lines Matching full:da9063
3 * Device access for Dialog DA9063 modules
24 #include <linux/mfd/da9063/core.h>
25 #include <linux/mfd/da9063/registers.h>
85 .of_compatible = "dlg,da9063-watchdog",
96 .of_compatible = "dlg,da9063-onkey",
103 /* Only present on DA9063 , not on DA9063L */
109 .of_compatible = "dlg,da9063-rtc",
113 static int da9063_clear_fault_log(struct da9063 *da9063) in da9063_clear_fault_log() argument
118 ret = regmap_read(da9063->regmap, DA9063_REG_FAULT_LOG, &fault_log); in da9063_clear_fault_log()
120 dev_err(da9063->dev, "Cannot read FAULT_LOG.\n"); in da9063_clear_fault_log()
126 dev_dbg(da9063->dev, in da9063_clear_fault_log()
129 dev_dbg(da9063->dev, in da9063_clear_fault_log()
132 dev_dbg(da9063->dev, in da9063_clear_fault_log()
135 dev_dbg(da9063->dev, in da9063_clear_fault_log()
138 dev_dbg(da9063->dev, in da9063_clear_fault_log()
141 dev_dbg(da9063->dev, in da9063_clear_fault_log()
144 dev_dbg(da9063->dev, in da9063_clear_fault_log()
147 dev_dbg(da9063->dev, in da9063_clear_fault_log()
151 ret = regmap_write(da9063->regmap, in da9063_clear_fault_log()
155 dev_err(da9063->dev, in da9063_clear_fault_log()
161 int da9063_device_init(struct da9063 *da9063, unsigned int irq) in da9063_device_init() argument
165 ret = da9063_clear_fault_log(da9063); in da9063_device_init()
167 dev_err(da9063->dev, "Cannot clear fault log\n"); in da9063_device_init()
169 da9063->flags = 0; in da9063_device_init()
170 da9063->irq_base = -1; in da9063_device_init()
171 da9063->chip_irq = irq; in da9063_device_init()
173 ret = da9063_irq_init(da9063); in da9063_device_init()
175 dev_err(da9063->dev, "Cannot initialize interrupts.\n"); in da9063_device_init()
179 da9063->irq_base = regmap_irq_chip_get_base(da9063->regmap_irq); in da9063_device_init()
181 ret = devm_mfd_add_devices(da9063->dev, PLATFORM_DEVID_NONE, in da9063_device_init()
184 NULL, da9063->irq_base, NULL); in da9063_device_init()
186 dev_err(da9063->dev, "Failed to add child devices\n"); in da9063_device_init()
190 if (da9063->type == PMIC_TYPE_DA9063) { in da9063_device_init()
191 ret = devm_mfd_add_devices(da9063->dev, PLATFORM_DEVID_NONE, in da9063_device_init()
193 NULL, da9063->irq_base, NULL); in da9063_device_init()
195 dev_err(da9063->dev, "Failed to add child devices\n"); in da9063_device_init()
203 MODULE_DESCRIPTION("PMIC driver for Dialog DA9063");