Re: [PATCH 5/6] platform/x86: int3472/discrete: Ensure the clk/power enable pins are in output mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 30, 2022 at 1:12 AM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> acpi_get_and_request_gpiod() does not take a gpio_lookup_flags argument
> specifying that the pins direction should be initialized to a specific
> value.
>
> This means that in some cases the pins might be left in input mode, causing
> the gpiod_set() calls made to enable the clk / regulator to not work.
>
> One example of this problem is the clk-enable GPIO for the ov01a1s sensor
> on a Dell Latitude 9420 being left in input mode causing the clk to
> never get enabled.
>
> Explicitly set the direction of the pins to output to fix this.

...

> +       /* Ensure the pin is in output mode */

...in output mode and non-active state */

> +       gpiod_direction_output(int3472->clock.ena_gpio, 0);

...

> +       /* Ensure the pin is in output mode */
> +       gpiod_direction_output(int3472->regulator.gpio, 0);

So, previously it was AS IS and now it's non-active state. I believe
this makes no regressions for the other laptops / platforms.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux