linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Domenico Andreoli <cavokz@gmail.com>
To: Grant Likely <grant.likely@secretlab.ca>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Ben Dooks <ben-linux@fluff.org>
Cc: devicetree-discuss@lists.ozlabs.org, linux-mmc@vger.kernel.org,
	spi-devel-general@lists.sourceforge.net
Subject: Re: [PATCH 1/2] Add OF binding helpers for MMC drivers
Date: Fri, 22 Apr 2011 11:02:30 +0200	[thread overview]
Message-ID: <BANLkTinOip+px9J1-NkbGiWG9NTqmKjhBw@mail.gmail.com> (raw)
In-Reply-To: <20110421141450.GB32725@ponder.secretlab.ca>

On Thu, Apr 21, 2011 at 4:14 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Thu, Apr 21, 2011 at 03:19:57PM +0200, Domenico Andreoli wrote:
>> From: Domenico Andreoli <cavokz@gmail.com>
>>
>> This patch adds helpers to manage OF binding of MMC DeviceTree configs.
>> They don't cover all the MMC configuration cases, indeed are only a
>> slight generalization of those found in the MMC-over-SPI driver. More
>> will come later.
>
> Can the mmc-over-spi driver be generalized to use this code too?

I made a mess with the patches... the second one of this set _is_ mmc-over-spi
converted to this generalization. Instead I sent GPIO OF stuff... sorry.

>> +/* Card detect and Read only Gpio data */
>> +struct of_mmc_crg {
>> +     int gpios[NUM_MMC_GPIOS];
>> +     int alow_gpios[NUM_MMC_GPIOS];
>> +     int cd_irq;
>> +};
>
> Many drivers currently provide this data via a platform_data.  It
> would probably be more useful and require less code if both DT and
> non-DT users shared the same structure for MMC gpios.  The structure
> could both be embedded in pdata and populated by this DT parsing code.
> It would also mean that each driver wouldn't need separate DT and
> non-DT code for consuming the information.

I agree, indeed I'm not able to use these helpers within the s3c-mmc driver
without duplicating and writing ugly code.

I made some "research" so I have few patches of tries which made me learn
a bit. There is not a common management of these as well as of the
set_power() callbacks, to say those I learned about looking at S3C MMC.

In practice also MMC platform datas require some consolidation.

Kgene, Ben, do you plan to work on the S3C MCI driver? Can I spend some
time on it without duplicating the effort of anybody?

Regards,
Domenico

-----[ Domenico Andreoli, aka cavok
 --[ http://cavokz.wordpress.com/gpgkey/
   ---[ 3A0F 2F80 F79C 678A 8936  4FEE 0677 9033 A20E BC50

      reply	other threads:[~2011-04-22  9:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21 13:19 [PATCH 1/2] Add OF binding helpers for MMC drivers Domenico Andreoli
2011-04-21 14:14 ` Grant Likely
2011-04-22  9:02   ` Domenico Andreoli [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=BANLkTinOip+px9J1-NkbGiWG9NTqmKjhBw@mail.gmail.com \
    --to=cavokz@gmail.com \
    --cc=ben-linux@fluff.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=kgene.kim@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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).