devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	linux-omap@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org
Subject: Re: [PATCH 1/2] mmc: omap_hsmmc: Add support for slot-name property in DT
Date: Mon, 18 May 2015 08:06:07 -0700	[thread overview]
Message-ID: <20150518150607.GD10274@atomide.com> (raw)
In-Reply-To: <3099867.Z5GbY7oWl2@wuerfel>

* Arnd Bergmann <arnd@arndb.de> [150515 14:26]:
> On Friday 15 May 2015 23:22:37 Pali Rohár wrote:
> > On Friday 15 May 2015 23:19:44 Arnd Bergmann wrote:
> > > On Friday 15 May 2015 23:14:48 Pali Rohár wrote:
> > > > diff --git a/drivers/mmc/host/omap_hsmmc.c
> > > > b/drivers/mmc/host/omap_hsmmc.c index 9df2b68..f6073dd 100644
> > > > --- a/drivers/mmc/host/omap_hsmmc.c
> > > > +++ b/drivers/mmc/host/omap_hsmmc.c
> > > > @@ -1901,6 +1901,8 @@ static struct omap_hsmmc_platform_data
> > > > *of_get_hsmmc_pdata(struct device *dev)
> > > > 
> > > >         if (of_find_property(np, "ti,needs-special-hs-handling",
> > > >         NULL))
> > > >         
> > > >                 pdata->features |= HSMMC_HAS_HSPE_SUPPORT;
> > > > 
> > > > +       of_property_read_string(np, "slot-name", &pdata->name);
> > > > +
> > > > 
> > > >         return pdata;
> > > >  
> > > >  }
> > > 
> > > This property needs to be documented in
> > > Documentation/devicetree/bindings/mmc/mmc.txt and preferably the
> > > implementation moved into mmc_of_parse.
> > > 
> > > We should not have an interface like this specific to one driver.
> > > 
> > >       Arnd
> > 
> > Interface is already present for platform data code (which do not use 
> > DT). So "pdata->name" is not DT specific...
> > 
> 
> The driver can of course keep providing the name from platform_data where
> that is used. All I was saying is that when you introduce a DT property,
> it should not be specific to that driver.

Yes sounds like it would be a usable generic binding. Not sure
that it should be called slot-name though, maybe you can use
the MMC driver instance name instead? I don't think much any drivers
support multiple MMC slots although it's in the original MMC spec.

If setting up the generic binding is expected to take a while,
you can naturally pass it in pdata while waiting for the generic
binding to get merged.

Regards,

Tony

  reply	other threads:[~2015-05-18 15:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 21:14 [PATCH 0/2] omap_hsmmc: Supports slot-name also in DT Pali Rohár
     [not found] ` <1431724489-32359-1-git-send-email-pali.rohar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-15 21:14   ` [PATCH 1/2] mmc: omap_hsmmc: Add support for slot-name property " Pali Rohár
2015-05-15 21:19     ` Arnd Bergmann
2015-05-15 21:22       ` Pali Rohár
2015-05-15 21:25         ` Arnd Bergmann
2015-05-18 15:06           ` Tony Lindgren [this message]
     [not found]             ` <20150518150607.GD10274-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2015-05-18 15:07               ` Arnd Bergmann
2015-12-25 12:53                 ` Pali Rohár
2015-12-28 14:14                   ` Arnd Bergmann
2015-12-28 14:28                     ` Pali Rohár
2015-12-28 14:41                       ` Arnd Bergmann
2015-12-28 14:54                         ` Pali Rohár
2015-12-28 14:55                           ` Arnd Bergmann
2016-01-02 15:22                             ` Pali Rohár
2016-01-02 22:57                               ` Arnd Bergmann
2016-01-02 23:03                                 ` Pali Rohár
2016-01-02 23:17                                   ` Arnd Bergmann
2015-05-15 21:14 ` [PATCH 2/2] omap3-n900.dts: Add slot-name properties for mmc devices Pali Rohár

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=20150518150607.GD10274@atomide.com \
    --to=tony@atomide.com \
    --cc=arnd@arndb.de \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=ulf.hansson@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 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).