From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [Patch V2 2/2] i2c: mv64xxx: Remove internal compatible string from Documentation
Date: Mon, 28 Jul 2014 16:12:17 +0200 [thread overview]
Message-ID: <20140728141217.GE2891@lunn.ch> (raw)
In-Reply-To: <5514427.elClhaDPhf@wuerfel>
On Mon, Jul 28, 2014 at 03:51:27PM +0200, Arnd Bergmann wrote:
> On Monday 28 July 2014 15:27:16 Andrew Lunn wrote:
> > > > diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> > > > index 5c30026921ae..6eb6f6e40ba1 100644
> > > > --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> > > > +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> > > > @@ -9,11 +9,6 @@ Required properties :
> > > > - "allwinner,sun6i-a31-i2c"
> > > > - "marvell,mv64xxx-i2c"
> > > > - "marvell,mv78230-i2c"
> > > > - - "marvell,mv78230-a0-i2c"
> > > > - * Note: Only use "marvell,mv78230-a0-i2c" for a
> > > > - very rare, initial version of the SoC which
> > > > - had broken offload support. Linux
> > > > - auto-detects this and sets it appropriately.
> > >
> > > I think we're losing knowledge here. *We* know that attempting to
> > > enable transaction offload on A0 SoCs is bad news. Other OS's would now
> > > need to dig through the Linux kernel code for clues as to what's
> > > happening.
> > >
> > > Perhaps we should retain the info in the form of a note at the bottom of
> > > this file?
> >
> > Hi Jason
> >
> > I did wounder about this a bit. I've not looked, but now that XP
> > datasheets are public, i assume there is an errata for this, so it at
> > least should be documented by Marvell. But anybody looking in
> > /proc/device-tree on an A0 is going to see this undocumented string
> > which might raise questions.
> >
> > So i'm happy to document it at the end of the binding.
> >
> > Arnd, what do you say?
>
> The final consequence of the API change would be to no longer
> change the compatible string in the fixup, but instead to call an
> API from the driver to find out the SoC revision when it encounters
> an mv78230-i2c.
>
> I remember this being discussed when the quirk was initially added,
> but it seemed cleaner to handle this in the platform code at the time
> when it was just for one particular board. Now that it's basically
> an accepted feature of the i2c device that you have to know the
> SoC version, that should probably become a proper API.
>
> Also, we now have drivers/soc/ and can move the soc-id code there
> with a publically documented API.
Getting the SoC ID and revision seems like something that should be
generic. Would it be better to make this part of drivers/base/soc.c?
mvebu already does a soc_device_register() with the relevant
information.
Add a call something like:
/*
* Return the soc device attributes for a given soc_dev. If soc_dev is NULL,
* the first device on the soc bus is returned.
*/
struct soc_device_attribute *soc_attribute_get(struct soc_device * soc_dev);
Andrew
next prev parent reply other threads:[~2014-07-28 14:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-26 17:20 [Patch V2 0/2] Generalize use of i2c quirk for Armada XP Andrew Lunn
2014-07-26 17:20 ` [Patch V2 1/2] ARM: mvebu: armada xp: Generalize use of i2c quirk Andrew Lunn
2014-10-15 15:25 ` Jason Cooper
2014-07-26 17:20 ` [Patch V2 2/2] i2c: mv64xxx: Remove internal compatible string from Documentation Andrew Lunn
2014-07-28 13:22 ` Jason Cooper
2014-07-28 13:27 ` Andrew Lunn
2014-07-28 13:51 ` Arnd Bergmann
2014-07-28 14:12 ` Andrew Lunn [this message]
2014-07-28 14:35 ` Arnd Bergmann
2014-07-28 15:25 ` Andrew Lunn
2014-07-28 15:47 ` Arnd Bergmann
2014-07-28 15:52 ` Andrew Lunn
2014-07-28 16:03 ` Arnd Bergmann
2014-07-28 18:29 ` Jason Gunthorpe
2014-07-29 10:21 ` Arnd Bergmann
2014-07-30 8:44 ` Maxime Ripard
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=20140728141217.GE2891@lunn.ch \
--to=andrew@lunn.ch \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.