Re: [PATCH 1/3] ASoC: wm8962: implement GPIO .get callback
From: Laurentiu Mihalcea
Date: Tue Dec 01 2026 - 16:36:38 EST
Hey Charles,
On 11/30/2026 1:18 PM, Charles Keepax wrote:
> On Fri, Nov 27, 2026 at 07:00:37PM +0200, Laurentiu Mihalcea wrote:
>> + /*
>> + * only GPIO5/GPIO6 can be used as inputs! Note the difference between the GPIO
>> + * index and the register offset.
>> + */
>> + if (offset != 4 && offset != 5) {
>> + dev_err(component->dev, "Only GPIO5/GPIO6 can be used as inputs!\n");
>> + return -EINVAL;
>> + }
> I feel like it would be better to add a direction_input callback
> and fail there for the other GPIOs. Better to not allow setting
> the GPIO to an input than to error out whilst reading it.
Yeah, I think this makes sense. To be addressed in V2. Thanks!