Re: [RFC PATCH 02/17] usb: otg: Separate otg members from usb_transceiver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

(review the typos)

On Tue, Aug 16, 2011 at 01:09:32PM +0300, Heikki Krogerus wrote:
> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
> index 6692df8..309f45c 100644
> --- a/include/linux/usb/otg.h
> +++ b/include/linux/usb/otg.h
> @@ -48,11 +48,36 @@ struct usb_transceiver;
>  /* for transceivers connected thru an ULPI interface, the user must
>   * provide access ops
>   */
> -struct otg_io_access_ops {
> +struct usb_phy_io_ops {
>  	int (*read)(struct usb_transceiver *x, u32 reg);
>  	int (*write)(struct usb_transceiver *x, u32 val, u32 reg);
>  };
>  
> +struct otg {
> +	u8			default_a;
> +	enum usb_otg_state	state;

state isn't OTG specific. Only A_DEVICE and B_HOST are OTG-related, I
guess. the others can be used in host-only (A_*) and device-only (B_*)
modes.

I think it's better to keep state on struct usb_transceiver but WARN()
if you get B_HOST or A_DEVICE on non-OTG configurations.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux