Re: [PATCH v7 13/18] gpiolib: acpi: Set initial value for output pin based on bias and polarity

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

 



On Thu, Nov 12, 2020 at 12:20:03AM +0200, Andy Shevchenko wrote:
> From: Vasile-Laurentiu Stanimir <vasile-laurentiu.stanimir@xxxxxxxxxxxxx>
> 
> GpioIo() resources don't contain an initial value for the output pin.
> Therefore instead of deducting its value solely based on bias field
> we should deduce that value from the polarity and the bias fields.
> Typical scenario is, when pin is defined in the table and its polarity,
> specified in _DSD or via platform code, is defined as active low,
> in the following call chain:
> 
>   -> acpi_populate_gpio_lookup()
>      -> acpi_gpio_to_gpiod_flags()
> 
> it will return GPIOD_OUT_HIGH if bias is set no matter if polarity
> is GPIO_ACTIVE_LOW, so it will return the current level instead of
> the logical level.
> 
> Cc: Hans de Goede <hdegoede@xxxxxxxxxx>
> Cc: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>

Reviewed-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux