Linux PWM subsystem development
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Jonathan Cameron <jic23@kernel.org>,
	Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: robh@kernel.org, conor+dt@kernel.org, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pwm@vger.kernel.org,
	Conor Dooley <conor.dooley@microchip.com>
Subject: Re: [PATCH v9 7/8] dt-bindings: iio: adc: add ad4851
Date: Wed, 8 Jan 2025 10:48:18 -0600	[thread overview]
Message-ID: <e1e38f64-4cf4-4f12-bf9d-e7520d4e5721@baylibre.com> (raw)
In-Reply-To: <20241223114008.71e00bee@jic23-huawei>

On 12/23/24 5:40 AM, Jonathan Cameron wrote:
> On Fri, 20 Dec 2024 14:01:33 +0200
> Antoniu Miclaus <antoniu.miclaus@analog.com> wrote:
> 
>> Add devicetree bindings for ad485x family.
>>
>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> Mixed single end and differential channel devices that have per channel
> child nodes need a more complex description to avoid reg have different
> and possibly clashing meanings for the two types of channel.
> 
> See inline.
> 

...

>> +patternProperties:
>> +  "^channel(@[0-7])?$":
>> +    $ref: adc.yaml
>> +    type: object
>> +    description: Represents the channels which are connected to the ADC.
>> +
>> +    properties:
>> +      reg:
>> +        description: The channel number in single-ended mode.
> 
> And what is it in differential mode?  (usually just an index).
> Which is a problem if you have a mix.  That's why we added
> single-channel.

This chip isn't a mix-and match like many chips with muxes that use this binding
so I think it should just be diff-channels = <0 0>; similar to adi,ad7606. The
pins on the chip are labeled IN0+ and IN0- so it makes sense that both the
positive and negative inputs to be 0.

So, this should be fine with or without a single-channel property since reg
should always have the same number as diff-channels and single-channel.

> 
> So for devices where reg isn't enough, you can use:
> reg: index of channel, not real meaning just makes them unique.
> single-channel: The channel number for single ended.
> diff-channels: The channel numbers for differential channels.
> 
>> +        minimum: 0
>> +        maximum: 7
>> +
>> +      diff-channels: true
> 
> Should be constraints / information on the values possible.
> I've no idea what the 8 is in your example for instance.
> 

  reply	other threads:[~2025-01-08 16:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20 12:01 [PATCH v9 1/8] iio: backend: add API for interface get Antoniu Miclaus
2024-12-20 12:01 ` [PATCH v9 2/8] iio: backend: add support for data size set Antoniu Miclaus
2024-12-20 12:01 ` [PATCH v9 3/8] iio: backend: add API for oversampling Antoniu Miclaus
2024-12-20 12:01 ` [PATCH v9 4/8] iio: adc: adi-axi-adc: add interface type Antoniu Miclaus
2024-12-20 12:01 ` [PATCH v9 5/8] iio: adc: adi-axi-adc: set data format Antoniu Miclaus
2024-12-20 12:01 ` [PATCH v9 6/8] iio: adc: adi-axi-adc: add oversampling Antoniu Miclaus
2024-12-20 12:01 ` [PATCH v9 7/8] dt-bindings: iio: adc: add ad4851 Antoniu Miclaus
2024-12-23 11:40   ` Jonathan Cameron
2025-01-08 16:48     ` David Lechner [this message]
2024-12-20 12:01 ` [PATCH v9 8/8] iio: adc: ad4851: add ad485x driver Antoniu Miclaus
2024-12-23 12:00   ` Jonathan Cameron
2025-01-08 17:06     ` David Lechner
2025-01-08 23:24   ` David Lechner
2025-01-14 12:01     ` Miclaus, Antoniu
2025-01-14 13:20       ` Jonathan Cameron
2025-01-14 15:51         ` David Lechner
2025-01-17  9:59   ` Uwe Kleine-König
2025-01-17 15:43     ` Jonathan Cameron
2024-12-23 11:33 ` [PATCH v9 1/8] iio: backend: add API for interface get Jonathan Cameron

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=e1e38f64-4cf4-4f12-bf9d-e7520d4e5721@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=antoniu.miclaus@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --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