[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e71a38a9-7a92-4156-a7f0-52f71d461d61@collabora.com>
Date: Mon, 10 Jun 2024 10:00:55 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Rob Herring <robh@...nel.org>
Cc: jic23@...nel.org, lars@...afoo.de, krzk+dt@...nel.org,
conor+dt@...nel.org, matthias.bgg@...il.com, lee@...nel.org,
andy@...nel.org, nuno.sa@...log.com, bigunclemax@...il.com,
dlechner@...libre.com, marius.cristea@...rochip.com,
marcelo.schmitt@...log.com, fr0st61te@...il.com, mitrutzceclan@...il.com,
mike.looijmans@...ic.nl, marcus.folkesson@...il.com,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, andy.shevchenko@...il.com,
kernel@...labora.com
Subject: Re: [PATCH v2 1/5] dt-bindings: iio: adc: Add MediaTek MT6359 PMIC
AUXADC
Il 06/06/24 01:52, Rob Herring ha scritto:
> On Tue, Jun 04, 2024 at 02:30:04PM +0200, AngeloGioacchino Del Regno wrote:
>> Add a new binding for the MT6350 Series (MT6357/8/9) PMIC AUXADC,
>> providing various ADC channels for both internal temperatures and
>> voltages, audio accessory detection (hp/mic/hp+mic and buttons,
>> usually on a 3.5mm jack) other than some basic battery statistics
>> on boards where the battery is managed by this PMIC.
>>
>> Also add the necessary dt-binding headers for devicetree consumers.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
>> ---
>> .../iio/adc/mediatek,mt6359-auxadc.yaml | 33 +++++++++++++++++++
>> .../iio/adc/mediatek,mt6357-auxadc.h | 21 ++++++++++++
>> .../iio/adc/mediatek,mt6358-auxadc.h | 22 +++++++++++++
>> .../iio/adc/mediatek,mt6359-auxadc.h | 22 +++++++++++++
>> 4 files changed, 98 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml
>> create mode 100644 include/dt-bindings/iio/adc/mediatek,mt6357-auxadc.h
>> create mode 100644 include/dt-bindings/iio/adc/mediatek,mt6358-auxadc.h
>> create mode 100644 include/dt-bindings/iio/adc/mediatek,mt6359-auxadc.h
>>
>> diff --git a/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml b/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml
>> new file mode 100644
>> index 000000000000..6497c416094d
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml
>> @@ -0,0 +1,33 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/iio/adc/mediatek,mt6359-auxadc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: MediaTek MT6350 series PMIC AUXADC
>> +
>> +maintainers:
>> + - AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
>> +
>> +description:
>> + The Auxiliary Analog/Digital Converter (AUXADC) is an ADC found
>> + in some MediaTek PMICs, performing various PMIC related measurements
>> + such as battery and PMIC internal voltage regulators temperatures,
>> + accessory detection resistance (usually, for a 3.5mm audio jack)
>> + other than voltages for various PMIC internal components.
>> +
>> +properties:
>> + compatible:
>> + enum:
>> + - mediatek,mt6357-auxadc
>> + - mediatek,mt6358-auxadc
>> + - mediatek,mt6359-auxadc
>> +
>> + "#io-channel-cells":
>> + const: 1
>
> Why do you need a node here? Just add #io-channel-cells to the parent
> node.
>
Because some boards will want to avoid probing the related driver, as that will
trigger a reset and this may not play well with ECs (namely, some Chromebooks),
which are reading the same AUXADC block.
If I avoid using a new node, instead of just using `status`, I'll have to add a
"mediatek,disable-auxadc" property to the parent node, which isn't pretty...
Cheers,
Angelo
>> +
>> +required:
>> + - compatible
>> + - "#io-channel-cells"
>> +
>> +additionalProperties: false
Powered by blists - more mailing lists