public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.ml.walleij@gmail.com>
To: Yusuke Goda <goda.yusuke@renesas.com>
Cc: linux-mmc@vger.kernel.org, akpm@linux-foundation.org,
	Magnus Damm <magnus.damm@gmail.com>
Subject: Re: tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support
Date: Mon, 15 Feb 2010 19:00:55 +0100	[thread overview]
Message-ID: <63386a3d1002151000m77c9a02dhbcd626ff2a42b3ef@mail.gmail.com> (raw)
In-Reply-To: <4B790102.4050907@renesas.com>

2010/2/15 Yusuke Goda <goda.yusuke@renesas.com>:

> diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
> index 9cb1834..695199a 100644
> --- a/include/linux/mfd/tmio.h
> +++ b/include/linux/mfd/tmio.h
> @@ -60,6 +60,7 @@ void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state);
>  */
>  struct tmio_mmc_data {
>        const unsigned int              hclk;
> +       int                             cap_highspeed;

If this is really a bool, then declare it as a bool.

But isn't it better to be able to specify arbitary caps for the platform?
So make this an

unsigned long capabilities;

instead?  Else you will get in trouble the day you want to tag
on something else (like MMC_CAP_SD_HIGHSPEED), and it
doesn't make sense to extend the struct with bools for just about
everything.

Such a change would result in:

> diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
> (...)
>        mmc->caps = MMC_CAP_4_BIT_DATA;
> +       if (pdata->cap_highspeed)
> +               mmc->caps |= MMC_CAP_MMC_HIGHSPEED;

mmc->caps |= pdata->capabilities;

..and then set .capabilities to MMC_CAP_MMC_HIGHSPEED in the
platform data.

Linus

      parent reply	other threads:[~2010-02-15 18:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-15  8:08 tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support Yusuke Goda
2010-02-15 12:15 ` Magnus Damm
2010-02-16 22:32   ` Andrew Morton
2010-02-15 18:00 ` Linus Walleij [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=63386a3d1002151000m77c9a02dhbcd626ff2a42b3ef@mail.gmail.com \
    --to=linus.ml.walleij@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=goda.yusuke@renesas.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=magnus.damm@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox