All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo@freescale.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>, <patches@linaro.org>,
	<netdev@vger.kernel.org>, <devicetree-discuss@lists.ozlabs.org>,
	Steve Glendinning <steve.glendinning@smsc.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] net/smsc911x: add device tree probe support
Date: Sat, 30 Jul 2011 00:03:44 +0800	[thread overview]
Message-ID: <20110729160343.GA2241@S2100-06.ap.freescale.net> (raw)
In-Reply-To: <20110729154723.GC11164@ponder.secretlab.ca>

On Fri, Jul 29, 2011 at 09:47:23AM -0600, Grant Likely wrote:
> On Fri, Jul 29, 2011 at 10:36:26AM +0800, Shawn Guo wrote:
> > On Mon, Jul 25, 2011 at 10:28:05PM -0400, Nicolas Pitre wrote:
> > > On Tue, 26 Jul 2011, Shawn Guo wrote:
> > > 
> > > > On Mon, Jul 25, 2011 at 09:16:40PM -0400, Nicolas Pitre wrote:
> > > > > On Tue, 26 Jul 2011, Shawn Guo wrote:
> > > > > 
> > > > > > On Mon, Jul 25, 2011 at 03:37:23PM -0600, Grant Likely wrote:
> > > > > > > On Mon, Jul 25, 2011 at 05:44:00PM +0800, Shawn Guo wrote:
> > > > > > > > It adds device tree probe support for smsc911x driver.
> > > > > > > > 
> > > > > > > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > > > > > > Cc: Grant Likely <grant.likely@secretlab.ca>
> > > > > > > > Cc: Steve Glendinning <steve.glendinning@smsc.com>
> > > > > > > > Cc: David S. Miller <davem@davemloft.net>
> > > > > > > > ---
> > > > > > > >  Documentation/devicetree/bindings/net/smsc.txt |   34 +++++++
> > > > > > > >  drivers/net/smsc911x.c                         |  123 +++++++++++++++++++-----
> > > > > > > >  2 files changed, 132 insertions(+), 25 deletions(-)
> > > > > > > >  create mode 100644 Documentation/devicetree/bindings/net/smsc.txt
> > > > > > > > 
> > > > > > > > diff --git a/Documentation/devicetree/bindings/net/smsc.txt b/Documentation/devicetree/bindings/net/smsc.txt
> > > > > > > > new file mode 100644
> > > > > > > > index 0000000..1920695
> > > > > > > > --- /dev/null
> > > > > > > > +++ b/Documentation/devicetree/bindings/net/smsc.txt
> > > > > > > > @@ -0,0 +1,34 @@
> > > > > > > > +* Smart Mixed-Signal Connectivity (SMSC) LAN Controller
> > > > > > > > +
> > > > > > > > +Required properties:
> > > > > > > > +- compatible : Should be "smsc,lan<model>""smsc,lan"
> > > > > > > 
> > > > > > > Drop "smsc,lan".  That's far too generic.
> > > > > > > 
> > > > > > The following devices are supported by the driver.
> > > > > > 
> > > > > > LAN9115, LAN9116, LAN9117, LAN9118
> > > > > > LAN9215, LAN9216, LAN9217, LAN9218
> > > > > > LAN9210, LAN9211
> > > > > > LAN9220, LAN9221
> > > > > > 
> > > > > > If we only keep specific <model> as the compatible, we will have a
> > > > > > long match table which is actually used nowhere to distinguish the
> > > > > > device.
> > > > > > 
> > > > > > So we need some level generic compatible to save the meaningless
> > > > > > long match table.  What about: 
> > > > > > 
> > > > > > static const struct of_device_id smsc_dt_ids[] = {
> > > > > >         { .compatible = "smsc,lan9", },
> > > > > >         { /* sentinel */ }
> > > > > > };
> > > > > > 
> > > > > > Or:
> > > > > > 
> > > > > > static const struct of_device_id smsc_dt_ids[] = {
> > > > > >         { .compatible = "smsc,lan91", },
> > > > > >         { .compatible = "smsc,lan92", },
> > > > > >         { /* sentinel */ }
> > > > > > };
> > > > > 
> > > > > None of this unambiguously distinguish the devices supported by this 
> > > > > driver and the smc91x driver which supports LAN91C92, LAN91C94, 
> > > > > LAN91C95, LAN91C96, LAN91C100, LAN91C110.
> > > > > 
> > > > So you suggest to make a long list to explicitly tell the device type
> > > > that the driver supports?
> > > 
> > > I'm not suggesting anything.  :-)  I'm merely pointing out that the 
> > > above .compatible = "smsc,lan9" or .compatible = "smsc,lan91" are too 
> > > generic given that there is another driver with different devices to 
> > > which they could also apply.
> > > 
> > Since I do not get any suggestion here, I'm going to follow the driver
> > name to use '911' as the model number.  Please tell me if there is any
> > better one.
> 
> What is the manufacturer part name?  lan9111 or lan91c11?  The
> manufacturer's documented part number is almost always preferred.
> 
I just posted the v2 of the patch, and chose to use 'smsc,lan9115'
which is the first model supported in the driver.  This is the same
approach I used with i.mx device bindings.

-- 
Regards,
Shawn


WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawn.guo@freescale.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>,
	patches@linaro.org, netdev@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org,
	Steve Glendinning <steve.glendinning@smsc.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] net/smsc911x: add device tree probe support
Date: Sat, 30 Jul 2011 00:03:44 +0800	[thread overview]
Message-ID: <20110729160343.GA2241@S2100-06.ap.freescale.net> (raw)
In-Reply-To: <20110729154723.GC11164@ponder.secretlab.ca>

On Fri, Jul 29, 2011 at 09:47:23AM -0600, Grant Likely wrote:
> On Fri, Jul 29, 2011 at 10:36:26AM +0800, Shawn Guo wrote:
> > On Mon, Jul 25, 2011 at 10:28:05PM -0400, Nicolas Pitre wrote:
> > > On Tue, 26 Jul 2011, Shawn Guo wrote:
> > > 
> > > > On Mon, Jul 25, 2011 at 09:16:40PM -0400, Nicolas Pitre wrote:
> > > > > On Tue, 26 Jul 2011, Shawn Guo wrote:
> > > > > 
> > > > > > On Mon, Jul 25, 2011 at 03:37:23PM -0600, Grant Likely wrote:
> > > > > > > On Mon, Jul 25, 2011 at 05:44:00PM +0800, Shawn Guo wrote:
> > > > > > > > It adds device tree probe support for smsc911x driver.
> > > > > > > > 
> > > > > > > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > > > > > > Cc: Grant Likely <grant.likely@secretlab.ca>
> > > > > > > > Cc: Steve Glendinning <steve.glendinning@smsc.com>
> > > > > > > > Cc: David S. Miller <davem@davemloft.net>
> > > > > > > > ---
> > > > > > > >  Documentation/devicetree/bindings/net/smsc.txt |   34 +++++++
> > > > > > > >  drivers/net/smsc911x.c                         |  123 +++++++++++++++++++-----
> > > > > > > >  2 files changed, 132 insertions(+), 25 deletions(-)
> > > > > > > >  create mode 100644 Documentation/devicetree/bindings/net/smsc.txt
> > > > > > > > 
> > > > > > > > diff --git a/Documentation/devicetree/bindings/net/smsc.txt b/Documentation/devicetree/bindings/net/smsc.txt
> > > > > > > > new file mode 100644
> > > > > > > > index 0000000..1920695
> > > > > > > > --- /dev/null
> > > > > > > > +++ b/Documentation/devicetree/bindings/net/smsc.txt
> > > > > > > > @@ -0,0 +1,34 @@
> > > > > > > > +* Smart Mixed-Signal Connectivity (SMSC) LAN Controller
> > > > > > > > +
> > > > > > > > +Required properties:
> > > > > > > > +- compatible : Should be "smsc,lan<model>""smsc,lan"
> > > > > > > 
> > > > > > > Drop "smsc,lan".  That's far too generic.
> > > > > > > 
> > > > > > The following devices are supported by the driver.
> > > > > > 
> > > > > > LAN9115, LAN9116, LAN9117, LAN9118
> > > > > > LAN9215, LAN9216, LAN9217, LAN9218
> > > > > > LAN9210, LAN9211
> > > > > > LAN9220, LAN9221
> > > > > > 
> > > > > > If we only keep specific <model> as the compatible, we will have a
> > > > > > long match table which is actually used nowhere to distinguish the
> > > > > > device.
> > > > > > 
> > > > > > So we need some level generic compatible to save the meaningless
> > > > > > long match table.  What about: 
> > > > > > 
> > > > > > static const struct of_device_id smsc_dt_ids[] = {
> > > > > >         { .compatible = "smsc,lan9", },
> > > > > >         { /* sentinel */ }
> > > > > > };
> > > > > > 
> > > > > > Or:
> > > > > > 
> > > > > > static const struct of_device_id smsc_dt_ids[] = {
> > > > > >         { .compatible = "smsc,lan91", },
> > > > > >         { .compatible = "smsc,lan92", },
> > > > > >         { /* sentinel */ }
> > > > > > };
> > > > > 
> > > > > None of this unambiguously distinguish the devices supported by this 
> > > > > driver and the smc91x driver which supports LAN91C92, LAN91C94, 
> > > > > LAN91C95, LAN91C96, LAN91C100, LAN91C110.
> > > > > 
> > > > So you suggest to make a long list to explicitly tell the device type
> > > > that the driver supports?
> > > 
> > > I'm not suggesting anything.  :-)  I'm merely pointing out that the 
> > > above .compatible = "smsc,lan9" or .compatible = "smsc,lan91" are too 
> > > generic given that there is another driver with different devices to 
> > > which they could also apply.
> > > 
> > Since I do not get any suggestion here, I'm going to follow the driver
> > name to use '911' as the model number.  Please tell me if there is any
> > better one.
> 
> What is the manufacturer part name?  lan9111 or lan91c11?  The
> manufacturer's documented part number is almost always preferred.
> 
I just posted the v2 of the patch, and chose to use 'smsc,lan9115'
which is the first model supported in the driver.  This is the same
approach I used with i.mx device bindings.

-- 
Regards,
Shawn


WARNING: multiple messages have this Message-ID (diff)
From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] net/smsc911x: add device tree probe support
Date: Sat, 30 Jul 2011 00:03:44 +0800	[thread overview]
Message-ID: <20110729160343.GA2241@S2100-06.ap.freescale.net> (raw)
In-Reply-To: <20110729154723.GC11164@ponder.secretlab.ca>

On Fri, Jul 29, 2011 at 09:47:23AM -0600, Grant Likely wrote:
> On Fri, Jul 29, 2011 at 10:36:26AM +0800, Shawn Guo wrote:
> > On Mon, Jul 25, 2011 at 10:28:05PM -0400, Nicolas Pitre wrote:
> > > On Tue, 26 Jul 2011, Shawn Guo wrote:
> > > 
> > > > On Mon, Jul 25, 2011 at 09:16:40PM -0400, Nicolas Pitre wrote:
> > > > > On Tue, 26 Jul 2011, Shawn Guo wrote:
> > > > > 
> > > > > > On Mon, Jul 25, 2011 at 03:37:23PM -0600, Grant Likely wrote:
> > > > > > > On Mon, Jul 25, 2011 at 05:44:00PM +0800, Shawn Guo wrote:
> > > > > > > > It adds device tree probe support for smsc911x driver.
> > > > > > > > 
> > > > > > > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > > > > > > Cc: Grant Likely <grant.likely@secretlab.ca>
> > > > > > > > Cc: Steve Glendinning <steve.glendinning@smsc.com>
> > > > > > > > Cc: David S. Miller <davem@davemloft.net>
> > > > > > > > ---
> > > > > > > >  Documentation/devicetree/bindings/net/smsc.txt |   34 +++++++
> > > > > > > >  drivers/net/smsc911x.c                         |  123 +++++++++++++++++++-----
> > > > > > > >  2 files changed, 132 insertions(+), 25 deletions(-)
> > > > > > > >  create mode 100644 Documentation/devicetree/bindings/net/smsc.txt
> > > > > > > > 
> > > > > > > > diff --git a/Documentation/devicetree/bindings/net/smsc.txt b/Documentation/devicetree/bindings/net/smsc.txt
> > > > > > > > new file mode 100644
> > > > > > > > index 0000000..1920695
> > > > > > > > --- /dev/null
> > > > > > > > +++ b/Documentation/devicetree/bindings/net/smsc.txt
> > > > > > > > @@ -0,0 +1,34 @@
> > > > > > > > +* Smart Mixed-Signal Connectivity (SMSC) LAN Controller
> > > > > > > > +
> > > > > > > > +Required properties:
> > > > > > > > +- compatible : Should be "smsc,lan<model>""smsc,lan"
> > > > > > > 
> > > > > > > Drop "smsc,lan".  That's far too generic.
> > > > > > > 
> > > > > > The following devices are supported by the driver.
> > > > > > 
> > > > > > LAN9115, LAN9116, LAN9117, LAN9118
> > > > > > LAN9215, LAN9216, LAN9217, LAN9218
> > > > > > LAN9210, LAN9211
> > > > > > LAN9220, LAN9221
> > > > > > 
> > > > > > If we only keep specific <model> as the compatible, we will have a
> > > > > > long match table which is actually used nowhere to distinguish the
> > > > > > device.
> > > > > > 
> > > > > > So we need some level generic compatible to save the meaningless
> > > > > > long match table.  What about: 
> > > > > > 
> > > > > > static const struct of_device_id smsc_dt_ids[] = {
> > > > > >         { .compatible = "smsc,lan9", },
> > > > > >         { /* sentinel */ }
> > > > > > };
> > > > > > 
> > > > > > Or:
> > > > > > 
> > > > > > static const struct of_device_id smsc_dt_ids[] = {
> > > > > >         { .compatible = "smsc,lan91", },
> > > > > >         { .compatible = "smsc,lan92", },
> > > > > >         { /* sentinel */ }
> > > > > > };
> > > > > 
> > > > > None of this unambiguously distinguish the devices supported by this 
> > > > > driver and the smc91x driver which supports LAN91C92, LAN91C94, 
> > > > > LAN91C95, LAN91C96, LAN91C100, LAN91C110.
> > > > > 
> > > > So you suggest to make a long list to explicitly tell the device type
> > > > that the driver supports?
> > > 
> > > I'm not suggesting anything.  :-)  I'm merely pointing out that the 
> > > above .compatible = "smsc,lan9" or .compatible = "smsc,lan91" are too 
> > > generic given that there is another driver with different devices to 
> > > which they could also apply.
> > > 
> > Since I do not get any suggestion here, I'm going to follow the driver
> > name to use '911' as the model number.  Please tell me if there is any
> > better one.
> 
> What is the manufacturer part name?  lan9111 or lan91c11?  The
> manufacturer's documented part number is almost always preferred.
> 
I just posted the v2 of the patch, and chose to use 'smsc,lan9115'
which is the first model supported in the driver.  This is the same
approach I used with i.mx device bindings.

-- 
Regards,
Shawn

  reply	other threads:[~2011-07-29 15:56 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25  9:44 [PATCH] net/smsc911x: add device tree probe support Shawn Guo
2011-07-25  9:44 ` Shawn Guo
2011-07-25  9:44 ` Shawn Guo
2011-07-25 21:37 ` Grant Likely
2011-07-25 21:37   ` Grant Likely
2011-07-26  1:01   ` Shawn Guo
2011-07-26  1:01     ` Shawn Guo
2011-07-26  1:16     ` Nicolas Pitre
2011-07-26  1:16       ` Nicolas Pitre
     [not found]       ` <alpine.LFD.2.00.1107252105561.12766-QuJgVwGFrdf/9pzu0YdTqQ@public.gmane.org>
2011-07-26  1:30         ` Shawn Guo
2011-07-26  1:30           ` Shawn Guo
2011-07-26  2:28           ` Nicolas Pitre
2011-07-26  2:28             ` Nicolas Pitre
2011-07-29  2:36             ` Shawn Guo
2011-07-29  2:36               ` Shawn Guo
2011-07-29  2:36               ` Shawn Guo
2011-07-29 15:47               ` Grant Likely
2011-07-29 15:47                 ` Grant Likely
2011-07-29 16:03                 ` Shawn Guo [this message]
2011-07-29 16:03                   ` Shawn Guo
2011-07-29 16:03                   ` Shawn Guo
2011-07-29 16:26                   ` Grant Likely
2011-07-29 16:26                     ` Grant Likely
2011-07-29 17:13                     ` Shawn Guo
2011-07-29 17:13                       ` Shawn Guo
2011-07-29 17:13                       ` Shawn Guo
2011-07-31  0:42                       ` Grant Likely
2011-07-31  0:42                         ` Grant Likely
2011-07-29 15:45           ` Grant Likely
2011-07-29 15:45             ` Grant Likely
     [not found] ` <1311587040-8988-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-07-29  8:43   ` [PATCH v2] " Shawn Guo
2011-07-29  8:43     ` Shawn Guo
2011-07-29 15:53     ` Grant Likely
2011-07-29 15:53       ` Grant Likely
2011-07-29 16:16       ` Shawn Guo
2011-07-29 16:16         ` Shawn Guo
2011-07-29 16:16         ` Shawn Guo
2011-07-30 18:26   ` [PATCH v3] " Shawn Guo
2011-07-30 18:26     ` Shawn Guo
2011-08-02  1:01     ` David Miller
2011-08-02  1:01       ` David Miller
2011-09-08 14:59     ` Dave Martin
2011-09-08 14:59       ` Dave Martin
     [not found]       ` <20110908145946.GE2070-5wv7dgnIgG8@public.gmane.org>
2011-09-08 18:29         ` Grant Likely
2011-09-08 18:29           ` Grant Likely
2011-09-09  8:50           ` Dave Martin
2011-09-09  8:50             ` Dave Martin
2011-09-09 12:59             ` Shawn Guo
2011-09-09 12:59               ` Shawn Guo
2011-09-09 12:59               ` Shawn Guo
2011-09-09 11:48       ` Shawn Guo
2011-09-09 11:48         ` Shawn Guo
2011-09-09 11:48         ` Shawn Guo

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=20110729160343.GA2241@S2100-06.ap.freescale.net \
    --to=shawn.guo@freescale.com \
    --cc=davem@davemloft.net \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=patches@linaro.org \
    --cc=shawn.guo@linaro.org \
    --cc=steve.glendinning@smsc.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 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.