aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2017-03-06 03:24:20 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-09 04:34:15 -0500
commitcfa47afe77b393e2c24a57e7e9611857a0b064f1 (patch)
tree541422b8a656e57ec00affacd6cd7e802de56f23
parentd595259fbb7a7afed241b1afb2c4fe4b47de47fa (diff)
usb: usb251xb: remove max_{power,current}_{sp,bp} properties
Remove the max_{power,current}_{sp,bp} properties of the usb251xb driver from devicetree. This is done to simplify the dt bindings as requested by Rob Herring in https://lkml.org/lkml/2017/2/15/1283. If those properties are ever needed by somebody they can be enabled again easily. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--Documentation/devicetree/bindings/usb/usb251xb.txt20
-rw-r--r--drivers/usb/misc/usb251xb.c24
2 files changed, 4 insertions, 40 deletions
diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
index 0c065f77658f..a5efd10ace9e 100644
--- a/Documentation/devicetree/bindings/usb/usb251xb.txt
+++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
@@ -40,26 +40,6 @@ Optional properties :
40 device connected. 40 device connected.
41 - sp-disabled-ports : Specifies the ports which will be self-power disabled 41 - sp-disabled-ports : Specifies the ports which will be self-power disabled
42 - bp-disabled-ports : Specifies the ports which will be bus-power disabled 42 - bp-disabled-ports : Specifies the ports which will be bus-power disabled
43 - max-sp-power : Specifies the maximum current the hub consumes from an
44 upstream port when operating as self-powered hub including the power
45 consumption of a permanently attached peripheral if the hub is
46 configured as a compound device. The value is given in mA in a 0 - 500
47 range (default is 2).
48 - max-bp-power : Specifies the maximum current the hub consumes from an
49 upstream port when operating as bus-powered hub including the power
50 consumption of a permanently attached peripheral if the hub is
51 configured as a compound device. The value is given in mA in a 0 - 500
52 range (default is 100).
53 - max-sp-current : Specifies the maximum current the hub consumes from an
54 upstream port when operating as self-powered hub EXCLUDING the power
55 consumption of a permanently attached peripheral if the hub is
56 configured as a compound device. The value is given in mA in a 0 - 500
57 range (default is 2).
58 - max-bp-current : Specifies the maximum current the hub consumes from an
59 upstream port when operating as bus-powered hub EXCLUDING the power
60 consumption of a permanently attached peripheral if the hub is
61 configured as a compound device. The value is given in mA in a 0 - 500
62 range (default is 100).
63 - power-on-time : Specifies the time it takes from the time the host initiates 43 - power-on-time : Specifies the time it takes from the time the host initiates
64 the power-on sequence to a port until the port has adequate power. The 44 the power-on sequence to a port until the port has adequate power. The
65 value is given in ms in a 0 - 510 range (default is 100ms). 45 value is given in ms in a 0 - 510 range (default is 100ms).
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 4e18600dc9b4..3f9c3060c477 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -432,26 +432,6 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
432 } 432 }
433 } 433 }
434 434
435 hub->max_power_sp = USB251XB_DEF_MAX_POWER_SELF;
436 if (!of_property_read_u32(np, "max-sp-power", property_u32))
437 hub->max_power_sp = min_t(u8, be32_to_cpu(*property_u32) / 2,
438 250);
439
440 hub->max_power_bp = USB251XB_DEF_MAX_POWER_BUS;
441 if (!of_property_read_u32(np, "max-bp-power", property_u32))
442 hub->max_power_bp = min_t(u8, be32_to_cpu(*property_u32) / 2,
443 250);
444
445 hub->max_current_sp = USB251XB_DEF_MAX_CURRENT_SELF;
446 if (!of_property_read_u32(np, "max-sp-current", property_u32))
447 hub->max_current_sp = min_t(u8, be32_to_cpu(*property_u32) / 2,
448 250);
449
450 hub->max_current_bp = USB251XB_DEF_MAX_CURRENT_BUS;
451 if (!of_property_read_u32(np, "max-bp-current", property_u32))
452 hub->max_current_bp = min_t(u8, be32_to_cpu(*property_u32) / 2,
453 250);
454
455 hub->power_on_time = USB251XB_DEF_POWER_ON_TIME; 435 hub->power_on_time = USB251XB_DEF_POWER_ON_TIME;
456 if (!of_property_read_u32(np, "power-on-time", property_u32)) 436 if (!of_property_read_u32(np, "power-on-time", property_u32))
457 hub->power_on_time = min_t(u8, be32_to_cpu(*property_u32) / 2, 437 hub->power_on_time = min_t(u8, be32_to_cpu(*property_u32) / 2,
@@ -492,6 +472,10 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
492 /* The following parameters are currently not exposed to devicetree, but 472 /* The following parameters are currently not exposed to devicetree, but
493 * may be as soon as needed. 473 * may be as soon as needed.
494 */ 474 */
475 hub->max_power_sp = USB251XB_DEF_MAX_POWER_SELF;
476 hub->max_power_bp = USB251XB_DEF_MAX_POWER_BUS;
477 hub->max_current_sp = USB251XB_DEF_MAX_CURRENT_SELF;
478 hub->max_current_bp = USB251XB_DEF_MAX_CURRENT_BUS;
495 hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE; 479 hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE;
496 hub->boost_up = USB251XB_DEF_BOOST_UP; 480 hub->boost_up = USB251XB_DEF_BOOST_UP;
497 hub->boost_x = USB251XB_DEF_BOOST_X; 481 hub->boost_x = USB251XB_DEF_BOOST_X;