Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Lars Povlsen <lars.povlsen@microchip.com>,
	Steen Hegelund <Steen.Hegelund@microchip.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: UNGLinuxDriver@microchip.com,
	linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Colin Foster <colin.foster@in-advantage.com>,
	Michael Walle <michael@walle.cc>
Subject: [PATCH v1 0/5] pinctrl: microchip-sgpio: locking and synchronous output
Date: Thu, 24 Feb 2022 17:10:16 +0100	[thread overview]
Message-ID: <20220224161021.2197263-1-michael@walle.cc> (raw)

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.

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 | 101 ++++++++++++++++++----
 1 file changed, 86 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

             reply	other threads:[~2022-02-24 16:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24 16:10 Michael Walle [this message]
2022-02-24 16:10 ` [PATCH v1 1/5] pinctrl: microchip-sgpio: lock RMW access Michael Walle
2022-02-24 16:10 ` [PATCH v1 2/5] pinctrl: microchip-sgpio: don't do RMW for interrupt ack register Michael Walle
2022-02-24 16:10 ` [PATCH v1 3/5] pinctrl: microchip-sgpio: use regmap_update_bits() Michael Walle
2022-02-24 16:10 ` [PATCH v1 4/5] pinctrl: microchip-sgpio: return error in spgio_output_set() Michael Walle
2022-02-24 16:10 ` [PATCH v1 5/5] pinctrl: microchip-sgpio: wait until output is actually set Michael Walle
2022-02-25  9:24   ` Horatiu Vultur
2022-02-25 11:29     ` Michael Walle
2022-02-25 16:54       ` Colin Foster
2022-02-26 20:54         ` Michael Walle
2022-03-04 12:09       ` Horatiu Vultur
2022-03-04 12:46         ` Michael Walle
2022-03-04 15:14           ` Horatiu Vultur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220224161021.2197263-1-michael@walle.cc \
    --to=michael@walle.cc \
    --cc=Steen.Hegelund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=colin.foster@in-advantage.com \
    --cc=lars.povlsen@microchip.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox