Thread (74 messages) 74 messages, 8 authors, 2020-06-10

Re: [PATCH v4 02/11] mfd: Add support for Kontron sl28cpld management controller

From: Rob Herring <robh@kernel.org>
Date: 2020-06-09 17:15:28
Also in: linux-devicetree, linux-gpio, linux-hwmon, linux-pwm, linux-watchdog, lkml

On Tue, Jun 09, 2020 at 05:01:17PM +0200, Michael Walle wrote:
Am 2020-06-09 16:42, schrieb Mark Brown:
quoted
On Tue, Jun 09, 2020 at 04:38:31PM +0200, Michael Walle wrote:
quoted
  mfd-device@10 {
    compatible = "simple-regmap", "simple-mfd";
    reg = <10>;
    regmap,reg-bits = <8>;
    regmap,val-bits = <8>;
    sub-device@0 {
      compatible = "vendor,sub-device0";
      reg = <0>;
    };
A DT binding like this is not a good idea, encoding the details of the
register map into the DT binding makes it an ABI which is begging for
trouble.  I'd also suggest that any device using a generic driver like
this should have a specific compatible string for the device so we can
go back and add quirks later if we need them.
Like in the spidev case, yes. But OTOH if I _just_ encode the parameters
for the regmap a MFD, Lee don't agree because its just a shim. So either
way I seem to be stuck here.

Where should I put the code to create an i2c driver, init a regmap and
populate its childen?
Find another driver doing this already and rename it 'simple-mfd' (no 
relation to the DT binding) and add your compatible string to it. 
'Generic' or 'simple' drivers don't require generic/simple DT bindings.

Or extend the existing syscon driver to look up the bus_type and create 
the regmap based on the bus type?

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help