Re: [PATCH v2] i2c: pxa: move to generic GPIO recovery

From: Russell King - ARM Linux admin
Date: Sun Oct 04 2020 - 05:31:23 EST


On Sun, Oct 04, 2020 at 12:16:56PM +0300, Codrin Ciubotariu wrote:
> Starting with
> commit 75820314de26 ("i2c: core: add generic I2C GPIO recovery")
> GPIO bus recovery is supported by the I2C core, so we can remove the
> driver implementation and use that one instead.
>
> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@xxxxxxxxxxxxx>
> ---
>
> This patch is not tested.
>
> Changes in v2:
> - readded the pinctrl state change to default from the
> unprepare_recovery callback;

I don't think you've build tested this patch...

> diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
> index 35ca2c02c9b9..006cc1d5931f 100644
> --- a/drivers/i2c/busses/i2c-pxa.c
> +++ b/drivers/i2c/busses/i2c-pxa.c
> @@ -264,9 +264,6 @@ struct pxa_i2c {
> u32 hs_mask;
>
> struct i2c_bus_recovery_info recovery;
> - struct pinctrl *pinctrl;
> - struct pinctrl_state *pinctrl_default;
> - struct pinctrl_state *pinctrl_recovery;

i2c_pxa_unprepare_recovery() refers to pinctrl and pinctrl_default which
you've retained in this version of the patch, but you've deleted the
members from this structure - which will lead to a build error.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!