All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] regulator: Send events on over current condition
@ 2016-10-26 19:00 ahaslam
  2016-10-26 19:00 ` [RFC 1/3] regulator: core: Add over current changed event ahaslam
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: ahaslam @ 2016-10-26 19:00 UTC (permalink / raw)
  To: broonie, lgirdwood, khilman, nsekhar, david; +Cc: linux-kernel, Axel Haslam

From: Axel Haslam <ahaslam@baylibre.com>

Some usb drivers rely on external power switches/regulators to handle
the port vbus. Some of these drivers currently are still using gpios for
the enable pin and also the over current indicator.

We would like to move these drivers to use a regulator instead, because
it makes the driver generic allowing to use in the future any type of
regulator (maybe i2c based), And also it helps removing some code making
DT migration simpler and avoiding to add new bindings each time.

Vbus control is easy enough as the infrastructure to handle this
is in place using a fixed regulator for the simple gpio case.

Handling of the over current pin, however, needs some modifications
to the regulator framework, to be able to transmit the over current
pin status to the usb driver.

This is an attempt to extend the fixed regulator to handle the over
current pin, and send the status via a notification with minimal
framework changes, avoiding to use get_status which would have to 
be exported to consumers or get_mode which is not supposed to be
used for this purpose.

Axel Haslam (3):
  regulator: core: Add over current changed event
  regulator: fixed: Handle optional overcurrent pin
  regulator: fixed: dt: Allow an optional over current pin

 .../bindings/regulator/fixed-regulator.txt         |  4 ++
 drivers/regulator/fixed.c                          | 55 ++++++++++++++++++++++
 include/linux/regulator/consumer.h                 |  2 +
 include/linux/regulator/fixed.h                    |  3 ++
 4 files changed, 64 insertions(+)

-- 
1.9.1

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

end of thread, other threads:[~2016-11-01 15:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-26 19:00 [PATCH 0/3] regulator: Send events on over current condition ahaslam
2016-10-26 19:00 ` [RFC 1/3] regulator: core: Add over current changed event ahaslam
2016-10-28 18:22   ` Mark Brown
2016-10-28 19:41     ` Axel Haslam
2016-10-29  8:50       ` Axel Haslam
2016-10-29 18:40       ` Mark Brown
2016-10-30 12:02         ` Axel Haslam
2016-10-31 16:22           ` Mark Brown
2016-11-01 15:47             ` Axel Haslam
2016-10-26 19:00 ` [RFC 2/3] regulator: fixed: Handle optional overcurrent pin ahaslam
2016-10-26 19:00 ` [RFC 3/3] regulator: fixed: dt: Allow an optional over current pin ahaslam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.