linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] pinctrl: microchip-sgpio: locking and synchronous output
@ 2022-02-26 20:45 Michael Walle
  2022-02-26 20:45 ` [PATCH v2 1/5] pinctrl: microchip-sgpio: lock RMW access Michael Walle
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Michael Walle @ 2022-02-26 20:45 UTC (permalink / raw)
  To: Lars Povlsen, Steen Hegelund, Linus Walleij
  Cc: UNGLinuxDriver, linux-arm-kernel, linux-gpio, linux-kernel,
	Colin Foster, Michael Walle

There are boards which use the output of the SGPIO to drive I2C muxers.
SGPIO right now is broken in a way that when the software sets this bit
there is a rather large delay until that value ends up on the hardware
pin.

While digging into this, I've noticed that there is no locking at all
in this driver. Add locking for all RWM accesses.

Please note, that parts of the modification of the first patch are
removed again in a later patch. This is because the first patch is
intended to be backported to the stable trees.

This was also just tested on a LAN9668 SoC. If you have additional
hardware, please test.

Changes since v1:
 - add Ocelot support

Michael Walle (5):
  pinctrl: microchip-sgpio: lock RMW access
  pinctrl: microchip-sgpio: don't do RMW for interrupt ack register
  pinctrl: microchip-sgpio: use regmap_update_bits()
  pinctrl: microchip-sgpio: return error in spgio_output_set()
  pinctrl: microchip-sgpio: wait until output is actually set

 drivers/pinctrl/pinctrl-microchip-sgpio.c | 112 +++++++++++++++++++---
 1 file changed, 97 insertions(+), 15 deletions(-)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-03-15  0:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-26 20:45 [PATCH v2 0/5] pinctrl: microchip-sgpio: locking and synchronous output Michael Walle
2022-02-26 20:45 ` [PATCH v2 1/5] pinctrl: microchip-sgpio: lock RMW access Michael Walle
2022-02-26 20:45 ` [PATCH v2 2/5] pinctrl: microchip-sgpio: don't do RMW for interrupt ack register Michael Walle
2022-02-26 20:45 ` [PATCH v2 3/5] pinctrl: microchip-sgpio: use regmap_update_bits() Michael Walle
2022-02-26 20:45 ` [PATCH v2 4/5] pinctrl: microchip-sgpio: return error in spgio_output_set() Michael Walle
2022-02-26 20:45 ` [PATCH v2 5/5] pinctrl: microchip-sgpio: wait until output is actually set Michael Walle
2022-03-15  0:57 ` [PATCH v2 0/5] pinctrl: microchip-sgpio: locking and synchronous output Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).