14 #include <linux/module.h>
15 #include <linux/device.h>
16 #include <linux/input.h>
25 #define DA9055_IRQ_NONKEY_MASK 0x01
26 #define DA9055_IRQ_ALM_MASK 0x02
27 #define DA9055_IRQ_TICK_MASK 0x04
28 #define DA9055_IRQ_ADC_MASK 0x08
29 #define DA9055_IRQ_BUCK_ILIM_MASK 0x08
31 static bool da9055_register_readable(
struct device *
dev,
unsigned int reg)
107 static bool da9055_register_writeable(
struct device *
dev,
unsigned int reg)
183 static bool da9055_register_volatile(
struct device *dev,
unsigned int reg)
225 static struct regmap_irq da9055_irqs[] = {
255 .readable_reg = da9055_register_readable,
256 .writeable_reg = da9055_register_writeable,
257 .volatile_reg = da9055_register_volatile,
261 static struct resource da9055_onkey_resource = {
268 static struct resource da9055_rtc_resource[] = {
283 static struct resource da9055_hwmon_resource = {
290 static struct resource da9055_ld05_6_resource = {
297 static struct mfd_cell da9055_devs[] = {
299 .of_compatible =
"dialog,da9055-gpio",
300 .name =
"da9055-gpio",
303 .of_compatible =
"dialog,da9055-regulator",
304 .name =
"da9055-regulator",
308 .of_compatible =
"dialog,da9055-regulator",
309 .name =
"da9055-regulator",
313 .of_compatible =
"dialog,da9055-regulator",
314 .name =
"da9055-regulator",
318 .of_compatible =
"dialog,da9055-regulator",
319 .name =
"da9055-regulator",
323 .of_compatible =
"dialog,da9055-regulator",
324 .name =
"da9055-regulator",
328 .of_compatible =
"dialog,da9055-regulator",
329 .name =
"da9055-regulator",
333 .of_compatible =
"dialog,da9055-regulator",
334 .name =
"da9055-regulator",
336 .resources = &da9055_ld05_6_resource,
340 .of_compatible =
"dialog,da9055-regulator",
341 .
name =
"da9055-regulator",
342 .resources = &da9055_ld05_6_resource,
347 .of_compatible =
"dialog,da9055-onkey",
348 .
name =
"da9055-onkey",
349 .resources = &da9055_onkey_resource,
353 .of_compatible =
"dialog,da9055-rtc",
354 .
name =
"da9055-rtc",
355 .resources = da9055_rtc_resource,
356 .num_resources =
ARRAY_SIZE(da9055_rtc_resource),
359 .of_compatible =
"dialog,da9055-hwmon",
360 .name =
"da9055-hwmon",
361 .resources = &da9055_hwmon_resource,
365 .of_compatible =
"dialog,da9055-watchdog",
366 .
name =
"da9055-watchdog",
370 static struct regmap_irq_chip da9055_regmap_irq_chip = {
371 .name =
"da9055_irq",
395 da9055->
irq_base, &da9055_regmap_irq_chip,