[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeHc23XXjSGkmgajmbJ4ZH1OrSL0FGRQNrDfvWdW6cRQQ@mail.gmail.com>
Date: Mon, 2 Sep 2024 12:27:47 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Patrick Rudolph <patrick.rudolph@...ements.com>
Cc: Linus Walleij <linus.walleij@...aro.org>, Andy Shevchenko <andy@...nel.org>,
naresh.solanki@...ements.com, broonie@...nel.org, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pinctrl: pinctrl-cy8c95x0: Fix regcache
On Mon, Sep 2, 2024 at 10:30 AM Patrick Rudolph
<patrick.rudolph@...ements.com> 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@...nel.org>
Reviewed-by: Andy Shevchenko <andy@...nel.org>
...
> - 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
Powered by blists - more mailing lists