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

2017-01-09 Thread Linus Walleij
On Thu, Jan 5, 2017 at 1:00 PM, Mark Brown wrote: > The system itself is controlling > a power line, it knows nothing about what's connected. It seems like > this is coming up often enough that someone should probably just write > an external system control binding, also

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

2017-01-09 Thread Linus Walleij
On Thu, Jan 5, 2017 at 1:00 PM, Mark Brown wrote: > The system itself is controlling > a power line, it knows nothing about what's connected. It seems like > this is coming up often enough that someone should probably just write > an external system control binding, also tying in things like

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

2017-01-05 Thread Mark Brown
On Fri, Dec 23, 2016 at 01:56:11PM +0100, Geert Uytterhoeven wrote: > On Fri, Dec 23, 2016 at 12:35 PM, Lars-Peter Clausen wrote: > > cooperation between kernel- and userspace. Kernelspace offering an interface > > to export a device for userspace access and userspace making use

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

2017-01-05 Thread Mark Brown
On Fri, Dec 23, 2016 at 01:56:11PM +0100, Geert Uytterhoeven wrote: > On Fri, Dec 23, 2016 at 12:35 PM, Lars-Peter Clausen wrote: > > cooperation between kernel- and userspace. Kernelspace offering an interface > > to export a device for userspace access and userspace making use of that > >

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

2016-12-28 Thread Linus Walleij
On Fri, Dec 23, 2016 at 12:35 PM, Lars-Peter Clausen wrote: > On 12/23/2016 11:00 AM, Geert Uytterhoeven wrote: > Well, it is a policy question. Who gets access to what. Right now it is all > or nothing, a privileged application gets access to all devices/GPIOs, a > unprivileged

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

2016-12-28 Thread Linus Walleij
On Fri, Dec 23, 2016 at 12:35 PM, Lars-Peter Clausen wrote: > On 12/23/2016 11:00 AM, Geert Uytterhoeven wrote: > Well, it is a policy question. Who gets access to what. Right now it is all > or nothing, a privileged application gets access to all devices/GPIOs, a > unprivileged application gets

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

2016-12-28 Thread Linus Walleij
On Tue, Dec 13, 2016 at 3:28 PM, Bartosz Golaszewski wrote: > + Linus > > While the new GPIO interface would be very convenient - in our case we > could simply name the lines appropriately in the device tree - I'm not > sure this would be the correct approach. > > From

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

2016-12-28 Thread Linus Walleij
On Tue, Dec 13, 2016 at 3:28 PM, Bartosz Golaszewski wrote: > + Linus > > While the new GPIO interface would be very convenient - in our case we > could simply name the lines appropriately in the device tree - I'm not > sure this would be the correct approach. > > From this year's ELCE in Berlin

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

2016-12-24 Thread Jonathan Cameron
On 23 December 2016 12:56:11 GMT+00:00, Geert Uytterhoeven wrote: >Hi Lars, > >On Fri, Dec 23, 2016 at 12:35 PM, Lars-Peter Clausen >wrote: >> On 12/23/2016 11:00 AM, Geert Uytterhoeven wrote: >>> On Mon, Dec 12, 2016 at 6:15 PM, Lars-Peter Clausen

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

2016-12-24 Thread Jonathan Cameron
On 23 December 2016 12:56:11 GMT+00:00, Geert Uytterhoeven wrote: >Hi Lars, > >On Fri, Dec 23, 2016 at 12:35 PM, Lars-Peter Clausen >wrote: >> On 12/23/2016 11:00 AM, Geert Uytterhoeven wrote: >>> On Mon, Dec 12, 2016 at 6:15 PM, Lars-Peter Clausen > wrote: On 12/06/2016 12:12 PM,

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

2016-12-23 Thread Geert Uytterhoeven
Hi Lars, On Fri, Dec 23, 2016 at 12:35 PM, Lars-Peter Clausen wrote: > On 12/23/2016 11:00 AM, Geert Uytterhoeven wrote: >> On Mon, Dec 12, 2016 at 6:15 PM, Lars-Peter Clausen wrote: >>> On 12/06/2016 12:12 PM, Bartosz Golaszewski wrote: We're already

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

2016-12-23 Thread Geert Uytterhoeven
Hi Lars, On Fri, Dec 23, 2016 at 12:35 PM, Lars-Peter Clausen wrote: > On 12/23/2016 11:00 AM, Geert Uytterhoeven wrote: >> On Mon, Dec 12, 2016 at 6:15 PM, Lars-Peter Clausen wrote: >>> On 12/06/2016 12:12 PM, Bartosz Golaszewski wrote: We're already using libiio to read the measured data

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

2016-12-23 Thread Lars-Peter Clausen
On 12/23/2016 11:00 AM, Geert Uytterhoeven wrote: > Hi Lars, > > On Mon, Dec 12, 2016 at 6:15 PM, Lars-Peter Clausen wrote: >> On 12/06/2016 12:12 PM, Bartosz Golaszewski wrote: >>> We're already using libiio to read the measured data from the power >>> monitor, that's why we'd

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

2016-12-23 Thread Lars-Peter Clausen
On 12/23/2016 11:00 AM, Geert Uytterhoeven wrote: > Hi Lars, > > On Mon, Dec 12, 2016 at 6:15 PM, Lars-Peter Clausen wrote: >> On 12/06/2016 12:12 PM, Bartosz Golaszewski wrote: >>> We're already using libiio to read the measured data from the power >>> monitor, that's why we'd like to use the

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

2016-12-23 Thread Geert Uytterhoeven
Hi Lars, On Mon, Dec 12, 2016 at 6:15 PM, Lars-Peter Clausen wrote: > On 12/06/2016 12:12 PM, Bartosz Golaszewski wrote: >> We're already using libiio to read the measured data from the power >> monitor, that's why we'd like to use the iio framework for >> power-cycling the

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

2016-12-23 Thread Geert Uytterhoeven
Hi Lars, On Mon, Dec 12, 2016 at 6:15 PM, Lars-Peter Clausen wrote: > On 12/06/2016 12:12 PM, Bartosz Golaszewski wrote: >> We're already using libiio to read the measured data from the power >> monitor, that's why we'd like to use the iio framework for >> power-cycling the devices as well. My

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

2016-12-13 Thread Bartosz Golaszewski
2016-12-12 18:15 GMT+01:00 Lars-Peter Clausen : > On 12/06/2016 12:12 PM, Bartosz Golaszewski wrote: [snip!] >> >> So the problem we have is not power-cycling the adc - it's >> power-cycling the device connected to a probe on which there's an adc. >> What I was trying to do was

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

2016-12-13 Thread Bartosz Golaszewski
2016-12-12 18:15 GMT+01:00 Lars-Peter Clausen : > On 12/06/2016 12:12 PM, Bartosz Golaszewski wrote: [snip!] >> >> So the problem we have is not power-cycling the adc - it's >> power-cycling the device connected to a probe on which there's an adc. >> What I was trying to do was adding support

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

2016-12-12 Thread Lars-Peter Clausen
On 12/06/2016 12:12 PM, Bartosz Golaszewski wrote: > 2016-12-03 10:11 GMT+01:00 Jonathan Cameron : >> On 30/11/16 10:10, Lars-Peter Clausen wrote: >>> On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : > On

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

2016-12-12 Thread Lars-Peter Clausen
On 12/06/2016 12:12 PM, Bartosz Golaszewski wrote: > 2016-12-03 10:11 GMT+01:00 Jonathan Cameron : >> On 30/11/16 10:10, Lars-Peter Clausen wrote: >>> On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : > On 11/29/2016 04:22 PM, Bartosz

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

2016-12-11 Thread Bartosz Golaszewski
2016-12-10 19:17 GMT+01:00 Jonathan Cameron : > On 06/12/16 11:12, Bartosz Golaszewski wrote: >> >> I wrote the initial patch quickly and didn't give it much of a >> thought. Now I realized I completely missed the point and managed to >> confuse everybody - myself included. >> >>

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

2016-12-11 Thread Bartosz Golaszewski
2016-12-10 19:17 GMT+01:00 Jonathan Cameron : > On 06/12/16 11:12, Bartosz Golaszewski wrote: >> >> I wrote the initial patch quickly and didn't give it much of a >> thought. Now I realized I completely missed the point and managed to >> confuse everybody - myself included. >> >> So the problem we

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

2016-12-10 Thread Jonathan Cameron
On 06/12/16 11:12, Bartosz Golaszewski wrote: > 2016-12-03 10:11 GMT+01:00 Jonathan Cameron : >> On 30/11/16 10:10, Lars-Peter Clausen wrote: >>> On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : > On

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

2016-12-10 Thread Jonathan Cameron
On 06/12/16 11:12, Bartosz Golaszewski wrote: > 2016-12-03 10:11 GMT+01:00 Jonathan Cameron : >> On 30/11/16 10:10, Lars-Peter Clausen wrote: >>> On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : > On 11/29/2016 04:22 PM, Bartosz

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

2016-12-06 Thread Bartosz Golaszewski
2016-12-03 10:11 GMT+01:00 Jonathan Cameron : > On 30/11/16 10:10, Lars-Peter Clausen wrote: >> On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: >>> 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : On 11/29/2016 04:22 PM, Bartosz Golaszewski wrote:

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

2016-12-06 Thread Bartosz Golaszewski
2016-12-03 10:11 GMT+01:00 Jonathan Cameron : > On 30/11/16 10:10, Lars-Peter Clausen wrote: >> On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: >>> 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : On 11/29/2016 04:22 PM, Bartosz Golaszewski wrote: [...] > diff --git

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

2016-12-03 Thread Jonathan Cameron
On 30/11/16 10:10, Lars-Peter Clausen wrote: > On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: >> 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : >>> On 11/29/2016 04:22 PM, Bartosz Golaszewski wrote: >>> [...] diff --git

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

2016-12-03 Thread Jonathan Cameron
On 30/11/16 10:10, Lars-Peter Clausen wrote: > On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: >> 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : >>> On 11/29/2016 04:22 PM, Bartosz Golaszewski wrote: >>> [...] diff --git a/Documentation/devicetree/bindings/iio/misc/iio-regulator.txt

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

2016-12-01 Thread Bartosz Golaszewski
2016-11-30 11:10 GMT+01:00 Lars-Peter Clausen : > On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: >> 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : >>> On 11/29/2016 04:22 PM, Bartosz Golaszewski wrote: >>> [...] diff --git

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

2016-12-01 Thread Bartosz Golaszewski
2016-11-30 11:10 GMT+01:00 Lars-Peter Clausen : > On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: >> 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : >>> On 11/29/2016 04:22 PM, Bartosz Golaszewski wrote: >>> [...] diff --git a/Documentation/devicetree/bindings/iio/misc/iio-regulator.txt

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

2016-11-30 Thread Lars-Peter Clausen
On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: > 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : >> On 11/29/2016 04:22 PM, Bartosz Golaszewski wrote: >> [...] >>> diff --git a/Documentation/devicetree/bindings/iio/misc/iio-regulator.txt >>>

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

2016-11-30 Thread Lars-Peter Clausen
On 11/29/2016 04:35 PM, Bartosz Golaszewski wrote: > 2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : >> On 11/29/2016 04:22 PM, Bartosz Golaszewski wrote: >> [...] >>> diff --git a/Documentation/devicetree/bindings/iio/misc/iio-regulator.txt >>>

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

2016-11-29 Thread Bartosz Golaszewski
2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : > 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 >>

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

2016-11-29 Thread Bartosz Golaszewski
2016-11-29 16:30 GMT+01:00 Lars-Peter Clausen : > 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

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

2016-11-29 Thread Lars-Peter Clausen
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 000..147458f > --- /dev/null > +++

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

2016-11-29 Thread Lars-Peter Clausen
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 000..147458f > --- /dev/null > +++

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

2016-11-29 Thread Bartosz Golaszewski
Some iio devices are powered externally by a regulator which, for example, can be used to power-cycle an adc. This patch proposes to add a simple driver representing a regulator to the iio framework which exports attributes allowing to manipulate the underlying hardware. The reason for

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

2016-11-29 Thread Bartosz Golaszewski
Some iio devices are powered externally by a regulator which, for example, can be used to power-cycle an adc. This patch proposes to add a simple driver representing a regulator to the iio framework which exports attributes allowing to manipulate the underlying hardware. The reason for