Re: [PATCH] usb: usb251xb: add boost-up property support

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

 



Hello!

On 1/22/22 2:26 AM, Tommaso Merciai wrote:

> Add u8 property to support boost-up register of usb251xb hub.
> boost-up property control USB electrical drive strenght

  Strength.

> This register can be set:
> 
>  - Normal mode -> 0x00
>  - Low         -> 0x01
>  - Medium      -> 0x10
>  - High        -> 0x11
> 
> (Normal Default)
> 
> References:
>  - http://www.mouser.com/catalog/specsheets/2514.pdf p29
> 
> Signed-off-by: Tommaso Merciai <tomm.merciai@xxxxxxxxx>
> ---
>  drivers/usb/misc/usb251xb.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
> index 507deef1f709..74fd8ac0c303 100644
> --- a/drivers/usb/misc/usb251xb.c
> +++ b/drivers/usb/misc/usb251xb.c
> @@ -543,6 +544,12 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
>  	if (of_property_read_u16_array(np, "language-id", &hub->lang_id, 1))
>  		hub->lang_id = USB251XB_DEF_LANGUAGE_ID;
>  
> +	if (!of_property_read_u8(np, "boost-up", &property_u8)){
> +		hub->boost_up = property_u8;
> +	} else {
> +		hub->boost_up = USB251XB_DEF_BOOST_UP;
> +	}

   No need for {} here at all.

[...]

MBR, Sergey



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

  Powered by Linux