From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Li, Jiebing" <jiebing.li@intel.com>
Cc: Pierre Ossman <pierre@ossman.eu>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Johnson, Charles F" <charles.f.johnson@intel.com>,
"Zhu, Daniel" <daniel.zhu@intel.com>,
"Yuan, Hang" <hang.yuan@intel.com>,
"Li, Jiebing" <jiebing.li@intel.com>
Subject: Re: [PATCH 1/1] MMC: SDIO driver for Intel Moorestown platform
Date: Mon, 15 Jun 2009 13:26:22 +0100 [thread overview]
Message-ID: <20090615132622.45fce509@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <95608CFE3D0C064B8468DB61F8403BE036C19F9C0E@PDSMSX501.ccr.corp.intel.com>
> + /*
> + * Read the common CIS tuples.
> + */
> + err = sdio_read_cccr(card);
> + if (err)
> + goto remove;
> +
> +#ifdef CONFIG_MRST_MMC_WR
> + /* restricting to 24MHz for Langwell A0 */
> + if (card->cis.max_dtr > 24000000)
> + card->cis.max_dtr = 24000000;
> +#endif
What if you have an SDIO device on a PCI card plugged into the system ?
You need some kind of card specific "fix up" call as a lot of other
drivers have I suspect ?
>
> for (i = 0;i < host->card->sdio_funcs;i++) {
> if (host->card->sdio_func[i]) {
> +#ifdef CONFIG_SDIO_SUSPEND
> + sdio_remove_sysfs_file(host->card->sdio_func[i]);
> +#endif
Would be cleaner to always define sdio_remove_sysfs_file() and arrange in
the header files that this is
#define sdio_remove_sysfs_file(x) do {} while (0)
> static const struct mmc_bus_ops mmc_sdio_ops = {
> .remove = mmc_sdio_remove,
> .detect = mmc_sdio_detect,
> + .suspend = mmc_sdio_suspend,
> + .resume = mmc_sdio_resume,
> };
You always expose suspend/resume yet you ifdef other stuff ?
>
> @@ -323,6 +722,10 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr)
> goto err;
> }
>
> +#ifdef CONFIG_SDIO_SUSPEND
> + mutex_init(&card->pm_mutex);
> +#endif
Again this and the create_sysfs_file one could be hidden more nicely in
the header
>
prev parent reply other threads:[~2009-06-15 12:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 12:05 Li, Jiebing
2009-06-15 12:26 ` Alan Cox [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=20090615132622.45fce509@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=charles.f.johnson@intel.com \
--cc=daniel.zhu@intel.com \
--cc=hang.yuan@intel.com \
--cc=jiebing.li@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre@ossman.eu \
/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
all inboxes | Powered by JetHome®