Re: [PATCH 1/3 v2] usb: tegra20-ehci: Add devicetree support.

From: Grant Likely
Date: Wed Jul 20 2011 - 16:29:16 EST

On Wed, Jul 20, 2011 at 2:27 PM, Andrew Chew <AChew@xxxxxxxxxx> wrote:
>> >> Can the driver use sane defaults for any of these values?
>> This patch
>> >> will be a lot smaller if there isn't the need to check all
>> the return
>> >> values each time.
>> >
>> > The defaults are in the dt ehci node.  I'd really hate to
>> duplicate these defaults in C code as well, if that's what
>> you're suggesting (they're already duplicated privately
>> elsewhere, sadly, in mach-tegra, but I'm hoping those
>> defaults can go away once we move over to dt for good).  By
>> failing probe if these defaults aren't present, I think it
>> helps make sure the dt ehci node stays in sync with the code.
>> I'm saying that if the binding and the driver encode sane defaults for
>> those parameters, then the properties don't need to appear in the .dts
>> at all unless they are being overridden.  It is by no means a critical
>> issue though.  Do what makes the most sense to you.
> I see.  I think that makes sense as well.  To be clear, you're suggesting to document the defaults in the bindings file, and have the defaults in the driver (C code).  Then omit the properties from the dts entirely unless they are different (i.e. the dts will no longer have any default values specified), right?  If that's more consistent with how the other drivers will work, I'll do that.

Yes, that's what I'm saying. Again, it's up to you on whatever makes
the most sense.


Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at