Re: [PATCH v2 1/3] mfd: core: Make a best effort attempt to match devices with the correct of_nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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." [1]
> 
> 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
practice.

> [1] https://lore.kernel.org/linux-devicetree/20200609185231.GO4106@dell/
> 
> -michael

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux