From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FCD11C5D4A for ; Wed, 22 Jan 2025 21:11:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737580291; cv=none; b=JA73e7aSjDwdw9kHFpXI1AVm1VAw7ekrnQR2JllVR3ZhM+zEOlyi73GgKXhBsSwAjxcwjH6hWwTmFVXBIuScvXOdXeP7fdOCSWPrJypyP1ElwZDthIloB6L14OO8Y0UzuQYyOPsqmghjjgahFA6fiWvnMudmy5wyj3z7/Wzk8Aw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737580291; c=relaxed/simple; bh=VIKGBgYoWMbg6XR3TPiepo8cZRgH/PGwl7uhQNXVrsE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VJfilmFwRRCCIxr46jRFNADZtf6d7/y9JpQWEXis9wuF9xhLglRg1y0MkXimxCjfWInm6Oebb9w7gchAJPtgvFh3o5HIsWtfTGvOa2R8qJ/vwa4Ad0yvK5ukedbOfvuB5faSBnSwSNoVKLWe1JAgRRxmQe3bfJBr+a5qAyzN/Ys= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=DZZFIy7Q; arc=none smtp.client-ip=209.85.210.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="DZZFIy7Q" Received: by mail-ot1-f51.google.com with SMTP id 46e09a7af769-71e1b1767b3so123227a34.3 for ; Wed, 22 Jan 2025 13:11:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1737580288; x=1738185088; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=8xM3yjtdAmtHlD0j2bHym2nn3LqAJkbUkAXtpadigko=; b=DZZFIy7Q0F1jbx70wJdpCvswEeXm2xPfZlTbcjTjLwdglY92/nnO3dNbWk0pcEa0Xk Hn3BsO48jUyMsDdjHlP91acwWoRfiuYOq8NJssaTvUzRE6NdYMTk5SDSBrJmuqa0w22S Zz+v0BERFkCokMjuZRjJyJBrGhc/GNJSa5rOke8tpDFIILAqvWHRQ1q+eyup6jnA3vfc BsHv70M2RfX17iIdPmjJHGHB+bysF1YEwXtgPoHd9R8fgteqzNDRZrayOFp1hMQ9SbhF DvxwRLG1qhSZeNxm1ny2m8vtqelZJ/rOxxHx3X7kxUZQQoZkz6nNKvlZ3NgxrZ+X6Cp0 mOCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737580288; x=1738185088; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8xM3yjtdAmtHlD0j2bHym2nn3LqAJkbUkAXtpadigko=; b=Mz4/KmytGPIlsiGqGJNoZSl/f/irXBl+yZx4DIF3xHQzwL+6Jv4dduv/c6AycZxt0L EligJCBbcKZXsMxZzbJsJbyzKeaiiwUQnz15O5BPj4ZBe4Wa4v+pq9ysB5TqprGwGsrO 054/vJ/O0WzaJoAI9fEdpgPiRVrJiiD4h5R8dq9ViRbCpBhzl3YImsEXo3ww1q4Lz2qV jMTCY/230N+OB9v9mYXNq3PvtrRhxWF2sD2mVgLvQFekfqWXlh7aRuysiyn1S/d0vITY 9zT1SODr6UDWf/aHuANzWEn9oL5LxhAdRU1jQ9Kq98v2xcYP1RHv9f4NEutc3/0619dq xmvQ== X-Forwarded-Encrypted: i=1; AJvYcCUKStVhA5v7WXMbFj7U7mixBpUk8lna7vAmIbVF48vOd+HTeud+9Jc6efQdQtPg0D6lC/vI7JYc4ZF5X8I=@vger.kernel.org X-Gm-Message-State: AOJu0Yzhzdkeu5V+tyG9kicWo92+M+xqfGVL9QCJAzYxnlcGlXUEBInO xjtSNn/jb7J4RDjJBMp7TxFgt5kAWW4XIV7jGEqsbj+wvfli7X/5t1iU8t2Q6c4= X-Gm-Gg: ASbGnctolBWt21qn/Q0a+Ds9bZNMO6xsf0HCQlxmDixDJ0R686wC5YSIsAcjkrxnULj vSQCYk7rC3OQN2zAR5uB8TacBh+DXXtlgTE8cV5VYr791gShHyYQAvUcuFma3Z1E8Qy/cW3lpNf NFGxHJuqumZAx6gC5tlyMCcxU7M0WAZvoWgdw8nCcR8EDBiJRzjQxUZ+Sr/aJ6VTy5UUOz7QhfE 5C6aa6gwSpTQxVb1FbRng+5lFimCMSdKRz8vJSQiQCHwjGzG0O61cyU4sxRG/THsWp9v+uHWThj N/zPbh9uT4lLO7KyMGTr3z7uFe/Kemg= X-Google-Smtp-Source: AGHT+IFGNbR+WVq028/i7Oy/AZ6q4XePR6wJNe4vSufGR4OWlYCRrH/Gj87ouiEDbxwINJYblZM8mA== X-Received: by 2002:a05:6830:388f:b0:71d:445a:80b9 with SMTP id 46e09a7af769-7249da8f75dmr15985167a34.16.1737580288176; Wed, 22 Jan 2025 13:11:28 -0800 (PST) Received: from [192.168.0.142] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7249b3be2e2sm4133618a34.31.2025.01.22.13.11.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jan 2025 13:11:27 -0800 (PST) Message-ID: Date: Wed, 22 Jan 2025 15:11:25 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] dt-bindings: iio: adc: add AD7191 To: Alisa-Dariana Roman , Alisa-Dariana Roman , Jonathan Cameron , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Cc: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski References: <20250122132821.126600-1-alisa.roman@analog.com> <20250122132821.126600-2-alisa.roman@analog.com> From: David Lechner Content-Language: en-US In-Reply-To: <20250122132821.126600-2-alisa.roman@analog.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/22/25 7:20 AM, Alisa-Dariana Roman wrote: > AD7191 is a pin-programmable, ultralow noise 24-bit sigma-delta ADC > designed for precision bridge sensor measurements. It features two > differential analog input channels, selectable output rates, > programmable gain, internal temperature sensor and simultaneous > 50Hz/60Hz rejection. > > Signed-off-by: Alisa-Dariana Roman > --- > .../bindings/iio/adc/adi,ad7191.yaml | 175 ++++++++++++++++++ > MAINTAINERS | 7 + > 2 files changed, 182 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7191.yaml > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7191.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7191.yaml > new file mode 100644 > index 000000000000..c0a6bed7a9cb > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7191.yaml > @@ -0,0 +1,175 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# Copyright 2025 Analog Devices Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/adc/adi,ad7191.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Analog Devices AD7191 ADC device driver > + > +maintainers: > + - Alisa-Dariana Roman > + > +description: | > + Bindings for the Analog Devices AD7191 ADC device. Datasheet can be > + found here: > + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7191.pdf If we are not going to have a powerdown-gpios, I think we should mention in the description that it is expected that the PDOWN pin is connected to the SPI controller chip select. > + > +properties: ... > + > + clksel-gpios: Do we really need this one? I don't think we have a chip yet that wants to change the clock at runtime. We don't have this for any of the other similar ADI sigma delta chips that have already been upstreamed. If there is an evaluation board where the pin is wired to a GPIO, we can just use gpio-hog to select the correct state. > + description: | > + Clock source selection pin (internal or external). Should be defined if > + clksel-config is absent. > + maxItems: 1 > + > + adi,clksel-state: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + Should be present if CLKSEL is pin-strapped. 0 selects an external clock, > + 1 selects the internal clock. If defined, clksel-gpios must be absent. > + enum: [0, 1] I don't think we need this one either. If the clocks property is present, then we can assume that CLKSEL is going to be hardwired to indicate an external clock and if the clocks property is absent, then we know it must be hardwired to select the internal clock. > + > +required: > + - compatible > + - reg > + - interrupts > + - avdd-supply > + - dvdd-supply > + - vref-supply > + - spi-cpol > + - spi-cpha > + - temp-gpios > + - chan-gpios > + > +allOf: > + - $ref: /schemas/spi/spi-peripheral-props.yaml# > + - if: > + required: > + - adi,odr-state > + then: > + properties: > + odr-gpios: false > + else: > + required: > + - odr-gpios I think we could simplify these with: - oneOf: - required: - adi,odr-state - required: - odr-gpios > + - if: > + required: > + - adi,pga-state > + then: > + properties: > + pga-gpios: false > + else: > + required: > + - pga-gpios > + - if: > + required: > + - adi,clksel-state > + then: > + properties: > + clksel-gpios: false > + else: > + required: > + - clksel-gpios > + > +unevaluatedProperties: false > +