Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1533184

Re: [PATCH] iio: misc: add a generic regulator driver

From Lars-Peter Clausen <lars@metafoo.de>
Newsgroups linux.kernel
Subject Re: [PATCH] iio: misc: add a generic regulator driver
Date 2016-11-30 11:20 +0100
Message-ID <sJa9z-4PB-3@gated-at.bofh.it> (permalink)
References <sISw2-1KH-37@gated-at.bofh.it> <sISFI-1NU-21@gated-at.bofh.it> <sISFI-1NU-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote:
> 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen <lars@metafoo.de>:
>> On 11/29/2016 04:22 PM, Bartosz Golaszewski wrote:
>> [...]
>>> diff --git a/Documentation/devicetree/bindings/iio/misc/iio-regulator.txt b/Documentation/devicetree/bindings/iio/misc/iio-regulator.txt
>>> new file mode 100644
>>> index 0000000..147458f
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/iio/misc/iio-regulator.txt
>>> @@ -0,0 +1,18 @@
>>> +Industrial IO regulator device driver
>>> +-------------------------------------
>>> +
>>> +This document describes the bindings for the iio-regulator - a dummy device
>>> +driver representing a physical regulator within the iio framework.
>>
>> No bindings for drivers, only for hardware. So this wont work.
>>
> 
> What about exporting regulator attributes analogous to the one in this
> patch from the iio-core when a *-supply property is specified for a
> node?

The problem with exposing direct control to the regulator is that it allows
to modify the hardware state without the drivers knowledge. If you
power-cycle a device all previous configuration that has been written to the
device is reset. The device driver needs to be aware of this otherwise its
assumed state and the actual device state can divert which will result in
undefined behavior. Also access to the device will fail unexpectedly when
the regulator is turned off. So I think generally the driver should
explicitly control the regulator, power-up when needed, power-down when not.

- Lars

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] iio: misc: add a generic regulator driver Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-11-29 16:30 +0100
  Re: [PATCH] iio: misc: add a generic regulator driver Lars-Peter Clausen <lars@metafoo.de> - 2016-11-29 16:40 +0100
    Re: [PATCH] iio: misc: add a generic regulator driver Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-11-29 16:40 +0100
      Re: [PATCH] iio: misc: add a generic regulator driver Lars-Peter Clausen <lars@metafoo.de> - 2016-11-30 11:20 +0100
        Re: [PATCH] iio: misc: add a generic regulator driver Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-12-01 13:10 +0100
        Re: [PATCH] iio: misc: add a generic regulator driver Jonathan Cameron <jic23@kernel.org> - 2016-12-03 15:50 +0100
          Re: [PATCH] iio: misc: add a generic regulator driver Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-12-06 12:50 +0100
            Re: [PATCH] iio: misc: add a generic regulator driver Jonathan Cameron <jic23@kernel.org> - 2016-12-10 19:20 +0100

csiph-web