summaryrefslogtreecommitdiff
path: root/drivers/mfd/tps65219.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/tps65219.c')
-rw-r--r--drivers/mfd/tps65219.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
index 0e0c42e4fdfc..081c5a30b04a 100644
--- a/drivers/mfd/tps65219.c
+++ b/drivers/mfd/tps65219.c
@@ -110,19 +110,12 @@ static const struct resource tps65219_regulator_resources[] = {
};
static const struct mfd_cell tps65219_cells[] = {
- {
- .name = "tps65219-regulator",
- .resources = tps65219_regulator_resources,
- .num_resources = ARRAY_SIZE(tps65219_regulator_resources),
- },
- { .name = "tps65219-gpio", },
+ MFD_CELL_RES("tps65219-regulator", tps65219_regulator_resources),
+ MFD_CELL_NAME("tps65219-gpio"),
};
-static const struct mfd_cell tps65219_pwrbutton_cell = {
- .name = "tps65219-pwrbutton",
- .resources = tps65219_pwrbutton_resources,
- .num_resources = ARRAY_SIZE(tps65219_pwrbutton_resources),
-};
+static const struct mfd_cell tps65219_pwrbutton_cell =
+ MFD_CELL_RES("tps65219-pwrbutton", tps65219_pwrbutton_resources);
static const struct regmap_config tps65219_regmap_config = {
.reg_bits = 8,
@@ -159,7 +152,7 @@ static struct regmap_irq_sub_irq_map tps65219_sub_irq_offsets[] = {
#define TPS65219_REGMAP_IRQ_REG(int_name, register_position) \
REGMAP_IRQ_REG(int_name, register_position, int_name##_MASK)
-static struct regmap_irq tps65219_irqs[] = {
+static const struct regmap_irq tps65219_irqs[] = {
TPS65219_REGMAP_IRQ_REG(TPS65219_INT_LDO3_SCG, TPS65219_REG_INT_LDO_3_4_POS),
TPS65219_REGMAP_IRQ_REG(TPS65219_INT_LDO3_OC, TPS65219_REG_INT_LDO_3_4_POS),
TPS65219_REGMAP_IRQ_REG(TPS65219_INT_LDO3_UV, TPS65219_REG_INT_LDO_3_4_POS),
@@ -211,7 +204,7 @@ static struct regmap_irq tps65219_irqs[] = {
TPS65219_REGMAP_IRQ_REG(TPS65219_INT_PB_RISING_EDGE_DETECT, TPS65219_REG_INT_PB_POS),
};
-static struct regmap_irq_chip tps65219_irq_chip = {
+static const struct regmap_irq_chip tps65219_irq_chip = {
.name = "tps65219_irq",
.main_status = TPS65219_REG_INT_SOURCE,
.num_main_regs = 1,