lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DEEO8SSA15XY.1SDBZEILR5AHM@gmail.com>
Date: Fri, 21 Nov 2025 15:56:43 -0500
From: "Kurt Borja" <kuurtb@...il.com>
To: "Krzysztof Kozlowski" <krzk@...nel.org>, "Kurt Borja"
 <kuurtb@...il.com>, "Jonathan Cameron" <jic23@...nel.org>, "Rob Herring"
 <robh@...nel.org>, "Krzysztof Kozlowski" <krzk+dt@...nel.org>, "Conor
 Dooley" <conor+dt@...nel.org>, "Tobias Sperling"
 <tobias.sperling@...ting.com>
Cc: "David Lechner" <dlechner@...libre.com>, Nuno Sá
 <nuno.sa@...log.com>, "Andy Shevchenko" <andy@...nel.org>,
 <linux-iio@...r.kernel.org>, <devicetree@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>, "Jonathan Cameron"
 <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH 1/2] dt-bindings: iio: adc: Add TI ADS1018/ADS1118

Hi Krzysztof,

On Fri Nov 21, 2025 at 2:10 PM -05, Krzysztof Kozlowski wrote:
> On 21/11/2025 18:16, Kurt Borja wrote:
>> Add documentation for Texas Instruments ADS1018 and ADS1118
>> analog-to-digital converters.
>> 
>> Signed-off-by: Kurt Borja <kuurtb@...il.com>
>
> You did not test it before sending, so no full review but few nits to
> save you one round of reviews:

My bad! I will fix the errors. Thanks!

>
>> ---
>>  .../devicetree/bindings/iio/adc/ti,ads1118.yaml    | 132 +++++++++++++++++++++
>>  1 file changed, 132 insertions(+)
>> 
>> diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads1118.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads1118.yaml
>> new file mode 100644
>> index 000000000000..eb7228ed6ddb
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads1118.yaml
>> @@ -0,0 +1,132 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/iio/adc/ti,ads1118.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: TI ADS1018/ADS1118 SPI analog to digital converter
>> +
>> +maintainers:
>> +  - Kurt Borja <kuurtb@...il.com>
>> +
>> +description: |
>> +  The ADS1018/ADS1118 is a precision, low-power, 12-bit or 16-bit, noise-free,
>> +  analog-to-digital converter (ADC). It integrates a programmable gain amplifier
>> +  (PGA), voltage reference, oscillator and high-accuracy temperature sensor.
>> +
>> +  Datasheets:
>> +    - ADS1018: https://www.ti.com/lit/ds/symlink/ads1018.pdf
>> +    - ADS1118: https://www.ti.com/lit/ds/symlink/ads1118.pdf
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - ti,ads1018
>> +      - ti,ads1118
>> +
>> +  reg:
>> +    maxitems: 1
>> +
>> +  interrupts:
>> +    description: DOUT/DRDY (Data Out/Data Ready) line.
>> +    maxitems: 1
>> +
>> +  drdy-gpios:
>> +    description:
>> +      Extra GPIO line connected to DOUT/DRDY (Data Out/Data Ready). This allows
>> +      distinguishing between latched and real DRDY IRQs.
>
> I have feeling that you miss proper handling of IRQs (e.g. active level)
> on your board.

Can you elaborate? Should I specify active level here?

>
>> +    maxitems: 1
>> +
>> +  '#address-cells':
>> +    const: 1
>> +
>> +  '#size-cells':
>> +    const: 0
>> +
>> +  '#io-channel-cells':
>> +    const: 1
>> +
>> +required:
>
> This goes after patternProperties.
>
>> +  - compatible
>> +  - reg
>> +  - drdy-gpios
>> +  - '#address-cells'
>> +  - '#size-cells'
>> +
>> +patternProperties:
>> +  "^channel@[0-7]$":
>> +    type: object
>> +    $ref: /schemas/iio/adc/adc.yaml#
>> +    description: Properties for a single ADC channel.
>> +
>> +    properties:
>> +      reg:
>> +        minimum: 0
>> +        maximum: 7
>> +        description: The channel index (0-7).
>> +
>> +      ti,gain:
>
> Use common property units.
>
> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
>
>> +        $ref: /schemas/types.yaml#/definitions/uint32
>> +        minimum: 0
>> +        maximum: 5
>> +        description:
>> +          Programmable gain amplifier configuration, as described in the PGA
>> +          Config Register Field description. If not present, the default is
>> +          used.
>> +
>> +      ti,datarate:
>
> Use common property units.
>
>> +        $ref: /schemas/types.yaml#/definitions/uint32
>> +        minimum: 0
>> +        maximum: 7
>> +        description:
>> +          Data rate configuration, as described in the DR Config Register Field
>> +          description. If not present, the default is used.
>
> default:
>
>> +
>> +    required:
>> +      - reg
>> +
>> +    additionalProperties: false
>> +
>> +allOf:
>> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
>> +
>> +  - if:
>> +    properties:
>> +      compatible:
>> +        contains:
>> +          const: ti,ads1018
>> +    then:
>> +      patternProperties:
>> +        "^channel@[0-7]$":
>> +          properties:
>> +            ti,datarate:
>> +              maximum: 6
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    spi0 {
>
> spi
>
>> +        #address-cells = <1>;
>> +        #size-cells = <0>;
>> +
>> +        ads1118@0 {
>
>
> Node names should be generic. See also an explanation and list of
> examples (not exhaustive) in DT specification:
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> If you cannot find a name matching your device, please check in kernel
> sources for similar cases or you can grow the spec (via pull request to
> DT spec repo).
>
> e.g. adc
>
>
>> +            compatible = "ti,ads1118";
> Best regards,
> Krzysztof

Ack for the rest. Thank you!


-- 
 ~ Kurt


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ