diff mbox series

[3/3] dt-bindings: iio: adc: add lltc,ltc2309 bindings

Message ID 20230824-ltc2309-v1-3-b87b4eb8030c@gmail.com
State New
Headers show
Series iio: adc: add LTC2309 support | expand

Commit Message

Liam Beguin Aug. 24, 2023, 4:55 p.m. UTC
Add devicetree bindings for the Linear Technology LTC2309 ADC driver.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
---
 .../devicetree/bindings/iio/adc/lltc,ltc2309.yaml  | 52 ++++++++++++++++++++++
 1 file changed, 52 insertions(+)

Comments

Krzysztof Kozlowski Aug. 25, 2023, 6:15 a.m. UTC | #1
On 24/08/2023 20:50, Liam Beguin wrote:
> On Thu, Aug 24, 2023 at 07:56:29PM +0200, Krzysztof Kozlowski wrote:
>> On 24/08/2023 18:55, Liam Beguin wrote:
>>> Add devicetree bindings for the Linear Technology LTC2309 ADC driver.
>>>
>>> Signed-off-by: Liam Beguin <liambeguin@gmail.com>
>>
>> Thank you for your patch. There is something to discuss/improve.
>>
>>> +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2309.yaml
>>> @@ -0,0 +1,52 @@
>>> +# SPDX-License-Identifier: GPL-2.0
>>
>> Wrong license. Run checkpatch before sending patches.
>>
> 
> Sorry about that, I ran it through checkpatch but it didn't flag
> anything.

No, you didn't, because checkpatch flags it easily:

WARNING: DT binding documents should be licensed (GPL-2.0-only OR
BSD-2-Clause)
#21: FILE: Documentation/devicetree/bindings/iio/adc/lltc,ltc2309.yaml:1:
+# SPDX-License-Identifier: GPL-2.0

total: 0 errors, 2 warnings, 52 lines checked


Best regards,
Krzysztof
Liam Beguin Aug. 25, 2023, 3:53 p.m. UTC | #2
Hi Krzysztof,

On Fri, Aug 25, 2023 at 08:15:57AM +0200, Krzysztof Kozlowski wrote:
> On 24/08/2023 20:50, Liam Beguin wrote:
> > On Thu, Aug 24, 2023 at 07:56:29PM +0200, Krzysztof Kozlowski wrote:
> >> On 24/08/2023 18:55, Liam Beguin wrote:
> >>> Add devicetree bindings for the Linear Technology LTC2309 ADC driver.
> >>>
> >>> Signed-off-by: Liam Beguin <liambeguin@gmail.com>
> >>
> >> Thank you for your patch. There is something to discuss/improve.
> >>
> >>> +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2309.yaml
> >>> @@ -0,0 +1,52 @@
> >>> +# SPDX-License-Identifier: GPL-2.0
> >>
> >> Wrong license. Run checkpatch before sending patches.
> >>
> > 
> > Sorry about that, I ran it through checkpatch but it didn't flag
> > anything.
> 
> No, you didn't, because checkpatch flags it easily:
> 
> WARNING: DT binding documents should be licensed (GPL-2.0-only OR
> BSD-2-Clause)
> #21: FILE: Documentation/devicetree/bindings/iio/adc/lltc,ltc2309.yaml:1:
> +# SPDX-License-Identifier: GPL-2.0
> 
> total: 0 errors, 2 warnings, 52 lines checked

It seems like I wasn't running checkpatch in strict mode.
Thanks for pointing that out.

> 
> Best regards,
> Krzysztof

Cheers,
Liam
Krzysztof Kozlowski Aug. 26, 2023, 8:36 a.m. UTC | #3
On 25/08/2023 17:53, Liam Beguin wrote:
> Hi Krzysztof,
> 
> On Fri, Aug 25, 2023 at 08:15:57AM +0200, Krzysztof Kozlowski wrote:
>> On 24/08/2023 20:50, Liam Beguin wrote:
>>> On Thu, Aug 24, 2023 at 07:56:29PM +0200, Krzysztof Kozlowski wrote:
>>>> On 24/08/2023 18:55, Liam Beguin wrote:
>>>>> Add devicetree bindings for the Linear Technology LTC2309 ADC driver.
>>>>>
>>>>> Signed-off-by: Liam Beguin <liambeguin@gmail.com>
>>>>
>>>> Thank you for your patch. There is something to discuss/improve.
>>>>
>>>>> +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2309.yaml
>>>>> @@ -0,0 +1,52 @@
>>>>> +# SPDX-License-Identifier: GPL-2.0
>>>>
>>>> Wrong license. Run checkpatch before sending patches.
>>>>
>>>
>>> Sorry about that, I ran it through checkpatch but it didn't flag
>>> anything.
>>
>> No, you didn't, because checkpatch flags it easily:
>>
>> WARNING: DT binding documents should be licensed (GPL-2.0-only OR
>> BSD-2-Clause)
>> #21: FILE: Documentation/devicetree/bindings/iio/adc/lltc,ltc2309.yaml:1:
>> +# SPDX-License-Identifier: GPL-2.0
>>
>> total: 0 errors, 2 warnings, 52 lines checked
> 
> It seems like I wasn't running checkpatch in strict mode.

No. This was not a strict mode but a regular run. I don't understand why
you are turning this all the time around... You can easily check by
yourself and reproduce the warning any time.


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2309.yaml b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2309.yaml
new file mode 100644
index 000000000000..7874290dad75
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2309.yaml
@@ -0,0 +1,52 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/lltc,ltc2309.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Linear Technology / Analog Devices LTC2309 ADC
+
+maintainers:
+  - Liam Beguin <liambeguin@gmail.com>
+
+properties:
+  compatible:
+    enum:
+      - lltc,ltc2309
+
+  refcomp-supply:
+    description: Power supply for the reference voltage
+
+  reg:
+    enum:
+      - 0x08
+      - 0x09
+      - 0x0a
+      - 0x0b
+      - 0x18
+      - 0x19
+      - 0x1a
+      - 0x1b
+      - 0x28
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@28 {
+            #io-channel-cells = <1>;
+            compatible = "lltc,ltc2309";
+            reg = <0x28>;
+        };
+    };