[PATCH v2 1/2] of_mtd: Add helpers to get ECC strength and ECC step size
Ezequiel Garcia
ezequiel.garcia at free-electrons.com
Tue Feb 18 15:25:53 EST 2014
On Tue, Feb 18, 2014 at 09:01:11PM +0100, Boris BREZILLON wrote:
> Le 18/02/2014 19:51, Ezequiel Garcia a écrit :
> > This commit adds simple helpers to obtain the devicetree properties
> > that specify the ECC strength and ECC step size to use on a given
> > NAND controller.
>
> As already discussed with you, IMHO these 2 properties should both
> be available to be meaningful, hence, we should provide an helper
> function that gets both properties or return an error if one of them
> is missing.
>
I think this way is both cleaner and simpler. I don't see the advantage
of having a single function.
> Do you plan to provide a default value (within controller drivers) if one
> of these properties is missing ? In this case seperating the helper
> functions make sense.
>
Being a general framework, we can't know what drivers will want to do,
which is why I usually like helper function to say as simple as
policy-free as possible.
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
More information about the linux-mtd
mailing list