From: Lee Jones <lee.jones@linaro.org>
To: Michael Walle <michael@walle.cc>
Cc: Frank Rowand <frowand.list@gmail.com>,
andy.shevchenko@gmail.com, robh+dt@kernel.org,
broonie@kernel.org, devicetree@vger.kernel.org,
linus.walleij@linaro.org, linux@roeck-us.net,
andriy.shevchenko@linux.intel.com, robin.murphy@arm.com,
gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] mfd: core: Make a best effort attempt to match devices with the correct of_nodes
Date: Wed, 24 Jun 2020 12:24:14 +0100 [thread overview]
Message-ID: <20200624112414.GG954398@dell> (raw)
In-Reply-To: <c0a8ebd32ae07ae98fa56728c77f8e79@walle.cc>
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
next prev parent reply other threads:[~2020-06-24 11:24 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 19:10 [PATCH v2 1/3] mfd: core: Make a best effort attempt to match devices with the correct of_nodes Lee Jones
2020-06-11 19:10 ` [PATCH v2 2/3] mfd: core: Fix formatting of MFD helpers Lee Jones
2020-06-12 12:27 ` Frank Rowand
2020-06-11 19:10 ` [PATCH v2 3/3] mfd: core: Add OF_MFD_CELL_REG() helper Lee Jones
2020-06-12 12:28 ` Frank Rowand
2020-06-12 12:26 ` [PATCH v2 1/3] mfd: core: Make a best effort attempt to match devices with the correct of_nodes Frank Rowand
2020-06-15 1:19 ` Frank Rowand
2020-06-15 9:26 ` Lee Jones
2020-06-18 17:34 ` Frank Rowand
2020-06-22 8:50 ` Lee Jones
2020-06-22 14:32 ` Frank Rowand
2020-06-22 14:35 ` Frank Rowand
2020-06-22 15:10 ` Lee Jones
2020-06-22 18:01 ` Frank Rowand
2020-06-22 18:04 ` Frank Rowand
2020-06-22 19:11 ` Lee Jones
2020-06-22 22:23 ` Frank Rowand
2020-06-23 1:17 ` Frank Rowand
2020-06-23 1:37 ` Frank Rowand
2020-06-23 6:47 ` Lee Jones
2020-06-23 17:55 ` Frank Rowand
2020-06-23 19:59 ` Lee Jones
2020-06-23 22:33 ` Frank Rowand
2020-06-24 7:46 ` Lee Jones
2020-06-24 15:51 ` Frank Rowand
2020-06-24 16:14 ` Lee Jones
2020-06-24 16:25 ` Frank Rowand
2020-06-22 8:09 ` Lee Jones
2020-06-22 16:09 ` Frank Rowand
2020-06-22 16:53 ` Lee Jones
2020-06-23 22:21 ` Frank Rowand
2020-06-24 6:45 ` Lee Jones
2020-06-23 23:03 ` Frank Rowand
2020-06-24 6:41 ` Lee Jones
2020-06-24 7:47 ` Michael Walle
2020-06-24 8:23 ` Lee Jones
2020-06-24 9:19 ` Michael Walle
2020-06-24 11:24 ` Lee Jones [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-06-11 19:12 Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200624112414.GG954398@dell \
--to=lee.jones@linaro.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=michael@walle.cc \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).