[PATCH 4/7] USB chipidea: introduce dual role mode pdata flags
Alexander Shishkin
alexander.shishkin at linux.intel.com
Tue Jun 4 19:31:31 EST 2013
Peter Chen <hzpeterchen at gmail.com> writes:
> On Mon, Jun 3, 2013 at 8:37 PM, Alexander Shishkin
> <alexander.shishkin at linux.intel.com> wrote:
>> Michael Grzeschik <mgr at pengutronix.de> writes:
>>
>>> From: Sascha Hauer <s.hauer at pengutronix.de>
>>>
>>> Even if a chipidea core is otg capable the board may not. This allows
>>
>> "may not be"
>>
>>> to explicitly set the core to host/peripheral mode. Without these
>>> flags the driver falls back to the old behaviour.
>>>
>>> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
>>> ---
>>
>> [snip]
>>
>>> + if (!ci->platdata->dr_mode)
>>> + ci->platdata->dr_mode = of_usb_get_dr_mode(dev->of_node);
>>
>> same as previous one, let's keep it in the platform.
>
> Alex, have you made the conclusion with Felipe, whether we need DT support
> at core driver to handle such kinds of things or use platform data is ok?
> Last time, I remember he disagreed the way this patch uses.
He wanted everything to be fetched from the core driver, I wanted
most things to be fetched from the platform driver, we never came to a
common denominator, though. This (and the other one) patch is made to
fetch phy_mode and dr_mode from the core if it's not passed from the
platform driver, so pretty much Felipe's idea. The more I think about it
now, the more it makes sense to me too. For instance, this way we can
avoid any extra boilerplate platform code.
So, we're going to have it this way for now.
Regards,
--
Alex
More information about the devicetree-discuss
mailing list