Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2160997lqb; Mon, 27 May 2024 09:40:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9iQgsp4f+mI1HWHt3fxZ3E3lMaNuv1zQU97cyx7BtvgjY7GL+3pbsVXtezzD7ZpewHcrOXwvav/9/DpYGNDeAfR6iWoGRiHNNOTY8Qg== X-Google-Smtp-Source: AGHT+IGpc7tM4/qFsH7M89U+KDYNKaEBqbtn2RtUHfXA+Pg8+VRZ1H8h5XzZ4AxLGs2kunN8N7uZ X-Received: by 2002:a05:6359:5393:b0:181:6575:1b22 with SMTP id e5c5f4694b2df-197e4fc01b1mr1312938855d.6.1716828000118; Mon, 27 May 2024 09:40:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716828000; cv=pass; d=google.com; s=arc-20160816; b=asNV/H2Yn1M7C0QA9Jiu54LQwRfYVh5J1yjS1fFhkIQbEhZ+cB+9RP2fG1hVmRDxWf xURZ85BAY/95eXJHdUFv1tpizRUJ/EBNs6lXUpMXh0oq4GfBBlrj4Fur4tIKqt5fLgvT 1vQwhK27aq2UbMf+k8w1wrqN89bgDhFBegVTKoS3aLbOnhP4NTOLrnVSGO4VJvniY18M gZZGF6isxT0rNL8ggRtAceAgas5OUd7vniqnr/kEkKZ96Gi+6rbNcxy9+7TD/YMWa98G ReO5gojq7XJSIv5VUEB1s+PQb/zCl0LR/ekg3mqnxBzpUuxRdIIJWWKrGRu/GZiDPPz4 AK5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zeSAWjmwV6H5jfOLtMz3u64QnjhiXjknGEOiM5NqjcE=; fh=1ogNuYY1AvR3txfqMqZjp6xvnwlfh5WFt/Y1UpqBNDc=; b=jwgxvsZNY/Bi5P9MR3y6j3VO4cEW8gLC0GGeZlb1joQRkGpFLbMOFYodv8jVcG1APu a3wYGxG80djVgNWe08a0TIvPkc/NUJb1YNCW9OlJt4bCnuDPy2JbxILIL03rvzUL5Czj fcs6Y8YbKTHcnIneebtYRM3hgojXtpkSHJr6H8FwCS6hbDRFfslZmcNy87YBgXjlv2e3 XGWYxfEm4u4K/sXR/j9xWe4jzamgVIVayIsd7Ub+ln8N+V8ZFOLH1iKCpPJ+hiEBnZrd JKpp1Jgnjjm/FDfSmMkadSEGYySlptnVygqTW6Zt3Z2fgrIY5ds5NK+owYLr8brlbFQY Tjpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=glMXHRXu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191240-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191240-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-68222ea5a87si6537986a12.201.2024.05.27.09.39.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 09:40:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191240-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=glMXHRXu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191240-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191240-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0E53C289C6E for ; Mon, 27 May 2024 16:30:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E244315A861; Mon, 27 May 2024 16:29:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="glMXHRXu" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4C9415A844; Mon, 27 May 2024 16:29:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716827382; cv=none; b=fIknklZflanjNaGxI05b1Kf2n/E59cXYDy/nJ83npF3lvC3tEeRvJAuy9vjhkVEbfAlkvfyOS/AzP8yjdbcbFkbi5LrtQ/AFSaR4tqgVZ31hKkDa9Ta9YC5hoRr+eHSS9yNAASFgwkuluAnB4q3y9Nav291/xR6KCYh++Qp9Q/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716827382; c=relaxed/simple; bh=7pj/XCLGDOEGfoe0oU0fc4KA6+ZTDkriw3sFEhW+RVA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RvfBzEUzKcSk71w1aWt6sE2+l/41jdlfXJ0Ru6a42pQcAv501wF1QMaXEPyEzr4J9Z+SSnlDR73nicQUX44YMFa+2KkVTCFYUKkNYgCyN9daGaHeyoOixzp0BBVON1EC71IsOwnflrMB4o20Xrk6Dws6cX63cTYDiSO3Dr72948= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=glMXHRXu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BC91C2BBFC; Mon, 27 May 2024 16:29:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716827381; bh=7pj/XCLGDOEGfoe0oU0fc4KA6+ZTDkriw3sFEhW+RVA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=glMXHRXuglCtiUTeVFEbFc9v/xeuPPUw5UmRugqMGpQdELUc3uUQ3DArHs3+amVKv dt7xpbHboS0lxyQW04SZc6i+LbHkWzTgkxS9ZJXCdT/+alufGI3EXQZIzmkETwgeLa 7/YUrCXdorrfbtl53ErUvGiinyS8em0aDsTK3ESLnjJs7gM/T7y4rKgac0DPzJqZtE SOwEkictvfJejCTyYjlbvtPhOEuCqXM0ZbN3ckqbEzEHTNlU6A9qLA6PDJrCP5rJIA +IooP9jdfK+9X3v4jUpn91HaB7TsrFidB0/NnezdEl47lcu90wCa8Y3YtmESodk4wa RgvVQiDiog+ng== Date: Mon, 27 May 2024 17:29:37 +0100 From: Conor Dooley To: Francesco Dolcini Cc: =?iso-8859-1?Q?Jo=E3o_Paulo_Gon=E7alves?= , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?iso-8859-1?Q?Jo=E3o_Paulo_Gon=E7alves?= , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: Re: [PATCH v1 1/2] dt-bindings: iio: adc: add ti,ads1119 Message-ID: <20240527-ecosystem-mountable-d9a6eebc7607@spud> References: <20240527154050.24975-1-francesco@dolcini.it> <20240527154050.24975-2-francesco@dolcini.it> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zNG+bgDFF3VuTFdF" Content-Disposition: inline In-Reply-To: <20240527154050.24975-2-francesco@dolcini.it> --zNG+bgDFF3VuTFdF Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 27, 2024 at 05:40:49PM +0200, Francesco Dolcini wrote: > From: Jo=E3o Paulo Gon=E7alves >=20 > Add devicetree bindings for Texas Instruments ADS1119 16-bit ADC > with I2C interface. >=20 > Datasheet: https://www.ti.com/lit/gpn/ads1119 > Signed-off-by: Jo=E3o Paulo Gon=E7alves > Signed-off-by: Francesco Dolcini > --- > .../bindings/iio/adc/ti,ads1119.yaml | 122 ++++++++++++++++++ > MAINTAINERS | 7 + > 2 files changed, 129 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads1119.= yaml >=20 > diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml b/= Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml > new file mode 100644 > index 000000000000..ab4f01199dbe > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml > @@ -0,0 +1,122 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/adc/ti,ads1119.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Texas Instruments ADS1119 ADC > + > +maintainers: > + - Jo=E3o Paulo Gon=E7alves > + > +description: | Most of the |s you have in this file are not needed - you don't have any formatting to preserve in all but the channels. > + The TI ADS1119 is a precision 16-bit ADC over I2C that offers single-e= nded and > + differential measurements using a multiplexed input. It features a pro= grammable > + gain, a programmable sample rate, an internal oscillator and voltage r= eference, > + and a 50/60Hz rejection filter. > + > +properties: > + compatible: > + const: ti,ads1119 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + reset-gpios: > + maxItems: 1 > + > + vref-supply: > + description: > + ADC external reference voltage (VREF). > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + "#io-channel-cells": > + const: 1 > + > +required: > + - compatible > + - reg > + - "#address-cells" > + - "#size-cells" > + > +patternProperties: > + "^channel@([0-6])$": > + $ref: adc.yaml > + type: object > + description: | > + ADC channels. > + > + properties: > + reg: > + description: | > + 0: Voltage over AIN0 and AIN1. > + 1: Voltage over AIN2 and AIN3. > + 2: Voltage over AIN1 and AIN2. > + 3: Voltage over AIN0 and GND. > + 4: Voltage over AIN1 and GND. > + 5: Voltage over AIN2 and GND. > + 6: Voltage over AIN3 and GND. Take a look at diff-channels. > + items: > + - minimum: 0 > + maximum: 6 > + > + ti,gain: What makes this a property of the hardware? Also, missing unit. > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + PGA gain value. > + enum: [1, 4] > + default: 1 > + > + ti,datarate: Ditto here, why's this a property of the hardware? Usually this gets set =66rom sysfs.. Thanks, Conor. > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + Data acquisition rate in samples per second. > + enum: [20, 90, 330, 1000] > + default: 20 > + > + required: > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + i2c { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + adc@40 { > + compatible =3D "ti,ads1119"; > + reg =3D <0x40>; > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + #io-channel-cells =3D <1>; > + > + channel@0 { > + reg =3D <0>; > + ti,gain =3D <4>; > + ti,datarate =3D <330>; > + }; > + > + channel@4 { > + reg =3D <4>; > + ti,datarate =3D <1000>; > + }; > + > + channel@5 { > + reg =3D <5>; > + ti,gain =3D <4>; > + }; > + }; > + }; > diff --git a/MAINTAINERS b/MAINTAINERS > index d6c90161c7bf..f1b2c4b815e2 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -22380,6 +22380,13 @@ M: Robert Richter > S: Odd Fixes > F: drivers/gpio/gpio-thunderx.c > =20 > +TI ADS1119 ADC DRIVER > +M: Francesco Dolcini > +M: Jo=E3o Paulo Gon=E7alves > +L: linux-iio@vger.kernel.org > +S: Maintained > +F: Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml > + > TI ADS7924 ADC DRIVER > M: Hugo Villeneuve > L: linux-iio@vger.kernel.org > --=20 > 2.39.2 >=20 --zNG+bgDFF3VuTFdF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZlS08AAKCRB4tDGHoIJi 0tuwAP9bAJ1q8cEi8wbDHJNK175XRR6DiVvTUcizd1Y7Psac1gEAhAHM9ucMk9u/ Q74H0LG4aMVAbRpYeu1qFSZ8etUsYwQ= =LjsF -----END PGP SIGNATURE----- --zNG+bgDFF3VuTFdF--