aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/pm8xxx/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mfd/pm8xxx/core.h')
-rw-r--r--include/linux/mfd/pm8xxx/core.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/mfd/pm8xxx/core.h b/include/linux/mfd/pm8xxx/core.h
index 36ccb33332ed..bd2f4f64e931 100644
--- a/include/linux/mfd/pm8xxx/core.h
+++ b/include/linux/mfd/pm8xxx/core.h
@@ -27,6 +27,7 @@ struct pm8xxx_drvdata {
27 int n); 27 int n);
28 int (*pmic_write_buf) (const struct device *dev, u16 addr, u8 *buf, 28 int (*pmic_write_buf) (const struct device *dev, u16 addr, u8 *buf,
29 int n); 29 int n);
30 int (*pmic_read_irq_stat) (const struct device *dev, int irq);
30 void *pm_chip_data; 31 void *pm_chip_data;
31}; 32};
32 33
@@ -68,4 +69,13 @@ static inline int pm8xxx_write_buf(const struct device *dev, u16 addr, u8 *buf,
68 return dd->pmic_write_buf(dev, addr, buf, n); 69 return dd->pmic_write_buf(dev, addr, buf, n);
69} 70}
70 71
72static inline int pm8xxx_read_irq_stat(const struct device *dev, int irq)
73{
74 struct pm8xxx_drvdata *dd = dev_get_drvdata(dev);
75
76 if (!dd)
77 return -EINVAL;
78 return dd->pmic_read_irq_stat(dev, irq);
79}
80
71#endif 81#endif