[PATCH 1/6] dt-bindings: mfd: add binding for Apple Mac System Management Controller

Mark Kettenis mark.kettenis at xs4all.nl
Wed Sep 7 02:39:16 PDT 2022


> Date: Wed, 7 Sep 2022 03:38:09 +0900
> From: Hector Martin <marcan at marcan.st>
> 
> On 07/09/2022 02.35, Rob Herring wrote:
> 
> > If only those 2 nodes, then I really don't care so much and gpio-sec 
> > would be fine. It's 1 node in 1 binding.
> 
> I think it might make sense to just go with this then. If Apple ever
> introduces yet another GPIO sub-controller we can just add another one,
> and honestly I don't think that's very likely, given they don't even use
> any of the GPIOs from the second one from the AP yet. I don't see SMC
> growing a big list of GPIO controllers any time soon, such that we
> regret doing it this way. And then the node-name can just map to a given
> key prefix statically in the driver, and thus we don't even need a
> property for that (gpio would be gP?? and gpio-sec gp?? right now).

We could also use a compatible property to map the key prefix.  For
example we could have "apple,smc-gpio-primary" map to gP??  and
"apple,smc-gpio-secondary" map to gp??.  Then we can keep the generic
"gpio" name for both GPIO nodes.  And if Apple introduces yet another
GPIO sub-controller we just have to invent a new compatible for it.
Probably the cleanest solution if Rob still thinks it is better for
these nodes to have a compatible property anyway.



More information about the linux-arm-kernel mailing list