devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Chris Ball <chris@printf.net>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	Markus Niebel <Markus.Niebel@tq-group.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH v3] mmc: implement Driver Stage Register handling
Date: Fri, 15 Aug 2014 10:21:48 +0200	[thread overview]
Message-ID: <20140815082148.GF5134@pengutronix.de> (raw)
In-Reply-To: <CAPDyKFqKVvwFi+JoOG-O1jznOB1UyhQW_ovb_N=+G_FtoqXQXA@mail.gmail.com>

Hello Ulf,

On Thu, Aug 14, 2014 at 11:26:28AM +0200, Ulf Hansson wrote:
> > diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
> > index 95cceae96944..52e83f389428 100644
> > --- a/drivers/mmc/core/host.c
> > +++ b/drivers/mmc/core/host.c
> > @@ -452,6 +452,14 @@ int mmc_of_parse(struct mmc_host *host)
> >         if (of_find_property(np, "mmc-hs400-1_2v", &len))
> >                 host->caps2 |= MMC_CAP2_HS400_1_2V | MMC_CAP2_HS200_1_2V_SDR;
> >
> > +       if (of_find_property(np, "dsr", &len)) {
> > +               u32 tmp;
> > +
> > +               of_property_read_u32(np, "dsr", &tmp);
> > +               host->dsr_req = 1;
> > +               host->dsr = (u16)tmp;
> > +       }
> > +
> 
> Let's simplify the above with just:
> of_property_read_u16(np, "dsr", &host->dsr);
The downside here is that the syntax changes when using
of_property_read_u16. Instead of

	dsr = <0x100>

the following must be written then:

	dsr = /bits/ 16 <0x100>;

so I'd prefer to stay with of_property_read_u32. The block can still be
simplified. Will fix that in v4.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

      parent reply	other threads:[~2014-08-15  8:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 15:44 [PATCH v3] mmc: implement Driver Stage Register handling Uwe Kleine-König
2014-08-13 15:57 ` Uwe Kleine-König
2014-08-14  9:26 ` Ulf Hansson
2014-08-14  9:49   ` Uwe Kleine-König
2014-08-14 10:29     ` Ulf Hansson
2014-08-15  8:21   ` Uwe Kleine-König [this message]

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=20140815082148.GF5134@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=Markus.Niebel@tq-group.com \
    --cc=chris@printf.net \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --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).