2023-09-26 17:34:50

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [RFT PATCH 2/4] platform/x86: int3472: led: don't use gpiod_toggle_active_low()

On Tue, Sep 26, 2023 at 04:59:41PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <[email protected]>
>
> Instead of acpi_get_and_request_gpiod() + gpiod_toggle_active_low(), use
> temporary lookup tables with appropriate lookup flags.

...

> + int3472->pled.gpio = skl_int3472_gpiod_get_from_temp_lookup(
> + int3472->dev, path, agpio->pin_table[0],
> + "int3472,privacy-led", polarity,
> + GPIOD_OUT_LOW);

Personally I found this style weird. I prefer to have longer line over
the split on the parentheses.

--
With Best Regards,
Andy Shevchenko



2023-09-27 11:06:36

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [RFT PATCH 2/4] platform/x86: int3472: led: don't use gpiod_toggle_active_low()

On Tue, Sep 26, 2023 at 5:27 PM Andy Shevchenko
<[email protected]> wrote:
>
> On Tue, Sep 26, 2023 at 04:59:41PM +0200, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <[email protected]>
> >
> > Instead of acpi_get_and_request_gpiod() + gpiod_toggle_active_low(), use
> > temporary lookup tables with appropriate lookup flags.
>
> ...
>
> > + int3472->pled.gpio = skl_int3472_gpiod_get_from_temp_lookup(
> > + int3472->dev, path, agpio->pin_table[0],
> > + "int3472,privacy-led", polarity,
> > + GPIOD_OUT_LOW);
>
> Personally I found this style weird. I prefer to have longer line over
> the split on the parentheses.
>

I in turn prefer this one. Checkpatch doesn't complain either way so
I'll leave it to the maintainers of this driver to decide.

Bart

2023-09-27 12:47:43

by Hans de Goede

[permalink] [raw]
Subject: Re: [RFT PATCH 2/4] platform/x86: int3472: led: don't use gpiod_toggle_active_low()

HI,

On 9/27/23 09:02, Bartosz Golaszewski wrote:
> On Tue, Sep 26, 2023 at 5:27 PM Andy Shevchenko
> <[email protected]> wrote:
>>
>> On Tue, Sep 26, 2023 at 04:59:41PM +0200, Bartosz Golaszewski wrote:
>>> From: Bartosz Golaszewski <[email protected]>
>>>
>>> Instead of acpi_get_and_request_gpiod() + gpiod_toggle_active_low(), use
>>> temporary lookup tables with appropriate lookup flags.
>>
>> ...
>>
>>> + int3472->pled.gpio = skl_int3472_gpiod_get_from_temp_lookup(
>>> + int3472->dev, path, agpio->pin_table[0],
>>> + "int3472,privacy-led", polarity,
>>> + GPIOD_OUT_LOW);
>>
>> Personally I found this style weird. I prefer to have longer line over
>> the split on the parentheses.
>>
>
> I in turn prefer this one. Checkpatch doesn't complain either way so
> I'll leave it to the maintainers of this driver to decide.

I'm fine with keeping this as is, using longer lines does not seem to make
things better here.

Regards,

Hans