Hi,

On Mon, Jul 09, 2012 at 04:23:15PM +0800, Peter Chen wrote:
> Since we will have a standalone USB PHY layer, the first step is
> to move some non-PHY related things out of struct usb_phy. 
> It has lots of things need to do, this one is just the beginning.
> 
> The enum usb_otg_state should be not relationship with USB PHY, so
> move it out.
> 
> A formal patch should include the modification for related drivers,
> I send this RFC is just want to know if everyone agrees to this change,
> If there is no disagreement, I will send out a formal patch later.
> 
> Signed-off-by: Peter Chen <peter.c...@freescale.com>
> ---
>  include/linux/usb/otg.h |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
> index 0cb2ec2..f077cb3 100644
> --- a/include/linux/usb/otg.h
> +++ b/include/linux/usb/otg.h
> @@ -67,6 +67,8 @@ struct usb_otg {
>       struct usb_bus          *host;
>       struct usb_gadget       *gadget;
>  
> +     enum usb_otg_state      state;

looks correct. Now that struct usb_otg should handle all otg details, it
makes sense to put the state there. The problem is that a few of the
states aren't really OTG specific. I think the only two otg-specific
states are A_DEVICE and B_HOST...

So either move this, or rename he enumeration accordingly, dunno. I
guess it would work either way.

> +
>       /* bind/unbind the host controller */
>       int     (*set_host)(struct usb_otg *otg, struct usb_bus *host);
>  
> @@ -97,7 +99,6 @@ struct usb_phy {
>       unsigned int             flags;
>  
>       enum usb_phy_type       type;
> -     enum usb_otg_state      state;
>       enum usb_phy_events     last_event;
>  
>       struct usb_otg          *otg;
> -- 
> 1.7.0.4
> 
> 

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to