Re: [PATCH 05/21] x86/platform: select legacy gpiolib interfaces where used

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

 



On Sat, Aug 9, 2025, at 12:00, Andy Shevchenko wrote:
> On Fri, Aug 08, 2025 at 05:17:49PM +0200, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@xxxxxxxx>
>> 
>> A few old machines have not been converted away from the old-style
>> gpiolib interfaces. Make these select the new CONFIG_GPIOLIB_LEGACY
>> symbol so the code still works where it is needed but can be left
>> out otherwise.
>
>> --- a/drivers/platform/x86/x86-android-tablets/Kconfig
>> +++ b/drivers/platform/x86/x86-android-tablets/Kconfig
>> @@ -8,6 +8,7 @@ config X86_ANDROID_TABLETS
>>  	depends on I2C && SPI && SERIAL_DEV_BUS
>>  	depends on GPIOLIB && PMIC_OPREGION
>>  	depends on ACPI && EFI && PCI
>> +	select GPIOLIB_LEGACY
>>  	select NEW_LEDS
>>  	select LEDS_CLASS
>>  	select POWER_SUPPLY
>
> Hmm... This is a surprising change. But I leave it to Hans.

I think the only function that still needs it is
x86_android_tablet_probe() doing

static struct gpio_keys_button *buttons;

                for (i = 0; i < dev_info->gpio_button_count; i++) {
                        ret = x86_android_tablet_get_gpiod(dev_info->gpio_button[i].chip,
                                                           dev_info->gpio_button[i].pin,
                                                           dev_info->gpio_button[i].button.desc,
                                                           false, GPIOD_IN, &gpiod);

                        buttons[i] = dev_info->gpio_button[i].button;
                        buttons[i].gpio = desc_to_gpio(gpiod);
                        /* Release GPIO descriptor so that gpio-keys can request it */
                        devm_gpiod_put(&x86_android_tablet_device->dev, gpiod);
                }

So the driver itself uses gpio descriptors, but it passes
some of them into another driver by number. There is probably
an easy workaround that I did not see.

      Arnd




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux