linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] gpio: pca954x: Add vcc regulator and enable it
@ 2016-07-29  3:39 Phil Reid
  2016-07-29  3:39 ` [PATCH v2 1/1] " Phil Reid
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Reid @ 2016-07-29  3:39 UTC (permalink / raw)
  To: linus.walleij, gnurou, linux-gpio; +Cc: Phil Reid

I have a system where the gpio device is attached to a gpio controlled
regulator. If not enabled prior to device probe it fails to load the
driver. Marking the regulator as always on does not always work as the
probe order changes and it's suspectible to race conditions.

I'm not aware of another way around this problem.

Changes from v1:
- Use devm_regulator_get instead of devm_regulator_get_optional.
  Core returns a dummy regultor that can be used if i doesn't exist.
  Simplify inital error handling.
- Add regulator_disable to probe error path.
- Add regulator_disable to remove.


Phil Reid (1):
  gpio: pca954x: Add vcc regulator and enable it

 drivers/gpio/gpio-pca953x.c | 41 ++++++++++++++++++++++++++++++++---------
 1 file changed, 32 insertions(+), 9 deletions(-)

-- 
1.8.3.1


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

end of thread, other threads:[~2016-08-11  8:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-29  3:39 [PATCH v2 0/1] gpio: pca954x: Add vcc regulator and enable it Phil Reid
2016-07-29  3:39 ` [PATCH v2 1/1] " Phil Reid
2016-08-11  8:14   ` 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).