public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Peppe CAVALLARO <peppe.cavallaro@st.com>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"matt@console-pimps.org" <matt@console-pimps.org>
Subject: Re: [PATCH] mmc: add SDHCI driver for STM platforms (V2)
Date: Thu, 23 Sep 2010 11:30:26 +0200	[thread overview]
Message-ID: <4C9B1E32.4070700@st.com> (raw)
In-Reply-To: <20100923084716.GB2994@pengutronix.de>

On 09/23/2010 10:48 AM, Wolfram Sang wrote:
> I think it will be better to give init() access to all information
> needed than to implement another hook. I tried with this patch
> 
> https://patchwork.kernel.org/patch/196992/
> 
> I am still not sure what kind of information you need from the pdev. Can
> you create a branch somewhere with your current work?


Hi Wolfram,
I've just sent some patches and I used the .init as you wanted.

Fortunately the problem can be resolved without modifying .init within
the sdhci_pltfm_data structure.

The sdhci_host structure has the mmc field that also has the pointer to
the device parent.
This can be used for getting the device structure pointer in my platform.
For example, below there is the piece of code added, in my platform, to
use the sdhci-pltfm driver.

It works fine without modifying other files.

What do you think?

Regards,
Peppe

[snip]

static int mmc_pad_resources(struct sdhci_host *sdhci)
{
        if (!devm_stm_pad_claim(sdhci->mmc->parent,
                                &stx7108_mmc_pad_config,
                                dev_name(sdhci->mmc->parent)))
                return -ENODEV;

        return 0;
}

static struct sdhci_pltfm_data stx7108_mmc_platform_data = {
                .init = &mmc_pad_resources,
                .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
};

static struct platform_device stx7108_mmc_device = {
                .name = "sdhci",

[snip]

> 
> Regards,
> 
>    Wolfram
> 

  reply	other threads:[~2010-09-23  9:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-20  8:20 [PATCH] mmc: add SDHCI driver for STM platforms (V2) Giuseppe CAVALLARO
2010-09-20  8:38 ` Wolfram Sang
2010-09-21  9:21   ` Peppe CAVALLARO
2010-09-21  9:44     ` Wolfram Sang
2010-09-22 13:31       ` Peppe CAVALLARO
2010-09-22 14:12         ` Wolfram Sang
2010-09-22 14:35           ` Peppe CAVALLARO
2010-09-23  6:48             ` Peppe CAVALLARO
2010-09-23  8:48             ` Wolfram Sang
2010-09-23  9:30               ` Peppe CAVALLARO [this message]
2010-09-23  9:51                 ` Wolfram Sang
2010-09-23 10:05                   ` Peppe CAVALLARO

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=4C9B1E32.4070700@st.com \
    --to=peppe.cavallaro@st.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=matt@console-pimps.org \
    --cc=w.sang@pengutronix.de \
    /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