Re: [PATCH v1 2/5] ASoC: wm8904: Don't touch GPIO configs set to 0xFFFF

From: Charles Keepax
Date: Mon Feb 17 2025 - 05:03:33 EST


On Thu, Feb 06, 2025 at 05:31:49PM +0100, Francesco Dolcini wrote:
> From: Ernest Van Hoecke <ernest.vanhoecke@xxxxxxxxxxx>
>
> When updating the GPIO registers, do nothing for all fields of gpio_cfg
> that are "0xFFFF".
>
> This "do nothing" flag used to be 0 to easily check whether the gpio_cfg
> field was actually set inside pdata or left empty (default).
>
> However, 0 is a valid configuration for these registers, while 0xFFFF is
> not.
>
> With this change, users can explicitly set them to 0. Not setting
> gpio_cfg in the platform data will now lead to setting all GPIO
> registers to 0 instead of leaving them unset.
>
> No one is using this platform data with this codec.
>
> The change gets the driver ready to properly set gpio_cfg from the DT.
>
> Datasheet: https://statics.cirrus.com/pubs/proDatasheet/WM8904_Rev4.1.pdf
> Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@xxxxxxxxxxx>
> Signed-off-by: Francesco Dolcini <francesco.dolcini@xxxxxxxxxxx>
> ---

Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Thanks,
Charles