All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Thomas Abraham <thomas.abraham@linaro.org>,
	linux-mmc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org, cjb@laptop.org,
	rob.herring@calxeda.com, linux-samsung-soc@vger.kernel.org,
	kgene.kim@samsung.com, ben-linux@fluff.org
Subject: Re: [PATCH 6/6] mmc: sdhci-s3c: Add device tree support
Date: Tue, 31 Jan 2012 07:13:38 +0100	[thread overview]
Message-ID: <201201310713.39553.heiko@sntech.de> (raw)
In-Reply-To: <20120130190114.GR28397@ponder.secretlab.ca>

Am Montag 30 Januar 2012, 20:01:14 schrieb Grant Likely:
> On Mon, Jan 30, 2012 at 10:51:11AM +0100, Heiko Stübner wrote:
> > Am Mittwoch, 2. November 2011, 21:36:03 schrieb Thomas Abraham:
> > 
> > Hi Thomas,
> > 
> > in patch 1/6:
> > > +static struct platform_device_id sdhci_s3c_driver_ids[] = {
> > > +       {
> > > +               .name           = "s3c-sdhci",
> > > +               .driver_data    = (kernel_ulong_t)NULL,
> > > +       },
> > > +       {
> > > +               .name           = "exynos4-sdhci",
> > > +               .driver_data    = EXYNOS4_SDHCI_DRV_DATA,
> > > +       },
> > > +};
> > > +MODULE_DEVICE_TABLE(platform, sdhci_s3c_driver_ids);
> > 
> > and in patch 6/6:
> > > +#ifdef CONFIG_OF
> > > +static const struct of_device_id sdhci_s3c_dt_match[] = {
> > > +	{ .compatible = "samsung,s3c6410-sdhci", },
> > > +	{ .compatible = "samsung,exynos4210-sdhci",
> > > +		.data = &exynos4_sdhci_drv_data },
> > > +	{},
> > > +};
> > > +MODULE_DEVICE_TABLE(of, sdhci_s3c_dt_match);
> > 
> > wouldn't it be better to keep the naming consistent between of and
> > non-of? I.e. s3c-sdhci vs. s3c6410-sdhci. Since the driver is used for
> > all S3C SoCs containing hsmmc controllers I think s3c-sdhci would be
> > preferable here.
> 
> History has shown that future devices aren't always compatible with earlier
> ones.  Compatible strings are expected to be specific to an exact device to
> reduce the possibility of new hardware breaking assumptions.
> 
> Instead, new hardware can either claim compatibility with older
> compatible strings (the compatible property in the DT is a list), or
> can have the new string added to the match table in the driver;
> whichever option makes the most sense.
ah, ok. Thanks for the explanation and I will keep that in mind.

Heiko

WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/6] mmc: sdhci-s3c: Add device tree support
Date: Tue, 31 Jan 2012 07:13:38 +0100	[thread overview]
Message-ID: <201201310713.39553.heiko@sntech.de> (raw)
In-Reply-To: <20120130190114.GR28397@ponder.secretlab.ca>

Am Montag 30 Januar 2012, 20:01:14 schrieb Grant Likely:
> On Mon, Jan 30, 2012 at 10:51:11AM +0100, Heiko St?bner wrote:
> > Am Mittwoch, 2. November 2011, 21:36:03 schrieb Thomas Abraham:
> > 
> > Hi Thomas,
> > 
> > in patch 1/6:
> > > +static struct platform_device_id sdhci_s3c_driver_ids[] = {
> > > +       {
> > > +               .name           = "s3c-sdhci",
> > > +               .driver_data    = (kernel_ulong_t)NULL,
> > > +       },
> > > +       {
> > > +               .name           = "exynos4-sdhci",
> > > +               .driver_data    = EXYNOS4_SDHCI_DRV_DATA,
> > > +       },
> > > +};
> > > +MODULE_DEVICE_TABLE(platform, sdhci_s3c_driver_ids);
> > 
> > and in patch 6/6:
> > > +#ifdef CONFIG_OF
> > > +static const struct of_device_id sdhci_s3c_dt_match[] = {
> > > +	{ .compatible = "samsung,s3c6410-sdhci", },
> > > +	{ .compatible = "samsung,exynos4210-sdhci",
> > > +		.data = &exynos4_sdhci_drv_data },
> > > +	{},
> > > +};
> > > +MODULE_DEVICE_TABLE(of, sdhci_s3c_dt_match);
> > 
> > wouldn't it be better to keep the naming consistent between of and
> > non-of? I.e. s3c-sdhci vs. s3c6410-sdhci. Since the driver is used for
> > all S3C SoCs containing hsmmc controllers I think s3c-sdhci would be
> > preferable here.
> 
> History has shown that future devices aren't always compatible with earlier
> ones.  Compatible strings are expected to be specific to an exact device to
> reduce the possibility of new hardware breaking assumptions.
> 
> Instead, new hardware can either claim compatibility with older
> compatible strings (the compatible property in the DT is a list), or
> can have the new string added to the match table in the driver;
> whichever option makes the most sense.
ah, ok. Thanks for the explanation and I will keep that in mind.

Heiko

  reply	other threads:[~2012-01-31  6:13 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 20:35 [PATCH 0/6] mmc: sdhci-s3c: Rework platform data and add device tree support Thomas Abraham
2011-11-02 20:35 ` Thomas Abraham
2011-11-02 20:35 ` [PATCH 1/6] mmc: sdhci-s3c: Remove usage of clk_type member in platform data Thomas Abraham
2011-11-02 20:35   ` Thomas Abraham
     [not found] ` <1320266163-15292-1-git-send-email-thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-11-02 20:35   ` [PATCH 2/6] arm: exynos4: use 'exynos4-sdhci' as device name for sdhci controllers Thomas Abraham
2011-11-02 20:35     ` Thomas Abraham
2011-11-02 20:36   ` [PATCH 3/6] arm: samsung: remove all uses of clk_type member in sdhci platform data Thomas Abraham
2011-11-02 20:36     ` Thomas Abraham
2011-11-02 20:36 ` [PATCH 4/6] mmc: sdhci-s3c: Keep a copy of platform data and use it Thomas Abraham
2011-11-02 20:36   ` Thomas Abraham
2011-11-02 20:36 ` [PATCH 5/6] mmc: Add OF bindings support for mmc host controller capabilities Thomas Abraham
2011-11-02 20:36   ` Thomas Abraham
2011-11-04 19:57   ` Olof Johansson
2011-11-04 19:57     ` Olof Johansson
     [not found]     ` <20111104195717.GA3045-O5ziIzlqnXUVNXGz7ipsyg@public.gmane.org>
2011-11-07 14:21       ` Thomas Abraham
2011-11-07 14:21         ` Thomas Abraham
2011-11-07 21:15         ` Grant Likely
2011-11-07 21:15           ` Grant Likely
2011-11-08 15:19           ` Thomas Abraham
2011-11-08 15:19             ` Thomas Abraham
2011-11-02 20:36 ` [PATCH 6/6] mmc: sdhci-s3c: Add device tree support Thomas Abraham
2011-11-02 20:36   ` Thomas Abraham
2011-11-07 21:17   ` Grant Likely
2011-11-07 21:17     ` Grant Likely
2011-11-08 15:23     ` Thomas Abraham
2011-11-08 15:23       ` Thomas Abraham
2012-01-04 15:37       ` Sylwester Nawrocki
2012-01-04 15:37         ` Sylwester Nawrocki
2012-01-05 15:45         ` Thomas Abraham
2012-01-05 15:45           ` Thomas Abraham
2012-01-05 16:22           ` Sylwester Nawrocki
2012-01-05 16:22             ` Sylwester Nawrocki
2012-01-05 16:43             ` Thomas Abraham
2012-01-05 16:43               ` Thomas Abraham
2012-01-30  9:51   ` Heiko Stübner
2012-01-30  9:51     ` Heiko Stübner
2012-01-30 19:01     ` Grant Likely
2012-01-30 19:01       ` Grant Likely
2012-01-31  6:13       ` Heiko Stübner [this message]
2012-01-31  6:13         ` Heiko Stübner

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=201201310713.39553.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=ben-linux@fluff.org \
    --cc=cjb@laptop.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=thomas.abraham@linaro.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.