Re: [PATCH v2 03/11] mmc: provide a standard MMC device-tree binding parser centrally

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

 



Hi Joseph

On Fri, 25 Jan 2013, Joseph Lo wrote:

> Hi Guennadi,
> 
> > MMC defines a number of standard DT bindings. Having each driver parse
> > them individually adds code redundancy and is error prone. Provide a
> > standard function to unify the parsing. After all drivers are
> converted
> > to using it instead of their own parsers, this function can be
> integrated
> > into mmc_alloc_host().
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
> 
> I saw you introducing the "mmc_of_parse" API here. It looks pretty
> similar to the "sdhci_get_of_property" that under
> "drivers/mmc/host/sdhci-pltfm.c".

Yes, several drivers have their own functions to parse MMC DT bindings, 
whereas, I think, a common helper function can be used to parse generic 
MMC bindings.

> Does this function can be enhanced in
> "sdhci_get_of_property" or replaced it?

The goal is to make all MMC host drivers, running on DT-enabled systems, 
use the new mmc_of_parse() function and, additionally, their own parser 
for any their host-specific properties. As I wrote in the patch commit 
message, if we get all drivers converted to use it, it can be later 
integrated into mmc_alloc_host().

> Or its use for different DT
> property bindings, one is for mmc (you introduced here), the other is
> for sdhci. Just curious, how do I determine which one should I use in
> the sdhci/mmc host driver?

The best would be to (1) convert SDHCI core to use mmc_of_parse(), (2) 
have all SDHCI implementations use that feature either implicitly, having 
SDHCI core call it automatically during its initialisation, or explicitly, 
during their own probing.

> And after this one "[PATCH/RFC] mmc: add DT bindings for more MMC
> capability flags", some of the properties parsing were overlap and some
> were not. If the host driver uses the standard property but it was being
> separated to these two different of_parse function, I need to call both
> of them. Sorry, I am not sure the sdhci and mmc do have different
> specific properties and should separate to two different functions.

As I said, SDHCI (and other host drivers) should be converted to use 
mmc_of_parse() in addition to their own vendor-specific DT property 
parsing.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
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