Re: [PATCH v4 01/19] dt-bindings: mfd: mediatek: mt6397: Add accdet subnode

From: Nícolas F. R. A. Prado
Date: Thu Mar 06 2025 - 07:19:48 EST


On Thu, Mar 06, 2025 at 08:57:27AM +0100, Krzysztof Kozlowski wrote:
> On Wed, Mar 05, 2025 at 03:58:16PM -0300, Nícolas F. R. A. Prado wrote:
> > Describe the accessory detection (accdet) module as a possible subnode
> > of the MT6359 PMIC.
> >
> > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
> > ---
> > .../devicetree/bindings/mfd/mediatek,mt6397.yaml | 51 ++++++++++++++++++++++
> > 1 file changed, 51 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
> > index 6a89b479d10fad3c8b61cab5a3af1453baca4d1a..51012b8bbfaef3df7bdb619a4f8d828d6f9cc15a 100644
> > --- a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
> > @@ -24,6 +24,7 @@ description: |
> > - LED
> > - Keys
> > - Power controller
> > + - Accessory Detection
> >
> > It is interfaced to host controller using SPI interface by a proprietary hardware
> > called PMIC wrapper or pwrap. MT6397/MT6323 PMIC is a child device of pwrap.
> > @@ -224,6 +225,30 @@ properties:
> > description:
> > Pin controller
> >
> > + accdet:
> > + type: object
> > + additionalProperties: false
> > + description:
> > + The Accessory Detection module found on the PMIC allows detecting audio
> > + jack insertion and removal, as well as identifying the type of events
> > + connected to the jack.
> > +
> > + properties:
> > + compatible:
> > + const: mediatek,mt6359-accdet
>
> You just removed the other file, no folding happened here. Drop the
> accdet node and fold this into parent.

Sorry, I'm still not sure what you mean by folding here then. Right now the
accdet is a subnode of the PMIC. If you want me to remove the accdet node, where
would its compatible and property go?

pmic {
compatible = "mediatek,mt6359";
interrupt-controller;
#interrupt-cells = <2>;

accdet {
compatible = "mediatek,mt6359-accdet";
mediatek,hp-eint-high;
};
};

Thanks,
Nícolas