Re: [PATCH v3 06/10] iio: accel: mma8452: convert to bulk regulator usage

From: Andy Shevchenko

Date: Wed May 06 2026 - 05:33:57 EST


On Tue, May 05, 2026 at 11:16:36PM +0530, Sanjay Chitroda wrote:

> The "vdd" and "vddio" regulators are always controlled together. Switch
> to the regulator bulk API to handle setup, enable, and disable paths in
> a single call.
>
> No functional change intended.

...

> struct mma8452_data {

> u8 data_cfg;
> const struct mma_chip_info *chip_info;
> int sleep_val;
> - struct regulator *vdd_reg;
> - struct regulator *vddio_reg;
> + struct regulator_bulk_data regs[2];

When touching data structures, always confirm with `pahole` that the chosen
layout suits well. You can also consider doing another patch to rearrange
the members for that. But be careful about the code generation, rearrange of
such a data needs confirmation from both `pahole` and `bloat-o-meter`.

--
With Best Regards,
Andy Shevchenko