Re: [PATCHv7 1/8] usb: dwc2: Update the gadget driver to use common dwc2_hsotg structure

From: Roy
Date: Thu Nov 20 2014 - 21:20:27 EST


Hi Dinh:

On 2014/11/12 1:13, dinguyen@xxxxxxxxxxxxxxxxxxxxx wrote:
> From: Dinh Nguyen <dinguyen@xxxxxxxxxxxxxxxxxxxxx>
>
> Adds the gadget data structure and appropriate data structure pointers
> to the common dwc2_hsotg data structure. To keep the driver data
> dereference code looking clean, the gadget variable declares are only available
> for peripheral and dual-role mode. This is needed so that the dwc2_hsotg data
> structure can be used by the hcd and gadget drivers.
>
> Updates gadget.c to use the dwc2_hsotg data structure and gadget pointers
> that have been moved into the common dwc2_hsotg structure.
>
> Signed-off-by: Dinh Nguyen <dinguyen@xxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Paul Zimmerman <paulz@xxxxxxxxxxxx>
> ---
> v7: Addressed comments from Felipe Balbi on which variables should not be just
> limited to gadget(phy, uphy, regulator_bulk_data_supplies, irq, clk,
> debug_root, debug_file, and debug_fifo).
I hope your dual-roal patches could bring the intializtion code of
hsotg->clk and hsotg->phy out from dwc2_gadget_init() into
dwc2_driver_probe() like intializtion of irq and regs base address.
Because the host-only platforms may also need clk gating when enter
suspend for power saving.
> v6: None
> v5: Keep the changes to mininum and maintain hcd and gadget driver to build
> and work separately. Use IS_ENABLED() instead of #if defined
> v3: Updated with paulz's suggestion to avoid double pointers.
> v2: Left the function parameter name as 'hsotg' and just changed its type.
>

--
--------
Roy Li @ Rockchip

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/