[3/5] dt-bindings: iio: correct node names in examples
Commit Message
Do not use underscores and unneeded suffixes (e.g. i2c0) in node name in
examples.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
.../devicetree/bindings/iio/accel/adi,adis16201.yaml | 2 +-
.../devicetree/bindings/iio/accel/adi,adis16240.yaml | 2 +-
.../devicetree/bindings/iio/accel/adi,adxl313.yaml | 2 +-
.../devicetree/bindings/iio/accel/adi,adxl345.yaml | 4 ++--
.../devicetree/bindings/iio/accel/bosch,bma220.yaml | 2 +-
.../devicetree/bindings/iio/accel/nxp,fxls8962af.yaml | 4 ++--
Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml | 2 +-
Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 2 +-
Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml | 2 +-
.../devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml | 2 +-
.../devicetree/bindings/iio/adc/st,stmpe-adc.yaml | 8 +++-----
.../devicetree/bindings/iio/frequency/adf4371.yaml | 2 +-
.../devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml | 4 ++--
.../devicetree/bindings/iio/health/ti,afe4403.yaml | 2 +-
.../devicetree/bindings/iio/health/ti,afe4404.yaml | 2 +-
Documentation/devicetree/bindings/iio/humidity/dht11.yaml | 2 +-
.../devicetree/bindings/iio/humidity/ti,hdc2010.yaml | 2 +-
.../devicetree/bindings/iio/imu/adi,adis16460.yaml | 2 +-
.../devicetree/bindings/iio/imu/invensense,icm42600.yaml | 4 ++--
.../devicetree/bindings/iio/imu/nxp,fxos8700.yaml | 4 ++--
.../devicetree/bindings/iio/pressure/asc,dlhl60d.yaml | 2 +-
.../devicetree/bindings/iio/pressure/bmp085.yaml | 2 +-
.../bindings/iio/temperature/maxim,max31865.yaml | 2 +-
23 files changed, 30 insertions(+), 32 deletions(-)
Comments
On Wed, 18 Jan 2023 19:44:11 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> Do not use underscores and unneeded suffixes (e.g. i2c0) in node name in
> examples.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> diff --git a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
> index 6c5ad426a016..12f75ddc4a70 100644
> --- a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
> +++ b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
> @@ -42,7 +42,7 @@ examples:
> #address-cells = <1>;
> #size-cells = <0>;
>
> - heart_mon@0 {
> + heart-rate@0 {
These are both heart-rate and pulse oximeters so measure more than just
the rate (oxygen saturation in the blood). Reality is they actually
measure light absorption over time, but you can calculate an estimate
of both rate and oxygen saturation from that.
I don't really mind simplifying that to heart-rate, but wanted to
call this out for possible discussion.
> compatible = "ti,afe4403";
> reg = <0>;
> spi-max-frequency = <10000000>;
> diff --git a/Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml b/Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml
> index c0e815d9999e..b334f3e356ad 100644
> --- a/Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml
> +++ b/Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml
> @@ -39,7 +39,7 @@ examples:
> #address-cells = <1>;
> #size-cells = <0>;
>
> - heart_mon@58 {
> + heart-rate@58 {
> compatible = "ti,afe4404";
> reg = <0x58>;
> tx-supply = <&vbat>;
The rest are all fine. If no one comments I'll pick this up as it is in a few
days.
Jonathan
On 21/01/2023 18:17, Jonathan Cameron wrote:
> On Wed, 18 Jan 2023 19:44:11 +0100
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>
>> Do not use underscores and unneeded suffixes (e.g. i2c0) in node name in
>> examples.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>
>> diff --git a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
>> index 6c5ad426a016..12f75ddc4a70 100644
>> --- a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
>> +++ b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
>> @@ -42,7 +42,7 @@ examples:
>> #address-cells = <1>;
>> #size-cells = <0>;
>>
>> - heart_mon@0 {
>> + heart-rate@0 {
>
> These are both heart-rate and pulse oximeters so measure more than just
> the rate (oxygen saturation in the blood). Reality is they actually
> measure light absorption over time, but you can calculate an estimate
> of both rate and oxygen saturation from that.
>
> I don't really mind simplifying that to heart-rate, but wanted to
> call this out for possible discussion.
They could be heart-mon. The fix is mostly around the underscore. I
don't have any arguments for changing it to heart-rate, thus we can go
with whatever you prefer.
Best regards,
Krzysztof
On Sat, 21 Jan 2023 19:31:23 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> On 21/01/2023 18:17, Jonathan Cameron wrote:
> > On Wed, 18 Jan 2023 19:44:11 +0100
> > Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> >
> >> Do not use underscores and unneeded suffixes (e.g. i2c0) in node name in
> >> examples.
> >>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >> ---
> >
> >> diff --git a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
> >> index 6c5ad426a016..12f75ddc4a70 100644
> >> --- a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
> >> +++ b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
> >> @@ -42,7 +42,7 @@ examples:
> >> #address-cells = <1>;
> >> #size-cells = <0>;
> >>
> >> - heart_mon@0 {
> >> + heart-rate@0 {
> >
> > These are both heart-rate and pulse oximeters so measure more than just
> > the rate (oxygen saturation in the blood). Reality is they actually
> > measure light absorption over time, but you can calculate an estimate
> > of both rate and oxygen saturation from that.
> >
> > I don't really mind simplifying that to heart-rate, but wanted to
> > call this out for possible discussion.
>
> They could be heart-mon. The fix is mostly around the underscore. I
> don't have any arguments for changing it to heart-rate, thus we can go
> with whatever you prefer.
I'm fine with either and as we have a patch with heart-rate that wins
currently. I'll just let this sit for a little longer than
normal to see if we get any other responses!
Thanks,
Jonathan
>
> Best regards,
> Krzysztof
>
On Sun, Jan 22, 2023 at 05:01:05PM +0000, Jonathan Cameron wrote:
> On Sat, 21 Jan 2023 19:31:23 +0100
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>
> > On 21/01/2023 18:17, Jonathan Cameron wrote:
> > > On Wed, 18 Jan 2023 19:44:11 +0100
> > > Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> > >
> > >> Do not use underscores and unneeded suffixes (e.g. i2c0) in node name in
> > >> examples.
> > >>
> > >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > >> ---
> > >
> > >> diff --git a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
> > >> index 6c5ad426a016..12f75ddc4a70 100644
> > >> --- a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
> > >> +++ b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
> > >> @@ -42,7 +42,7 @@ examples:
> > >> #address-cells = <1>;
> > >> #size-cells = <0>;
> > >>
> > >> - heart_mon@0 {
> > >> + heart-rate@0 {
> > >
> > > These are both heart-rate and pulse oximeters so measure more than just
> > > the rate (oxygen saturation in the blood). Reality is they actually
> > > measure light absorption over time, but you can calculate an estimate
> > > of both rate and oxygen saturation from that.
> > >
> > > I don't really mind simplifying that to heart-rate, but wanted to
> > > call this out for possible discussion.
> >
> > They could be heart-mon. The fix is mostly around the underscore. I
> > don't have any arguments for changing it to heart-rate, thus we can go
> > with whatever you prefer.
> I'm fine with either and as we have a patch with heart-rate that wins
> currently. I'll just let this sit for a little longer than
> normal to see if we get any other responses!
I don't care all that much until we've documented something. Otherwise,
we may be just changing things twice. We have the list in the spec, but
really I'd like that in schema form. We'd also need to figure out how to
use that. There's always going to be odd things which we don't have any
defined name.
For now, I'd just do 's/_/-/'.
Rob
On Wed, 18 Jan 2023 19:44:11 +0100, Krzysztof Kozlowski wrote:
> Do not use underscores and unneeded suffixes (e.g. i2c0) in node name in
> examples.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> .../devicetree/bindings/iio/accel/adi,adis16201.yaml | 2 +-
> .../devicetree/bindings/iio/accel/adi,adis16240.yaml | 2 +-
> .../devicetree/bindings/iio/accel/adi,adxl313.yaml | 2 +-
> .../devicetree/bindings/iio/accel/adi,adxl345.yaml | 4 ++--
> .../devicetree/bindings/iio/accel/bosch,bma220.yaml | 2 +-
> .../devicetree/bindings/iio/accel/nxp,fxls8962af.yaml | 4 ++--
> Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml | 2 +-
> Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 2 +-
> Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml | 2 +-
> .../devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml | 2 +-
> .../devicetree/bindings/iio/adc/st,stmpe-adc.yaml | 8 +++-----
> .../devicetree/bindings/iio/frequency/adf4371.yaml | 2 +-
> .../devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml | 4 ++--
> .../devicetree/bindings/iio/health/ti,afe4403.yaml | 2 +-
> .../devicetree/bindings/iio/health/ti,afe4404.yaml | 2 +-
> Documentation/devicetree/bindings/iio/humidity/dht11.yaml | 2 +-
> .../devicetree/bindings/iio/humidity/ti,hdc2010.yaml | 2 +-
> .../devicetree/bindings/iio/imu/adi,adis16460.yaml | 2 +-
> .../devicetree/bindings/iio/imu/invensense,icm42600.yaml | 4 ++--
> .../devicetree/bindings/iio/imu/nxp,fxos8700.yaml | 4 ++--
> .../devicetree/bindings/iio/pressure/asc,dlhl60d.yaml | 2 +-
> .../devicetree/bindings/iio/pressure/bmp085.yaml | 2 +-
> .../bindings/iio/temperature/maxim,max31865.yaml | 2 +-
> 23 files changed, 30 insertions(+), 32 deletions(-)
>
Acked-by: Rob Herring <robh@kernel.org>
On 23/01/2023 21:33, Rob Herring wrote:
until we've documented something. Otherwise,
> we may be just changing things twice. We have the list in the spec, but
> really I'd like that in schema form. We'd also need to figure out how to
> use that. There's always going to be odd things which we don't have any
> defined name.
>
> For now, I'd just do 's/_/-/'.
I'll send a v2 with fixes.
Best regards,
Krzysztof
@@ -41,7 +41,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -39,7 +39,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -59,7 +59,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
- i2c0 {
+ i2c {
#address-cells = <1>;
#size-cells = <0>;
@@ -49,7 +49,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
- i2c0 {
+ i2c {
#address-cells = <1>;
#size-cells = <0>;
@@ -64,7 +64,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -36,7 +36,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -50,7 +50,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
- i2c0 {
+ i2c {
#address-cells = <1>;
#size-cells = <0>;
@@ -65,7 +65,7 @@ examples:
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -99,7 +99,7 @@ unevaluatedProperties: false
examples:
- |
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -112,7 +112,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -72,7 +72,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -50,7 +50,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
- spmi_bus {
+ spmi {
#address-cells = <1>;
#size-cells = <0>;
pmic_iadc: adc@3600 {
@@ -35,10 +35,8 @@ additionalProperties: false
examples:
- |
- stmpe {
- stmpe_adc {
- compatible = "st,stmpe-adc";
- st,norequest-mask = <0x0F>; /* dont use ADC CH3-0 */
- };
+ adc {
+ compatible = "st,stmpe-adc";
+ st,norequest-mask = <0x0f>; /* dont use ADC CH3-0 */
};
...
@@ -53,7 +53,7 @@ unevaluatedProperties: false
examples:
- |
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -65,7 +65,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
- i2c0 {
+ i2c {
#address-cells = <1>;
#size-cells = <0>;
@@ -81,7 +81,7 @@ examples:
interrupt-names = "INT1";
};
};
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -42,7 +42,7 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
- heart_mon@0 {
+ heart-rate@0 {
compatible = "ti,afe4403";
reg = <0>;
spi-max-frequency = <10000000>;
@@ -39,7 +39,7 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
- heart_mon@58 {
+ heart-rate@58 {
compatible = "ti,afe4404";
reg = <0x58>;
tx-supply = <&vbat>;
@@ -34,7 +34,7 @@ additionalProperties: false
examples:
- |
- humidity_sensor {
+ humidity-sensor {
compatible = "dht11";
gpios = <&gpio0 6 0>;
};
@@ -35,7 +35,7 @@ additionalProperties: false
examples:
- |
- i2c0 {
+ i2c {
#address-cells = <1>;
#size-cells = <0>;
@@ -42,7 +42,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -65,7 +65,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
- i2c0 {
+ i2c {
#address-cells = <1>;
#size-cells = <0>;
@@ -81,7 +81,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -49,7 +49,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
- i2c0 {
+ i2c {
#address-cells = <1>;
#size-cells = <0>;
@@ -65,7 +65,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
- spi0 {
+ spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -39,7 +39,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
- i2c0 {
+ i2c {
#address-cells = <1>;
#size-cells = <0>;
@@ -60,7 +60,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
- i2c0 {
+ i2c {
#address-cells = <1>;
#size-cells = <0>;
pressure@77 {
@@ -43,7 +43,7 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
- temp_sensor@0 {
+ temperature-sensor@0 {
compatible = "maxim,max31865";
reg = <0>;
spi-max-frequency = <400000>;