linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: iio: Document "label" property
@ 2021-12-21 10:43 Paul Cercueil
  2021-12-21 11:29 ` Lars-Peter Clausen
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Cercueil @ 2021-12-21 10:43 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring, Guido Günther
  Cc: linux-iio, devicetree, linux-kernel, Paul Cercueil

All iio devices can have a label, which will be carried on to userspace
as a sysfs attribute. This is useful when having several iio devices
that represent different instances of the same hardware, as the name
attribute would then not be enough to differentiate between them.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 Documentation/devicetree/bindings/iio/common.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/common.yaml b/Documentation/devicetree/bindings/iio/common.yaml
index f845b41d74c4..a90ad7718ecf 100644
--- a/Documentation/devicetree/bindings/iio/common.yaml
+++ b/Documentation/devicetree/bindings/iio/common.yaml
@@ -32,6 +32,14 @@ properties:
       considered 'near' to the device (an object is near to the
       sensor).
 
+  label:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: |
+      All iio devices can have a label, which will be carried on to userspace
+      as a sysfs attribute. This is useful when having several iio devices that
+      represent different instances of the same hardware, as the name attribute
+      would then not be enough to differentiate between them.
+
 additionalProperties: true
 
 ...
-- 
2.34.1


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

* Re: [PATCH] dt-bindings: iio: Document "label" property
  2021-12-21 10:43 [PATCH] dt-bindings: iio: Document "label" property Paul Cercueil
@ 2021-12-21 11:29 ` Lars-Peter Clausen
  2021-12-21 12:38   ` Paul Cercueil
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2021-12-21 11:29 UTC (permalink / raw)
  To: Paul Cercueil, Jonathan Cameron, Rob Herring, Guido Günther
  Cc: linux-iio, devicetree, linux-kernel

On 12/21/21 11:43 AM, Paul Cercueil wrote:
> All iio devices can have a label, which will be carried on to userspace
> as a sysfs attribute. This is useful when having several iio devices
> that represent different instances of the same hardware, as the name
> attribute would then not be enough to differentiate between them.
>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>   Documentation/devicetree/bindings/iio/common.yaml | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/common.yaml b/Documentation/devicetree/bindings/iio/common.yaml
> index f845b41d74c4..a90ad7718ecf 100644
> --- a/Documentation/devicetree/bindings/iio/common.yaml
> +++ b/Documentation/devicetree/bindings/iio/common.yaml
> @@ -32,6 +32,14 @@ properties:
>         considered 'near' to the device (an object is near to the
>         sensor).
>   
> +  label:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: |
> +      All iio devices can have a label, which will be carried on to userspace
> +      as a sysfs attribute. This is useful when having several iio devices that
> +      represent different instances of the same hardware, as the name attribute
> +      would then not be enough to differentiate between them.
> +

The description has a lot of implementation details of the Linux kernel. 
The devicetree bindings should be formulated operating system agnostic.

Something like:

A descriptive label that allows to uniquely identify the device within 
the system.


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

* Re: [PATCH] dt-bindings: iio: Document "label" property
  2021-12-21 11:29 ` Lars-Peter Clausen
@ 2021-12-21 12:38   ` Paul Cercueil
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Cercueil @ 2021-12-21 12:38 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Jonathan Cameron, Rob Herring, Guido Günther, linux-iio,
	devicetree, linux-kernel



Le mar., déc. 21 2021 at 12:29:04 +0100, Lars-Peter Clausen 
<lars@metafoo.de> a écrit :
> On 12/21/21 11:43 AM, Paul Cercueil wrote:
>> All iio devices can have a label, which will be carried on to 
>> userspace
>> as a sysfs attribute. This is useful when having several iio devices
>> that represent different instances of the same hardware, as the name
>> attribute would then not be enough to differentiate between them.
>> 
>> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>> ---
>>   Documentation/devicetree/bindings/iio/common.yaml | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>> 
>> diff --git a/Documentation/devicetree/bindings/iio/common.yaml 
>> b/Documentation/devicetree/bindings/iio/common.yaml
>> index f845b41d74c4..a90ad7718ecf 100644
>> --- a/Documentation/devicetree/bindings/iio/common.yaml
>> +++ b/Documentation/devicetree/bindings/iio/common.yaml
>> @@ -32,6 +32,14 @@ properties:
>>         considered 'near' to the device (an object is near to the
>>         sensor).
>>   \x7f+  label:
>> +    $ref: /schemas/types.yaml#/definitions/string
>> +    description: |
>> +      All iio devices can have a label, which will be carried on to 
>> userspace
>> +      as a sysfs attribute. This is useful when having several iio 
>> devices that
>> +      represent different instances of the same hardware, as the 
>> name attribute
>> +      would then not be enough to differentiate between them.
>> +
> 
> The description has a lot of implementation details of the Linux 
> kernel. The devicetree bindings should be formulated operating system 
> agnostic.
> 
> Something like:
> 
> A descriptive label that allows to uniquely identify the device 
> within the system.

Alright. I'll V2 ASAP.

Cheers,
-Paul



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

end of thread, other threads:[~2021-12-21 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21 10:43 [PATCH] dt-bindings: iio: Document "label" property Paul Cercueil
2021-12-21 11:29 ` Lars-Peter Clausen
2021-12-21 12:38   ` Paul Cercueil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).