Skip to content

Commit 5c2b9c6

Browse files
Scott31393gregkh
authored andcommitted
usb: usb251xb: add boost-up property support
Add support for boost-up register of usb251xb hub. boost-up property control USB electrical drive 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 Reviewed-by: Richard Leitner <[email protected]> Signed-off-by: Tommaso Merciai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0a907ee commit 5c2b9c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/usb/misc/usb251xb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,9 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
543543
if (of_property_read_u16_array(np, "language-id", &hub->lang_id, 1))
544544
hub->lang_id = USB251XB_DEF_LANGUAGE_ID;
545545

546+
if (of_property_read_u8(np, "boost-up", &hub->boost_up))
547+
hub->boost_up = USB251XB_DEF_BOOST_UP;
548+
546549
cproperty_char = of_get_property(np, "manufacturer", NULL);
547550
strlcpy(str, cproperty_char ? : USB251XB_DEF_MANUFACTURER_STRING,
548551
sizeof(str));
@@ -584,7 +587,6 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
584587
* may be as soon as needed.
585588
*/
586589
hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE;
587-
hub->boost_up = USB251XB_DEF_BOOST_UP;
588590
hub->boost_57 = USB251XB_DEF_BOOST_57;
589591
hub->boost_14 = USB251XB_DEF_BOOST_14;
590592
hub->port_map12 = USB251XB_DEF_PORT_MAP_12;

0 commit comments

Comments
 (0)