public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Conor Dooley <conor@kernel.org>
Cc: "Sperling, Tobias" <Tobias.Sperling@softing.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"jdelvare@suse.com" <jdelvare@suse.com>,
	"linux@roeck-us.net" <linux@roeck-us.net>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"corbet@lwn.net" <corbet@lwn.net>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: hwmon: Introduce ADS71x8
Date: Sat, 31 Aug 2024 13:21:59 +0100	[thread overview]
Message-ID: <20240831132159.2073994f@jic23-huawei> (raw)
In-Reply-To: <20240830-chaos-unrivaled-04c5c4c6add9@spud>


> > +  ti,mode:
> > +    $ref: /schemas/types.yaml#/definitions/uint8
> > +    description: |
> > +      Operation mode
> > +      Mode 0 - Manual mode. A channel is only sampled when the according input
> > +        in the sysfs is read.
> > +      Mode 1 - Auto mode. All channels are automatically sampled sequentially.
> > +        Reading an input returns the last valid sample. In this mode further
> > +        features like statistics and interrupts are available.
> > +    default: 0  
> 
> I don't think this ti,mode property is suitable for bindings. sysfs is a
> linux implementation detail, when to do sampling is an implementation
> detail of your driver. Bindings are only supposed to describe properties
> of the hardware, not set software policy.

Agreed. With an IIO driver this will become a switch based on what usespace
interfaces are enabled.
So if events are on or buffered data capture, enable automode.
If just sysfs reads, then manual mode is fine.


> > +
> > +        ads7138@10 {  
> 
> This should just be "dac@".

adc :)

> 
> > +            compatible = "ti,ads7138";
> > +            reg = <0x10>;
> > +            avdd-supply = <&reg_stb_3v3>;
> > +            ti,mode = /bits/ 8 <1>;
> > +            ti,interval = /bits/ 16 <1000>;
> > +            interrupt-parent = <&gpio2>;
> > +            interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
> > +            status = "okay";
> > +        };
> > +    };  
> oCheers,
> Conor.


  parent reply	other threads:[~2024-08-31 12:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-30 11:49 [PATCH 1/2] dt-bindings: hwmon: Introduce ADS71x8 Sperling, Tobias
2024-08-30 13:14 ` Conor Dooley
2024-08-30 14:30   ` Guenter Roeck
2024-08-31 12:18     ` Jonathan Cameron
2024-09-02 13:04       ` AW: " Sperling, Tobias
2024-09-03 19:40         ` Jonathan Cameron
2024-08-31 12:21   ` Jonathan Cameron [this message]
2024-09-02 13:24     ` AW: " Sperling, Tobias
2024-09-02 14:17       ` Jonathan Cameron
2024-09-02 12:58   ` AW: " Sperling, Tobias
2024-09-02 13:49     ` Guenter Roeck
2024-08-31  6:42 ` Krzysztof Kozlowski
2024-09-02 13:48   ` AW: " Sperling, Tobias
2024-09-02 16:02     ` Krzysztof Kozlowski
2024-09-02 17:01       ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240831132159.2073994f@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Tobias.Sperling@softing.com \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox