Re: [PATCH 1/2] Add OF binding helpers for MMC drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 21, 2011 at 4:14 PM, Grant Likely <grant.likely@xxxxxxxxxxxx> wrote:
> On Thu, Apr 21, 2011 at 03:19:57PM +0200, Domenico Andreoli wrote:
>> From: Domenico Andreoli <cavokz@xxxxxxxxx>
>>
>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux