[PATCH v2 1/3] mfd: core: Make a best effort attempt to match devices with the correct of_nodes
lee.jones at linaro.org
Wed Jun 24 07:24:14 EDT 2020
On Wed, 24 Jun 2020, Michael Walle wrote:
> Am 2020-06-24 10:23, schrieb Lee Jones:
> > On Wed, 24 Jun 2020, Michael Walle wrote:
> > > Although Rob mentioned to maybe relax that, but I sill fail to see
> > > the advantage to have an arbitrary reg property instead of a unique
> > > node name.
> > I don't have a strong opinion either way.
> > We can *also* add node name matching if Rob deems it fit.
> Where do you see a use of the reg property?
The vast proportion of devices do and will have 'reg' properties.
> You already expressed
> that you see exposing the internal offset as a hack:
> "Placing "internal offsets" into the 'reg' property is a hack." 
> So what are you putting into reg instead? Rob suggested "anything"
> documented in the hardware manual. But isn't this just also something
> we make up and especially for the MFD driver. Thus IMHO it doesn't
> qualify as a unit-address, which - as far as I understand it - is
> unique on the parent bus. To repeat my argument, its not a defined
> thing like an I2C address.
So our argument in the past (although this is going back the best part
of 10 years) has always been that; if devices are different, there is
almost always a documented (in the H/W manual/datasheet) way to
differentiate/address them. Whether that's a physical address, an
offset, a bank ID, an I2C/SPI address or whatever.
As to not being able to use that address/ID due to the DT rules
surrounding address space as per the example in your previous email,
well that's a rule specific to DT and makes little sense in some real
world cases (such as, dare I say it, the AB8500).
You'll have to take the aforementioned point and the point about using
node names instead of 'reg' properties up with Rob and the other
interested DT folk.
Again, I'm happy to extend that functionality if it becomes acceptable
>  https://lore.kernel.org/linux-devicetree/20200609185231.GO4106@dell/
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
More information about the linux-arm-kernel