Re: [PATCH v3 2/4] phy: rcar-gen3-usb2: split the two meaning of "has_otg"

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

 



On Fri, Sep 01, 2017 at 11:41:23AM +0900, Yoshihiro Shimoda wrote:
> The has_otg on previous code has the two meaning:
>  - The channel has dedicated otg pins (ID, VBUS).
>  - The channel can swap the role via sysfs.
> 
> However, some SoCs (e.g. R-Car D3) doesn't have such dedicated pins,
> but the SoCs can swap the role. So, this patch split the two meaning
> of has_otg as "has dedicated otg pins" and adds a new value
> "can_role_swap". For now, the behavior is the same as before.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>


Reviewed-by: Simon Horman <horms+renesas@xxxxxxxxxxxx>

> ---
>  drivers/phy/renesas/phy-rcar-gen3-usb2.c | 61 ++++++++++++++++++++++----------
>  1 file changed, 42 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> index e00e99a..4ea9902 100644
> --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> @@ -87,7 +87,8 @@ struct rcar_gen3_chan {
>  	struct regulator *vbus;
>  	struct work_struct work;
>  	bool extcon_host;
> -	bool has_otg;
> +	bool has_otg;	/* has dedicated pins (ID, VBUS) */

Not: has_otg_pins might make for slightly easier reading of the code.

> +	bool can_role_swap;
>  };

...



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux