All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation: dt: i2c: Add LPS001WP to the Trivial Devices list
@ 2013-09-04 13:50 Lee Jones
  2013-09-04 14:24 ` Mark Rutland
  0 siblings, 1 reply; 9+ messages in thread
From: Lee Jones @ 2013-09-04 13:50 UTC (permalink / raw)
  To: linux-kernel, wsa; +Cc: jic23, linux-iio, mark.rutland, Lee Jones

LPS001WP is a Pressure and Temperature sensor.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
index ad6a738..6038807e6 100644
--- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
@@ -57,6 +57,7 @@ st-micro,24c256		i2c serial eeprom  (24cxx)
 stm,m41t00		Serial Access TIMEKEEPER
 stm,m41t62		Serial real-time clock (RTC) with alarm
 stm,m41t80		M41T80 - SERIAL ACCESS RTC WITH ALARMS
+stm,lps001wp		Pressure and Temperature sensor
 taos,tsl2550		Ambient Light Sensor with SMBUS/Two Wire Serial Interface
 ti,tsc2003		I2C Touch-Screen Controller
 ti,tmp102		Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface
-- 
1.8.1.2


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

* Re: [PATCH] Documentation: dt: i2c: Add LPS001WP to the Trivial Devices list
  2013-09-04 13:50 [PATCH] Documentation: dt: i2c: Add LPS001WP to the Trivial Devices list Lee Jones
@ 2013-09-04 14:24 ` Mark Rutland
  2013-09-04 15:11   ` Lee Jones
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Rutland @ 2013-09-04 14:24 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, wsa, jic23, linux-iio, devicetree@vger.kernel.org

Hi Lee,

Cheers for producing a binding.

On Wed, Sep 04, 2013 at 02:50:55PM +0100, Lee Jones wrote:
> LPS001WP is a Pressure and Temperature sensor.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> index ad6a738..6038807e6 100644
> --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> @@ -57,6 +57,7 @@ st-micro,24c256		i2c serial eeprom  (24cxx)
>  stm,m41t00		Serial Access TIMEKEEPER
>  stm,m41t62		Serial real-time clock (RTC) with alarm
>  stm,m41t80		M41T80 - SERIAL ACCESS RTC WITH ALARMS
> +stm,lps001wp		Pressure and Temperature sensor

As I hinted at in the other thread [1], I don't think this can be
documented as a trivial binding -- the driver expects a couple of
regulators which should be described in the binding (or the driver
shouldn't be using them...).

Also, in the other thread the "st," prefix was used [2], while "stm," is
listed at the prefix in the binding. As far as I can see, "st," should
be used, as it's in vendor-prefixes and "stm," is not.

I'm happy to cook up a patch adding deprecation notes and corrected
strings for the existing incorrect "stm," bindings.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-September/196561.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-September/196558.html

Thanks,
Mark.

>  taos,tsl2550		Ambient Light Sensor with SMBUS/Two Wire Serial Interface
>  ti,tsc2003		I2C Touch-Screen Controller
>  ti,tmp102		Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface
> -- 
> 1.8.1.2
> 
> 

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

* Re: [PATCH] Documentation: dt: i2c: Add LPS001WP to the Trivial Devices list
  2013-09-04 14:24 ` Mark Rutland
@ 2013-09-04 15:11   ` Lee Jones
  2013-09-04 16:33     ` Lee Jones
  2013-09-05 11:30       ` Mark Rutland
  0 siblings, 2 replies; 9+ messages in thread
From: Lee Jones @ 2013-09-04 15:11 UTC (permalink / raw)
  To: Mark Rutland, sa; +Cc: linux-kernel, jic23, linux-iio

> Cheers for producing a binding.
> 
> On Wed, Sep 04, 2013 at 02:50:55PM +0100, Lee Jones wrote:
> > LPS001WP is a Pressure and Temperature sensor.
> > 
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > index ad6a738..6038807e6 100644
> > --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > @@ -57,6 +57,7 @@ st-micro,24c256		i2c serial eeprom  (24cxx)
> >  stm,m41t00		Serial Access TIMEKEEPER
> >  stm,m41t62		Serial real-time clock (RTC) with alarm
> >  stm,m41t80		M41T80 - SERIAL ACCESS RTC WITH ALARMS
> > +stm,lps001wp		Pressure and Temperature sensor
> 
> As I hinted at in the other thread [1], I don't think this can be
> documented as a trivial binding -- the driver expects a couple of
> regulators which should be described in the binding (or the driver
> shouldn't be using them...).

Surely all devices need to be powered and would subsequently require a
regulator of one description or other? We don't really *need* to
manually enable it on my platform but that's because it's 'always
on', but we do anyway for completeness.

Would a (regulator: vdd) note in this patch be suitable? It seems a
shame to have to produce a boilerplate binding entry for the sake of a
regulator.

Wolfram, what's the common procedure in cases such as these?

> Also, in the other thread the "st," prefix was used [2], while "stm," is
> listed at the prefix in the binding. As far as I can see, "st," should
> be used, as it's in vendor-prefixes and "stm," is not.
> 
> I'm happy to cook up a patch adding deprecation notes and corrected
> strings for the existing incorrect "stm," bindings.

Sure, feel free.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] Documentation: dt: i2c: Add LPS001WP to the Trivial Devices list
  2013-09-04 15:11   ` Lee Jones
@ 2013-09-04 16:33     ` Lee Jones
  2013-09-05 11:30       ` Mark Rutland
  1 sibling, 0 replies; 9+ messages in thread
From: Lee Jones @ 2013-09-04 16:33 UTC (permalink / raw)
  To: Mark Rutland, wsa; +Cc: linux-kernel, jic23, linux-iio

Looping Wolfram back in, as I cocked up his email address.

> Cheers for producing a binding.
> 
> On Wed, Sep 04, 2013 at 02:50:55PM +0100, Lee Jones wrote:
> > LPS001WP is a Pressure and Temperature sensor.
> > 
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > index ad6a738..6038807e6 100644
> > --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > @@ -57,6 +57,7 @@ st-micro,24c256		i2c serial eeprom  (24cxx)
> >  stm,m41t00		Serial Access TIMEKEEPER
> >  stm,m41t62		Serial real-time clock (RTC) with alarm
> >  stm,m41t80		M41T80 - SERIAL ACCESS RTC WITH ALARMS
> > +stm,lps001wp		Pressure and Temperature sensor
> 
> As I hinted at in the other thread [1], I don't think this can be
> documented as a trivial binding -- the driver expects a couple of
> regulators which should be described in the binding (or the driver
> shouldn't be using them...).

Surely all devices need to be powered and would subsequently require a
regulator of one description or other? We don't really *need* to
manually enable it on my platform but that's because it's 'always
on', but we do anyway for completeness.

Would a (regulator: vdd) note in this patch be suitable? It seems a
shame to have to produce a boilerplate binding entry for the sake of a
regulator.

Wolfram, what's the common procedure in cases such as these?

> Also, in the other thread the "st," prefix was used [2], while "stm," is
> listed at the prefix in the binding. As far as I can see, "st," should
> be used, as it's in vendor-prefixes and "stm," is not.
> 
> I'm happy to cook up a patch adding deprecation notes and corrected
> strings for the existing incorrect "stm," bindings.

Sure, feel free.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] Documentation: dt: i2c: Add LPS001WP to the Trivial Devices list
  2013-09-04 15:11   ` Lee Jones
@ 2013-09-05 11:30       ` Mark Rutland
  2013-09-05 11:30       ` Mark Rutland
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Rutland @ 2013-09-05 11:30 UTC (permalink / raw)
  To: Lee Jones
  Cc: sa, linux-kernel, jic23, linux-iio, devicetree, Pawel Moll,
	swarren, ian.campbell, grant.likely, tomasz.figa, rob.herring,
	galak

On Wed, Sep 04, 2013 at 04:11:59PM +0100, Lee Jones wrote:
> > Cheers for producing a binding.
> > 
> > On Wed, Sep 04, 2013 at 02:50:55PM +0100, Lee Jones wrote:
> > > LPS001WP is a Pressure and Temperature sensor.
> > > 
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > ---
> > >  Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > > index ad6a738..6038807e6 100644
> > > --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > > +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > > @@ -57,6 +57,7 @@ st-micro,24c256		i2c serial eeprom  (24cxx)
> > >  stm,m41t00		Serial Access TIMEKEEPER
> > >  stm,m41t62		Serial real-time clock (RTC) with alarm
> > >  stm,m41t80		M41T80 - SERIAL ACCESS RTC WITH ALARMS
> > > +stm,lps001wp		Pressure and Temperature sensor
> > 
> > As I hinted at in the other thread [1], I don't think this can be
> > documented as a trivial binding -- the driver expects a couple of
> > regulators which should be described in the binding (or the driver
> > shouldn't be using them...).
> 
> Surely all devices need to be powered and would subsequently require a
> regulator of one description or other? We don't really *need* to
> manually enable it on my platform but that's because it's 'always
> on', but we do anyway for completeness.

They may or may not, that's a grey area. Regardless of whether you
actually need it, the driver is currently looking for two undocumented
entries in the DT. If you want to be able to use them, they must be
documented so that people know they exist, what format they are expected
to be, and what they actually represent.

We should not allow for undocumented ABIs.

> 
> Would a (regulator: vdd) note in this patch be suitable? It seems a
> shame to have to produce a boilerplate binding entry for the sake of a
> regulator.

I thought this could have two regulators (vdd and vms)? 

I also note that the device can also be attached to SPI. Do we have any
other devices which may be attached to either? Do we handle that, and if
so, how (do we have the same compatible string for both interfaces?)?

Thanks,
Mark.

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

* Re: [PATCH] Documentation: dt: i2c: Add LPS001WP to the Trivial Devices list
@ 2013-09-05 11:30       ` Mark Rutland
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Rutland @ 2013-09-05 11:30 UTC (permalink / raw)
  To: Lee Jones
  Cc: sa-z923LK4zBo2bacvFa/9K2g, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	jic23-KWPb1pKIrIJaa/9Udqfwiw, linux-iio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Pawel Moll,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A,
	tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, galak-sgV2jX0FEOL9JmXXK+q4OQ

On Wed, Sep 04, 2013 at 04:11:59PM +0100, Lee Jones wrote:
> > Cheers for producing a binding.
> > 
> > On Wed, Sep 04, 2013 at 02:50:55PM +0100, Lee Jones wrote:
> > > LPS001WP is a Pressure and Temperature sensor.
> > > 
> > > Signed-off-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> > > ---
> > >  Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > > index ad6a738..6038807e6 100644
> > > --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > > +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > > @@ -57,6 +57,7 @@ st-micro,24c256		i2c serial eeprom  (24cxx)
> > >  stm,m41t00		Serial Access TIMEKEEPER
> > >  stm,m41t62		Serial real-time clock (RTC) with alarm
> > >  stm,m41t80		M41T80 - SERIAL ACCESS RTC WITH ALARMS
> > > +stm,lps001wp		Pressure and Temperature sensor
> > 
> > As I hinted at in the other thread [1], I don't think this can be
> > documented as a trivial binding -- the driver expects a couple of
> > regulators which should be described in the binding (or the driver
> > shouldn't be using them...).
> 
> Surely all devices need to be powered and would subsequently require a
> regulator of one description or other? We don't really *need* to
> manually enable it on my platform but that's because it's 'always
> on', but we do anyway for completeness.

They may or may not, that's a grey area. Regardless of whether you
actually need it, the driver is currently looking for two undocumented
entries in the DT. If you want to be able to use them, they must be
documented so that people know they exist, what format they are expected
to be, and what they actually represent.

We should not allow for undocumented ABIs.

> 
> Would a (regulator: vdd) note in this patch be suitable? It seems a
> shame to have to produce a boilerplate binding entry for the sake of a
> regulator.

I thought this could have two regulators (vdd and vms)? 

I also note that the device can also be attached to SPI. Do we have any
other devices which may be attached to either? Do we handle that, and if
so, how (do we have the same compatible string for both interfaces?)?

Thanks,
Mark.

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

* Re: [PATCH] Documentation: dt: i2c: Add LPS001WP to the Trivial Devices list
@ 2013-09-05 11:40         ` Pawel Moll
  0 siblings, 0 replies; 9+ messages in thread
From: Pawel Moll @ 2013-09-05 11:40 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Lee Jones, sa, linux-kernel, jic23, linux-iio, devicetree,
	swarren, ian.campbell, grant.likely, tomasz.figa, rob.herring,
	galak

On Thu, 2013-09-05 at 12:30 +0100, Mark Rutland wrote:
> I also note that the device can also be attached to SPI. Do we have any
> other devices which may be attached to either? Do we handle that, and if
> so, how (do we have the same compatible string for both interfaces?)?

Theoretically you don't need anything to make it work - nodes being a
children of a I2C master will instantiate i2c_clients, offspring of a
SPI master will become spi_devices. Then you register two drivers - I2C
and SPI ones, probably sharing most of the code - both matching the same
compatible value. The I2C one will be bound only with the I2C nodes, the
same applies to SPI.

I hope :-)

Paweł



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

* Re: [PATCH] Documentation: dt: i2c: Add LPS001WP to the Trivial Devices list
@ 2013-09-05 11:40         ` Pawel Moll
  0 siblings, 0 replies; 9+ messages in thread
From: Pawel Moll @ 2013-09-05 11:40 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Lee Jones, sa-z923LK4zBo2bacvFa/9K2g,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	jic23-KWPb1pKIrIJaa/9Udqfwiw, linux-iio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A,
	tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, galak-sgV2jX0FEOL9JmXXK+q4OQ

On Thu, 2013-09-05 at 12:30 +0100, Mark Rutland wrote:
> I also note that the device can also be attached to SPI. Do we have any
> other devices which may be attached to either? Do we handle that, and if
> so, how (do we have the same compatible string for both interfaces?)?

Theoretically you don't need anything to make it work - nodes being a
children of a I2C master will instantiate i2c_clients, offspring of a
SPI master will become spi_devices. Then you register two drivers - I2C
and SPI ones, probably sharing most of the code - both matching the same
compatible value. The I2C one will be bound only with the I2C nodes, the
same applies to SPI.

I hope :-)

Paweł

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

* Re: [PATCH] Documentation: dt: i2c: Add LPS001WP to the Trivial Devices list
@ 2013-09-05 11:40         ` Pawel Moll
  0 siblings, 0 replies; 9+ messages in thread
From: Pawel Moll @ 2013-09-05 11:40 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Lee Jones, sa, linux-kernel, jic23, linux-iio, devicetree,
	swarren, ian.campbell, grant.likely, tomasz.figa, rob.herring,
	galak

On Thu, 2013-09-05 at 12:30 +0100, Mark Rutland wrote:
> I also note that the device can also be attached to SPI. Do we have any
> other devices which may be attached to either? Do we handle that, and if
> so, how (do we have the same compatible string for both interfaces?)?

Theoretically you don't need anything to make it work - nodes being a
children of a I2C master will instantiate i2c_clients, offspring of a
SPI master will become spi_devices. Then you register two drivers - I2C
and SPI ones, probably sharing most of the code - both matching the same
compatible value. The I2C one will be bound only with the I2C nodes, the
same applies to SPI.

I hope :-)

Pawe=C5=82

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

end of thread, other threads:[~2013-09-05 11:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-04 13:50 [PATCH] Documentation: dt: i2c: Add LPS001WP to the Trivial Devices list Lee Jones
2013-09-04 14:24 ` Mark Rutland
2013-09-04 15:11   ` Lee Jones
2013-09-04 16:33     ` Lee Jones
2013-09-05 11:30     ` Mark Rutland
2013-09-05 11:30       ` Mark Rutland
2013-09-05 11:40       ` Pawel Moll
2013-09-05 11:40         ` Pawel Moll
2013-09-05 11:40         ` Pawel Moll

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.