[PATCH 2/3] ASoC: pxa2xx: push gpio usage into arch code

Arnd Bergmann arnd at arndb.de
Tue May 5 12:59:33 PDT 2026


On Mon, Apr 27, 2026, at 17:58, Andy Shevchenko wrote:
> On Mon, Apr 27, 2026 at 04:46:30PM +0200, Arnd Bergmann wrote:
>
>> There are no remaining static platform_device users of pxa2xx ac97,
>> so the rest of that code path can go away as well.
>> 
>> Since nothing in the driver uses the gpio number now, constrain the use
>> of the legacy gpio interface to the architecture specific code.
>
> ...
>
>> +	if (cpu_is_pxa27x()) {
>>  		/* Assert reset using GPIOD_OUT_HIGH, because reset is GPIO_ACTIVE_LOW */
>>  		rst_gpio = devm_gpiod_get(&dev->dev, "reset", GPIOD_OUT_HIGH);
>> +		if (IS_ERR(rst_gpio))
>> +			rst_gpio = NULL;
>
> Have you seen my
> https://lore.kernel.org/r/20260415150412.365989-1-andriy.shevchenko@linux.intel.com
> ?
>
> Perhaps you can incorporate it into this mini-series, as it looks like that one
> hasn't been applied yet.

Done now. It was already similar to your version and after
addressing Mark's comment about error handling, I now squashed
it into this:

        if (cpu_is_pxa27x()) {
                /* Assert reset using GPIOD_OUT_HIGH, because reset is GPIO_ACTIVE_LOW */
                rst_gpio = devm_gpiod_get_optional(&dev->dev, "reset",
                                                   GPIOD_OUT_HIGH);
                if (IS_ERR(rst_gpio))
                        return dev_err_probe(&dev->dev, PTR_ERR(rst_gpio),
                                             "reset gpio failed\n");
                ...
        }

       Arnd 



More information about the linux-arm-kernel mailing list