Re: [PATCH v5 2/8] gpio: regmap: Add quirk for aliased data registers

From
Andy Shevchenko <hidden>
Date
2021-06-12 21:31:10
Also in
linux-gpio, linux-leds, lkml
Reply to
Sander Vanheule, 2021-06-12
On Sun, Jun 13, 2021 at 12:13 AM Sander Vanheule [off-list ref] wrote:
Some chips have the read-only input and write-only output data registers
aliased to the same offset. As a result it is not possible to perform
read-modify-writes on the output values, when a line is still configured
as input.

Add a quirk for aliased data registers, and document how the regmap
should be set up for correct operation.
I still believe that there is no issue with gpio-regmap and we don't
need any quirk there.

The issue is in the regmap APIs (implementation) itself. Hardware with
the concept of reading X / writing Y at the same offset is okay per
se. regmaps doesn't support it properly and should be fixed (amended)
in a way that you provide this kind of register description thru
regmap configuration or so.

I expressed the idea of trying to implement regmap-8250 as an example
of the support for such hardware. And OTOH that this kind of hardware
is not unusual.

-- 
With Best Regards,
Andy Shevchenko
Thread (14 messages) 14 messages, 3 authors, last reply 2021-07-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help