Re: [PATCH] pinctrl: pinctrl-cy8c95x0: Fix regcache

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

 



On Mon, Sep 2, 2024 at 10:30 AM Patrick Rudolph
<patrick.rudolph@xxxxxxxxxxxxx> wrote:
>
> The size of the mux stride was of by one, which could result in

off

> invalid pin configuration on the device side or invalid state
> readings on the software side.
>
> While on it also update the code and:
> - Increase the mux stride size to 16
> - Align the virtual muxed regmap range to 16
> - Start the regmap window at the selector
> - Mark reserved registers as not-readable

Reported-by: Andy Shevchenko <andy@xxxxxxxxxx>
Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>

...

> -       if (reg >= CY8C95X0_VIRTUAL)
> +       if (reg >= CY8C95X0_VIRTUAL && (reg % MUXED_STRIDE) < 12)

Probably good to have 12 defined, but also a comment suffice, like:

/* Only 12 registers are present per port (see Table 6 in the datasheet). */

>                 return true;


-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux