Re: [PATCH 2/2] iio: accel: mma8452: Allow open drain interrupt pin configuration

From: Esben Haabendal

Date: Wed Jul 15 2026 - 08:28:05 EST


"Joshua Crofts" <joshua.crofts1@xxxxxxxxx> writes:

> On Wed, 15 Jul 2026 13:29:17 +0200
> Esben Haabendal <esben@xxxxxxxxxx> wrote:
>
> ...
>
>> >> diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
>> >> index 7d683686dd9d..a20c02ce0b9c 100644
>> >> --- a/drivers/iio/accel/mma8452.c
>> >> +++ b/drivers/iio/accel/mma8452.c
>> >> @@ -81,6 +81,8 @@
>> >> #define MMA8452_CTRL_REG2_RST BIT(6)
>> >> #define MMA8452_CTRL_REG2_MODS_SHIFT 3
>> >> #define MMA8452_CTRL_REG2_MODS_MASK 0x1b
>> >> +#define MMA8452_CTRL_REG3 0x2c
>> >> +#define MMA8452_CTRL_REG3_PP_OD BIT(0)
>> >
>> > I know that the defines are completely incorrectly aligned, but please
>> > ensure that at least all the defines in this block are aligned.
>> >
>> > Also, consider sending a patch which aligns all the other defines.
>>
>> How are they incorrectly aligned?
>> The all look perfectly fine here (visual tabs space set to 8).
>> Should I convert all the tabs used for alignment to spaces?
>>
>> AFAICS, I have added the defines with same alignment as the other
>> defines in that block. I believe the misalignment is only a visual
>> artifact caused by the diff format.
>
> Ah, I meant it as currently the defines look like this:
>
> #define MMA8452_WHO_AM_I 0x0d
> #define MMA8452_DATA_CFG 0x0e
> #define MMA8452_DATA_CFG_FS_MASK GENMASK(1, 0)
> #define MMA8452_DATA_CFG_FS_2G 0
>
> but instead should look like this:
>
> #define MMA8452_WHO_AM_I 0x0d
> #define MMA8452_DATA_CFG 0x0e
> #define MMA8452_DATA_CFG_FS_MASK GENMASK(1, 0)
> #define MMA8452_DATA_CFG_FS_2G 0
>
> I'm not sure if this was intentional or not in the original implementation.

Ah okay. I assumed it was intentional, hinting at the hierarchy of the
defines.
Should I flatten that, or is it okay to leave it as it is?
For what it is worth, I like the current format :)

/Esben