Skip to content

Commit

Permalink
mfd: tps65219: Use MFD_CELL macros
Browse files Browse the repository at this point in the history
Use MFD_CELL macro helpers instead of plain struct properties, which makes
the code shorter with the common defined MFD cell attributes.

Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com>
Link: https://lore.kernel.org/r/20241217204935.1012106-2-s-ramamoorthy@ti.com
Signed-off-by: Lee Jones <lee@kernel.org>
  • Loading branch information
Shree Ramamoorthy authored and Lee Jones committed Jan 9, 2025
1 parent 2592303 commit 6891e88
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions drivers/mfd/tps65219.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6891e88

Please sign in to comment.