Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1733150 > unrolled thread

[PATCH 0/5] usb: usb251xb: Add USB2517i hub support and fix some bugs

Started bySerge Semin <fancer.lancer@gmail.com>
First post2017-09-16 01:40 +0200
Last post2017-09-16 12:50 +0200
Articles 20 on this page of 38 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/5] usb: usb251xb: Add USB2517i hub support and fix some bugs Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
    [PATCH 3/5] usb: usb251xb: Add max power/current dts nodes Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
    [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
      Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Greg KH <gregkh@linuxfoundation.org> - 2017-09-16 01:50 +0200
        Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 02:00 +0200
      Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Rob Herring <robh@kernel.org> - 2017-09-20 23:10 +0200
        Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Serge Semin <fancer.lancer@gmail.com> - 2017-09-20 23:20 +0200
          Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Rob Herring <robh@kernel.org> - 2017-09-21 19:00 +0200
            Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Serge Semin <fancer.lancer@gmail.com> - 2017-09-21 19:50 +0200
    [PATCH 4/5] usb: usb251xb: Use GPIO descriptor consumer interface Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
    [PATCH 5/5] usb: usb251xb: Add copyrights Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
      Re: [PATCH 5/5] usb: usb251xb: Add copyrights Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:50 +0200
        Re: [PATCH 5/5] usb: usb251xb: Add copyrights Greg KH <gregkh@linuxfoundation.org> - 2017-09-16 02:00 +0200
          Re: [PATCH 5/5] usb: usb251xb: Add copyrights Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 02:20 +0200
      Re: [PATCH 5/5] usb: usb251xb: Add copyrights Greg KH <gregkh@linuxfoundation.org> - 2017-09-16 01:50 +0200
      Re: [PATCH 5/5] usb: usb251xb: Add copyrights Greg KH <gregkh@linuxfoundation.org> - 2017-09-16 01:50 +0200
    [PATCH 2/5] usb: usb251xb: Fix property_u32 NULL pointer dereference Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
    [PATCH 7/9 v2] usb: usb251xb: Fix property_u32 NULL pointer dereference Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
    [PATCH 4/9 v2] usb: usb251xb: Add 5,6,7 ports boost settings Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
    [PATCH 3/9 v2] usb: usb251xb: Add 5,6,7 ports mapping def setting Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
    [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
      Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer  interface Rob Herring <robh@kernel.org> - 2017-09-20 23:00 +0200
        Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer  interface Serge Semin <fancer.lancer@gmail.com> - 2017-09-20 23:30 +0200
      Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer  interface Greg KH <gregkh@linuxfoundation.org> - 2017-09-21 10:30 +0200
        Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer  interface Serge Semin <fancer.lancer@gmail.com> - 2017-09-21 17:00 +0200
          Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer  interface Greg KH <gregkh@linuxfoundation.org> - 2017-09-21 17:10 +0200
            Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer  interface Serge Semin <fancer.lancer@gmail.com> - 2017-09-22 17:30 +0200
              Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer  interface Greg KH <gregkh@linuxfoundation.org> - 2017-09-22 18:10 +0200
    [PATCH 5/9 v2] usb: usb251xb: Add battery enable setting flag Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
    [PATCH 0/9 v2] usb: usb251xb: Add USB2517i hub support and fix some bugs Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
      [PATCH 2/9 v2] usb: usb251xb: Add USB251x specific port count setting Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
      [PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property support Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
        Re: [PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property  support Rob Herring <robh@kernel.org> - 2017-09-20 23:00 +0200
          Re: [PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property  support Serge Semin <fancer.lancer@gmail.com> - 2017-09-20 23:30 +0200
            Re: [PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property support Rob Herring <robh@kernel.org> - 2017-09-21 18:30 +0200
              Re: [PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property  support Serge Semin <fancer.lancer@gmail.com> - 2017-09-21 19:20 +0200
      [PATCH 6/9 v2] usb: usb251xb: Add USB2517 LED settings Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
      [PATCH 1/9 v2] usb: usb251xb: Add USB2517i specific struct and IDs Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200

Page 1 of 2  [1] 2  Next page →


#1733150 — [PATCH 0/5] usb: usb251xb: Add USB2517i hub support and fix some bugs

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 01:40 +0200
Subject[PATCH 0/5] usb: usb251xb: Add USB2517i hub support and fix some bugs
Message-ID<uq8nf-1yS-1@gated-at.bofh.it>
Primarily it was intended to just add USB2517 hub support to the driver.
But after tests a bug and inconistency were discovered. So it was decided
to perform following changes:

Changelog v1:
- Add USB2517/i hub specifics support to the driver
- Fix property_u32 NULL-pointer dereference
- Add new {bus,self}-max-{power,curret} dts properties
- Replace legacy GPIO API usage with descriptor-based one

Serge Semin (5):
  usb: usb251xb: Add USB2517/i hub support
  usb: usb251xb: Fix property_u32 NULL pointer dereference
  usb: usb251xb: Add max power/current dts nodes
  usb: usb251xb: Use GPIO descriptor consumer interface
  usb: usb251xb: Add copyrights

 Documentation/devicetree/bindings/usb/usb251xb.txt |  12 +-
 drivers/usb/misc/usb251xb.c                        | 154 +++++++++++++++------
 2 files changed, 123 insertions(+), 43 deletions(-)

-- 
2.12.0

[toc] | [next] | [standalone]


#1733152 — [PATCH 3/5] usb: usb251xb: Add max power/current dts nodes

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 01:40 +0200
Subject[PATCH 3/5] usb: usb251xb: Add max power/current dts nodes
Message-ID<uq8nf-1yS-11@gated-at.bofh.it>
In reply to#1733150
This parameters may be varied in accordance with hardware specifics.
So lets add the corresponding settings to the usb251x driver dts
specification.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
---
 Documentation/devicetree/bindings/usb/usb251xb.txt |  6 ++++++
 drivers/usb/misc/usb251xb.c                        | 20 ++++++++++++++++----
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
index 3d84626d3..dd59a32e7 100644
--- a/Documentation/devicetree/bindings/usb/usb251xb.txt
+++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
@@ -44,6 +44,12 @@ Optional properties :
 	device connected.
  - sp-disabled-ports : Specifies the ports which will be self-power disabled
  - bp-disabled-ports : Specifies the ports which will be bus-power disabled
+ - sp-max-{power,current} : Indicates the power/current consumed by hub from
+	an upstream port (VBUS) when operation as a self-powered hub. The value
+	is given in mA in a 0 - 100 range (default is 1mA).
+ - bp-max-{power,current} : Indicates the power/current consumed by hub from
+	an upstream port (VBUS) when operation as a bus-powered hub. The value
+	is given in mA in a 0 - 510 range (default is 100mA).
  - power-on-time-ms : Specifies the time it takes from the time the host
 	initiates the power-on sequence to a port until the port has adequate
 	power. The 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 8101c6212..d6a0ff4ec 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -493,6 +493,22 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 		}
 	}
 
+	hub->max_power_sp = USB251XB_DEF_MAX_POWER_SELF;
+	if (!of_property_read_u32(np, "sp-max-power", &property_u32))
+		hub->max_power_sp = min_t(u8, property_u32 / 2, 50);
+
+	hub->max_power_bp = USB251XB_DEF_MAX_POWER_BUS;
+	if (!of_property_read_u32(np, "bp-max-power", &property_u32))
+		hub->max_power_bp = min_t(u8, property_u32 / 2, 255);
+
+	hub->max_current_sp = USB251XB_DEF_MAX_CURRENT_SELF;
+	if (!of_property_read_u32(np, "sp-max-current", &property_u32))
+		hub->max_current_sp = min_t(u8, property_u32 / 2, 50);
+
+	hub->max_current_bp = USB251XB_DEF_MAX_CURRENT_BUS;
+	if (!of_property_read_u32(np, "bp-max-current", &property_u32))
+		hub->max_current_bp = min_t(u8, property_u32 / 2, 255);
+
 	hub->power_on_time = USB251XB_DEF_POWER_ON_TIME;
 	if (!of_property_read_u32(np, "power-on-time-ms", &property_u32))
 		hub->power_on_time = min_t(u8, property_u32 / 2, 255);
@@ -532,10 +548,6 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	/* The following parameters are currently not exposed to devicetree, but
 	 * may be as soon as needed.
 	 */
-	hub->max_power_sp = USB251XB_DEF_MAX_POWER_SELF;
-	hub->max_power_bp = USB251XB_DEF_MAX_POWER_BUS;
-	hub->max_current_sp = USB251XB_DEF_MAX_CURRENT_SELF;
-	hub->max_current_bp = USB251XB_DEF_MAX_CURRENT_BUS;
 	hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE;
 	hub->boost_up = USB251XB_DEF_BOOST_UP;
 	hub->boost_57 = USB251XB_DEF_BOOST_57;
-- 
2.12.0

[toc] | [prev] | [next] | [standalone]


#1733154 — [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 01:40 +0200
Subject[PATCH 1/5] usb: usb251xb: Add USB2517/i hub support
Message-ID<uq8nf-1yS-15@gated-at.bofh.it>
In reply to#1733150
USB2517i hubs are very like USB251xb devices series. They have almost
the same configuration registers space except number of ports, led
configurations and lack of battery settings. All these peculiarities
are reflected in this patch.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
---
 Documentation/devicetree/bindings/usb/usb251xb.txt |  4 +-
 drivers/usb/misc/usb251xb.c                        | 84 +++++++++++++++++++---
 2 files changed, 78 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
index 3957d4eda..3d84626d3 100644
--- a/Documentation/devicetree/bindings/usb/usb251xb.txt
+++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
@@ -6,7 +6,8 @@ Hi-Speed Controller.
 Required properties :
  - compatible : Should be "microchip,usb251xb" or one of the specific types:
 	"microchip,usb2512b", "microchip,usb2512bi", "microchip,usb2513b",
-	"microchip,usb2513bi", "microchip,usb2514b", "microchip,usb2514bi"
+	"microchip,usb2513bi", "microchip,usb2514b", "microchip,usb2514bi",
+	"microchip,usb2517", "microchip,usb2517i"
  - reset-gpios : Should specify the gpio for hub reset
  - reg : I2C address on the selected bus (default is <0x2C>)
 
@@ -36,6 +37,7 @@ Optional properties :
 	an invalid value is given, the default is used instead.
  - compound-device : indicate the hub is part of a compound device
  - port-mapping-mode : enable port mapping mode
+ - speed-led-mode : led speed indiation mode selection (usb2517 only)
  - string-support : enable string descriptor support (required for manufacturer,
 	product and serial string configuration)
  - non-removable-ports : Should specify the ports which have a non-removable
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 91f66d68b..2ef22758c 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -38,6 +38,7 @@
 #define USB251XB_DEF_PRODUCT_ID_12	0x2512 /* USB2512B/12Bi */
 #define USB251XB_DEF_PRODUCT_ID_13	0x2513 /* USB2513B/13Bi */
 #define USB251XB_DEF_PRODUCT_ID_14	0x2514 /* USB2514B/14Bi */
+#define USB251XB_DEF_PRODUCT_ID_17	0x2517 /* USB2517i */
 
 #define USB251XB_ADDR_DEVICE_ID_LSB	0x04
 #define USB251XB_ADDR_DEVICE_ID_MSB	0x05
@@ -48,7 +49,7 @@
 #define USB251XB_ADDR_CONFIG_DATA_2	0x07
 #define USB251XB_DEF_CONFIG_DATA_2	0x20
 #define USB251XB_ADDR_CONFIG_DATA_3	0x08
-#define USB251XB_DEF_CONFIG_DATA_3	0x02
+#define USB251XB_DEF_CONFIG_DATA_3	0x00
 
 #define USB251XB_ADDR_NON_REMOVABLE_DEVICES	0x09
 #define USB251XB_DEF_NON_REMOVABLE_DEVICES	0x00
@@ -82,7 +83,7 @@
 
 #define USB251XB_ADDR_PRODUCT_STRING_LEN	0x14
 #define USB251XB_ADDR_PRODUCT_STRING		0x54
-#define USB251XB_DEF_PRODUCT_STRING		"USB251xB/xBi"
+#define USB251XB_DEF_PRODUCT_STRING		"USB251xB/xBi/7i"
 
 #define USB251XB_ADDR_SERIAL_STRING_LEN		0x15
 #define USB251XB_ADDR_SERIAL_STRING		0x92
@@ -93,8 +94,10 @@
 
 #define USB251XB_ADDR_BOOST_UP	0xF6
 #define USB251XB_DEF_BOOST_UP	0x00
-#define USB251XB_ADDR_BOOST_X	0xF8
-#define USB251XB_DEF_BOOST_X	0x00
+#define USB251XB_ADDR_BOOST_57	0xF8
+#define USB251XB_DEF_BOOST_57	0x00
+#define USB251XB_ADDR_BOOST_14	0xF8
+#define USB251XB_DEF_BOOST_14	0x00
 
 #define USB251XB_ADDR_PORT_SWAP	0xFA
 #define USB251XB_DEF_PORT_SWAP	0x00
@@ -102,7 +105,11 @@
 #define USB251XB_ADDR_PORT_MAP_12	0xFB
 #define USB251XB_DEF_PORT_MAP_12	0x00
 #define USB251XB_ADDR_PORT_MAP_34	0xFC
-#define USB251XB_DEF_PORT_MAP_34	0x00 /* USB2513B/i & USB2514B/i only */
+#define USB251XB_DEF_PORT_MAP_34	0x00 /* USB251{3B/i,4B/i,7/i} only */
+#define USB251XB_ADDR_PORT_MAP_56	0xFD
+#define USB251XB_DEF_PORT_MAP_56	0x00 /* USB2517/i only */
+#define USB251XB_ADDR_PORT_MAP_7	0xFE
+#define USB251XB_DEF_PORT_MAP_7		0x00 /* USB2517/i only */
 
 #define USB251XB_ADDR_STATUS_COMMAND		0xFF
 #define USB251XB_STATUS_COMMAND_SMBUS_DOWN	0x04
@@ -144,48 +151,88 @@ struct usb251xb {
 	char serial[USB251XB_STRING_BUFSIZE];
 	u8  bat_charge_en;
 	u8  boost_up;
-	u8  boost_x;
+	u8  boost_57;
+	u8  boost_14;
 	u8  port_swap;
 	u8  port_map12;
 	u8  port_map34;
+	u8  port_map56;
+	u8  port_map7;
 	u8  status;
 };
 
 struct usb251xb_data {
 	u16 product_id;
+	u8 port_cnt;
+	bool led_support;
+	bool bat_support;
 	char product_str[USB251XB_STRING_BUFSIZE / 2]; /* ASCII string */
 };
 
 static const struct usb251xb_data usb2512b_data = {
 	.product_id = 0x2512,
+	.port_cnt = 2,
+	.led_support = false,
+	.bat_support = true,
 	.product_str = "USB2512B",
 };
 
 static const struct usb251xb_data usb2512bi_data = {
 	.product_id = 0x2512,
+	.port_cnt = 2,
+	.led_support = false,
+	.bat_support = true,
 	.product_str = "USB2512Bi",
 };
 
 static const struct usb251xb_data usb2513b_data = {
 	.product_id = 0x2513,
+	.port_cnt = 3,
+	.led_support = false,
+	.bat_support = true,
 	.product_str = "USB2513B",
 };
 
 static const struct usb251xb_data usb2513bi_data = {
 	.product_id = 0x2513,
+	.port_cnt = 3,
+	.led_support = false,
+	.bat_support = true,
 	.product_str = "USB2513Bi",
 };
 
 static const struct usb251xb_data usb2514b_data = {
 	.product_id = 0x2514,
+	.port_cnt = 4,
+	.led_support = false,
+	.bat_support = true,
 	.product_str = "USB2514B",
 };
 
 static const struct usb251xb_data usb2514bi_data = {
 	.product_id = 0x2514,
+	.port_cnt = 4,
+	.led_support = false,
+	.bat_support = true,
 	.product_str = "USB2514Bi",
 };
 
+static const struct usb251xb_data usb2517_data = {
+	.product_id = 0x2517,
+	.port_cnt = 7,
+	.led_support = true,
+	.bat_support = false,
+	.product_str = "USB2517",
+};
+
+static const struct usb251xb_data usb2517i_data = {
+	.product_id = 0x2517,
+	.port_cnt = 7,
+	.led_support = true,
+	.bat_support = false,
+	.product_str = "USB2517i",
+};
+
 static void usb251xb_reset(struct usb251xb *hub, int state)
 {
 	if (!gpio_is_valid(hub->gpio_reset))
@@ -254,10 +301,13 @@ static int usb251xb_connect(struct usb251xb *hub)
 	       USB251XB_STRING_BUFSIZE);
 	i2c_wb[USB251XB_ADDR_BATTERY_CHARGING_ENABLE] = hub->bat_charge_en;
 	i2c_wb[USB251XB_ADDR_BOOST_UP]          = hub->boost_up;
-	i2c_wb[USB251XB_ADDR_BOOST_X]           = hub->boost_x;
+	i2c_wb[USB251XB_ADDR_BOOST_57]          = hub->boost_57;
+	i2c_wb[USB251XB_ADDR_BOOST_14]          = hub->boost_14;
 	i2c_wb[USB251XB_ADDR_PORT_SWAP]         = hub->port_swap;
 	i2c_wb[USB251XB_ADDR_PORT_MAP_12]       = hub->port_map12;
 	i2c_wb[USB251XB_ADDR_PORT_MAP_34]       = hub->port_map34;
+	i2c_wb[USB251XB_ADDR_PORT_MAP_56]       = hub->port_map56;
+	i2c_wb[USB251XB_ADDR_PORT_MAP_7]        = hub->port_map7;
 	i2c_wb[USB251XB_ADDR_STATUS_COMMAND] = USB251XB_STATUS_COMMAND_ATTACH;
 
 	usb251xb_reset(hub, 1);
@@ -402,6 +452,9 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	if (of_get_property(np, "port-mapping-mode", NULL))
 		hub->conf_data3 |= BIT(3);
 
+	if (data->led_support && of_get_property(np, "speed-led-mode", NULL))
+		hub->conf_data3 |= BIT(1);
+
 	if (of_get_property(np, "string-support", NULL))
 		hub->conf_data3 |= BIT(0);
 
@@ -411,8 +464,10 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 		for (i = 0; i < len / sizeof(u32); i++) {
 			u32 port = be32_to_cpu(cproperty_u32[i]);
 
-			if ((port >= 1) && (port <= 4))
+			if ((port >= 1) && (port <= data->port_cnt))
 				hub->non_rem_dev |= BIT(port);
+			else
+				dev_warn(dev, "port %u doesn't exist\n", port);
 		}
 	}
 
@@ -483,10 +538,13 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	hub->max_current_bp = USB251XB_DEF_MAX_CURRENT_BUS;
 	hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE;
 	hub->boost_up = USB251XB_DEF_BOOST_UP;
-	hub->boost_x = USB251XB_DEF_BOOST_X;
+	hub->boost_57 = USB251XB_DEF_BOOST_57;
+	hub->boost_14 = USB251XB_DEF_BOOST_14;
 	hub->port_swap = USB251XB_DEF_PORT_SWAP;
 	hub->port_map12 = USB251XB_DEF_PORT_MAP_12;
 	hub->port_map34 = USB251XB_DEF_PORT_MAP_34;
+	hub->port_map56 = USB251XB_DEF_PORT_MAP_56;
+	hub->port_map7  = USB251XB_DEF_PORT_MAP_7;
 
 	return 0;
 }
@@ -511,6 +569,12 @@ static const struct of_device_id usb251xb_of_match[] = {
 		.compatible = "microchip,usb2514bi",
 		.data = &usb2514bi_data,
 	}, {
+		.compatible = "microchip,usb2517",
+		.data = &usb2517_data,
+	}, {
+		.compatible = "microchip,usb2517i",
+		.data = &usb2517i_data,
+	}, {
 		/* sentinel */
 	}
 };
@@ -574,6 +638,8 @@ static const struct i2c_device_id usb251xb_id[] = {
 	{ "usb2513bi", 0 },
 	{ "usb2514b", 0 },
 	{ "usb2514bi", 0 },
+	{ "usb2517", 0 },
+	{ "usb2517i", 0 },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, usb251xb_id);
-- 
2.12.0

[toc] | [prev] | [next] | [standalone]


#1733163 — Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-09-16 01:50 +0200
SubjectRe: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support
Message-ID<uq8wV-1CG-5@gated-at.bofh.it>
In reply to#1733154
On Sat, Sep 16, 2017 at 02:31:09AM +0300, Serge Semin wrote:
> USB2517i hubs are very like USB251xb devices series. They have almost
> the same configuration registers space except number of ports, led
> configurations and lack of battery settings. All these peculiarities
> are reflected in this patch.

Please add one type of feature at a time per patch.  That makes it
easier to review and ensure you got it right.

thanks,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1733171 — Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 02:00 +0200
SubjectRe: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support
Message-ID<uq8GC-1Go-7@gated-at.bofh.it>
In reply to#1733163
On Fri, Sep 15, 2017 at 04:45:14PM -0700, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Sat, Sep 16, 2017 at 02:31:09AM +0300, Serge Semin wrote:
> > USB2517i hubs are very like USB251xb devices series. They have almost
> > the same configuration registers space except number of ports, led
> > configurations and lack of battery settings. All these peculiarities
> > are reflected in this patch.
> 
> Please add one type of feature at a time per patch.  That makes it
> easier to review and ensure you got it right.
> 
> thanks,
> 
> greg k-h

Ok. The patch isn't that big though.

Regards,
-Sergey

[toc] | [prev] | [next] | [standalone]


#1736147 — Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support

FromRob Herring <robh@kernel.org>
Date2017-09-20 23:10 +0200
SubjectRe: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support
Message-ID<urUpQ-8nU-23@gated-at.bofh.it>
In reply to#1733154
On Sat, Sep 16, 2017 at 02:31:09AM +0300, Serge Semin wrote:
> USB2517i hubs are very like USB251xb devices series. They have almost
> the same configuration registers space except number of ports, led
> configurations and lack of battery settings. All these peculiarities
> are reflected in this patch.
> 
> Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
> ---
>  Documentation/devicetree/bindings/usb/usb251xb.txt |  4 +-

Though Greg wants the code split, I want the binding as one change. H/w 
doesn't gain features one by one.

It's preferred to split bindings to a separate patch.

>  drivers/usb/misc/usb251xb.c                        | 84 +++++++++++++++++++---
>  2 files changed, 78 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
> index 3957d4eda..3d84626d3 100644
> --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
> +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
> @@ -6,7 +6,8 @@ Hi-Speed Controller.
>  Required properties :
>   - compatible : Should be "microchip,usb251xb" or one of the specific types:
>  	"microchip,usb2512b", "microchip,usb2512bi", "microchip,usb2513b",
> -	"microchip,usb2513bi", "microchip,usb2514b", "microchip,usb2514bi"
> +	"microchip,usb2513bi", "microchip,usb2514b", "microchip,usb2514bi",
> +	"microchip,usb2517", "microchip,usb2517i"
>   - reset-gpios : Should specify the gpio for hub reset
>   - reg : I2C address on the selected bus (default is <0x2C>)
>  
> @@ -36,6 +37,7 @@ Optional properties :
>  	an invalid value is given, the default is used instead.
>   - compound-device : indicate the hub is part of a compound device
>   - port-mapping-mode : enable port mapping mode
> + - speed-led-mode : led speed indiation mode selection (usb2517 only)

This is a boolean or has values? What are valid values?

This needs a vendor prefix. Somehow the other properties got in without.

>   - string-support : enable string descriptor support (required for manufacturer,
>  	product and serial string configuration)
>   - non-removable-ports : Should specify the ports which have a non-removable

[toc] | [prev] | [next] | [standalone]


#1736156 — Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-20 23:20 +0200
SubjectRe: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support
Message-ID<urUzw-8sm-23@gated-at.bofh.it>
In reply to#1736147
On Wed, Sep 20, 2017 at 03:52:35PM -0500, Rob Herring <robh@kernel.org> wrote:
> On Sat, Sep 16, 2017 at 02:31:09AM +0300, Serge Semin wrote:
> > USB2517i hubs are very like USB251xb devices series. They have almost
> > the same configuration registers space except number of ports, led
> > configurations and lack of battery settings. All these peculiarities
> > are reflected in this patch.
> > 
> > Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
> > ---
> >  Documentation/devicetree/bindings/usb/usb251xb.txt |  4 +-
> 
> Though Greg wants the code split, I want the binding as one change. H/w 
> doesn't gain features one by one.
> 
> It's preferred to split bindings to a separate patch.
> 

Folks, you are really driving people crazy. When I was reviewing a
kernel-patchset from a Logan-guy, I asked him to combine some of his patches,
since in fact their combination represented one solid driver. I was told to go
very far, and Greg supported him with it. I'm not going to be that rude and will
do as you asked me to. But really, isn't it possible to have some strict rule
created so a developer would always follow it thereby not being asked to
combine/split patches almost everytime?
The only way I see for now is to know each maintainer personal preferences.

> >  drivers/usb/misc/usb251xb.c                        | 84 +++++++++++++++++++---
> >  2 files changed, 78 insertions(+), 10 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
> > index 3957d4eda..3d84626d3 100644
> > --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
> > +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
> > @@ -6,7 +6,8 @@ Hi-Speed Controller.
> >  Required properties :
> >   - compatible : Should be "microchip,usb251xb" or one of the specific types:
> >  	"microchip,usb2512b", "microchip,usb2512bi", "microchip,usb2513b",
> > -	"microchip,usb2513bi", "microchip,usb2514b", "microchip,usb2514bi"
> > +	"microchip,usb2513bi", "microchip,usb2514b", "microchip,usb2514bi",
> > +	"microchip,usb2517", "microchip,usb2517i"
> >   - reset-gpios : Should specify the gpio for hub reset
> >   - reg : I2C address on the selected bus (default is <0x2C>)
> >  
> > @@ -36,6 +37,7 @@ Optional properties :
> >  	an invalid value is given, the default is used instead.
> >   - compound-device : indicate the hub is part of a compound device
> >   - port-mapping-mode : enable port mapping mode
> > + - speed-led-mode : led speed indiation mode selection (usb2517 only)
> 
> This is a boolean or has values? What are valid values?
> 

It's boolean. Shall I rename it as:
"- speed-led-mode : enable led speed indication mode (usb2517 only)"?

> This needs a vendor prefix. Somehow the other properties got in without.
> 

Hmm, it's not vendor specific, but device-specific. USB2517 is produced
by the same vendor - microchip. The new device got almost the same functionality as
the others, except number or ports, LED feature and battery enable feature.
The last one isn't configurable by dts. The rest of the properties are the same
for all the compatible devices. So what properties you are talking about then?

> >   - string-support : enable string descriptor support (required for manufacturer,
> >  	product and serial string configuration)
> >   - non-removable-ports : Should specify the ports which have a non-removable

[toc] | [prev] | [next] | [standalone]


#1736853 — Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support

FromRob Herring <robh@kernel.org>
Date2017-09-21 19:00 +0200
SubjectRe: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support
Message-ID<uscZr-3vW-19@gated-at.bofh.it>
In reply to#1736156
On Wed, Sep 20, 2017 at 4:15 PM, Serge Semin <fancer.lancer@gmail.com> wrote:
> On Wed, Sep 20, 2017 at 03:52:35PM -0500, Rob Herring <robh@kernel.org> wrote:
>> On Sat, Sep 16, 2017 at 02:31:09AM +0300, Serge Semin wrote:
>> > USB2517i hubs are very like USB251xb devices series. They have almost
>> > the same configuration registers space except number of ports, led
>> > configurations and lack of battery settings. All these peculiarities
>> > are reflected in this patch.
>> >
>> > Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
>> > ---
>> >  Documentation/devicetree/bindings/usb/usb251xb.txt |  4 +-
>>
>> Though Greg wants the code split, I want the binding as one change. H/w
>> doesn't gain features one by one.
>>
>> It's preferred to split bindings to a separate patch.
>>
>
> Folks, you are really driving people crazy. When I was reviewing a
> kernel-patchset from a Logan-guy, I asked him to combine some of his patches,
> since in fact their combination represented one solid driver. I was told to go
> very far, and Greg supported him with it. I'm not going to be that rude and will
> do as you asked me to. But really, isn't it possible to have some strict rule
> created so a developer would always follow it thereby not being asked to
> combine/split patches almost everytime?
> The only way I see for now is to know each maintainer personal preferences.

That rule is in Documentation/devicetree/bindings/submitting-patches.txt.

I generally only ask to respin and split bindings if there's other changes.

>> >  drivers/usb/misc/usb251xb.c                        | 84 +++++++++++++++++++---
>> >  2 files changed, 78 insertions(+), 10 deletions(-)
>> >
>> > diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
>> > index 3957d4eda..3d84626d3 100644
>> > --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
>> > +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
>> > @@ -6,7 +6,8 @@ Hi-Speed Controller.
>> >  Required properties :
>> >   - compatible : Should be "microchip,usb251xb" or one of the specific types:
>> >     "microchip,usb2512b", "microchip,usb2512bi", "microchip,usb2513b",
>> > -   "microchip,usb2513bi", "microchip,usb2514b", "microchip,usb2514bi"
>> > +   "microchip,usb2513bi", "microchip,usb2514b", "microchip,usb2514bi",
>> > +   "microchip,usb2517", "microchip,usb2517i"
>> >   - reset-gpios : Should specify the gpio for hub reset
>> >   - reg : I2C address on the selected bus (default is <0x2C>)
>> >
>> > @@ -36,6 +37,7 @@ Optional properties :
>> >     an invalid value is given, the default is used instead.
>> >   - compound-device : indicate the hub is part of a compound device
>> >   - port-mapping-mode : enable port mapping mode
>> > + - speed-led-mode : led speed indiation mode selection (usb2517 only)
>>
>> This is a boolean or has values? What are valid values?
>>
>
> It's boolean. Shall I rename it as:
> "- speed-led-mode : enable led speed indication mode (usb2517 only)"?

Having the the word "boolean" in there would help.

>> This needs a vendor prefix. Somehow the other properties got in without.
>>
>
> Hmm, it's not vendor specific, but device-specific. USB2517 is produced
> by the same vendor - microchip. The new device got almost the same functionality as
> the others, except number or ports, LED feature and battery enable feature.
> The last one isn't configurable by dts. The rest of the properties are the same
> for all the compatible devices. So what properties you are talking about then?

Well, we don't name things after devices. Properties are either common
(either from DT Spec or a class of device (clocks, regulators, USB
device, USB hubs, etc.)) or vendor specific. I haven't looked at which
other ones specifically could be common for hubs or USB devices and
which ones should be MicroChip specific.

Rob

[toc] | [prev] | [next] | [standalone]


#1736977 — Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-21 19:50 +0200
SubjectRe: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support
Message-ID<usdLP-41H-5@gated-at.bofh.it>
In reply to#1736853
On Thu, Sep 21, 2017 at 11:53:29AM -0500, Rob Herring <robh@kernel.org> wrote:
> On Wed, Sep 20, 2017 at 4:15 PM, Serge Semin <fancer.lancer@gmail.com> wrote:
> > On Wed, Sep 20, 2017 at 03:52:35PM -0500, Rob Herring <robh@kernel.org> wrote:
> >> On Sat, Sep 16, 2017 at 02:31:09AM +0300, Serge Semin wrote:
> >> > USB2517i hubs are very like USB251xb devices series. They have almost
> >> > the same configuration registers space except number of ports, led
> >> > configurations and lack of battery settings. All these peculiarities
> >> > are reflected in this patch.
> >> >
> >> > Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
> >> > ---
> >> >  Documentation/devicetree/bindings/usb/usb251xb.txt |  4 +-
> >>
> >> Though Greg wants the code split, I want the binding as one change. H/w
> >> doesn't gain features one by one.
> >>
> >> It's preferred to split bindings to a separate patch.
> >>
> >
> > Folks, you are really driving people crazy. When I was reviewing a
> > kernel-patchset from a Logan-guy, I asked him to combine some of his patches,
> > since in fact their combination represented one solid driver. I was told to go
> > very far, and Greg supported him with it. I'm not going to be that rude and will
> > do as you asked me to. But really, isn't it possible to have some strict rule
> > created so a developer would always follow it thereby not being asked to
> > combine/split patches almost everytime?
> > The only way I see for now is to know each maintainer personal preferences.
> 
> That rule is in Documentation/devicetree/bindings/submitting-patches.txt.
> 
> I generally only ask to respin and split bindings if there's other changes.
> 

Great! I didn't know there is a document like that. Ok. From now I'll do as
it's prescribed there.

> >> >  drivers/usb/misc/usb251xb.c                        | 84 +++++++++++++++++++---
> >> >  2 files changed, 78 insertions(+), 10 deletions(-)
> >> >
> >> > diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
> >> > index 3957d4eda..3d84626d3 100644
> >> > --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
> >> > +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
> >> > @@ -6,7 +6,8 @@ Hi-Speed Controller.
> >> >  Required properties :
> >> >   - compatible : Should be "microchip,usb251xb" or one of the specific types:
> >> >     "microchip,usb2512b", "microchip,usb2512bi", "microchip,usb2513b",
> >> > -   "microchip,usb2513bi", "microchip,usb2514b", "microchip,usb2514bi"
> >> > +   "microchip,usb2513bi", "microchip,usb2514b", "microchip,usb2514bi",
> >> > +   "microchip,usb2517", "microchip,usb2517i"
> >> >   - reset-gpios : Should specify the gpio for hub reset
> >> >   - reg : I2C address on the selected bus (default is <0x2C>)
> >> >
> >> > @@ -36,6 +37,7 @@ Optional properties :
> >> >     an invalid value is given, the default is used instead.
> >> >   - compound-device : indicate the hub is part of a compound device
> >> >   - port-mapping-mode : enable port mapping mode
> >> > + - speed-led-mode : led speed indiation mode selection (usb2517 only)
> >>
> >> This is a boolean or has values? What are valid values?
> >>
> >
> > It's boolean. Shall I rename it as:
> > "- speed-led-mode : enable led speed indication mode (usb2517 only)"?
> 
> Having the the word "boolean" in there would help.
> 
> >> This needs a vendor prefix. Somehow the other properties got in without.
> >>
> >
> > Hmm, it's not vendor specific, but device-specific. USB2517 is produced
> > by the same vendor - microchip. The new device got almost the same functionality as
> > the others, except number or ports, LED feature and battery enable feature.
> > The last one isn't configurable by dts. The rest of the properties are the same
> > for all the compatible devices. So what properties you are talking about then?
> 
> Well, we don't name things after devices. Properties are either common
> (either from DT Spec or a class of device (clocks, regulators, USB
> device, USB hubs, etc.)) or vendor specific. I haven't looked at which
> other ones specifically could be common for hubs or USB devices and
> which ones should be MicroChip specific.
> 

Alright. I found the recommended vendor-specific prefix, it's "microchip". What's 
next? The thing is, that this driver isn't usual USB root port controller driver.
It's the driver to perform the usb251x hubs configuration on boot time in accordance
with the hardware specifics. So to speak, this driver is something like EEPROM firmware
embedded in the kernel and configured by device tree node properties. I can't be sure,
whether all of these settings might be vendor specific, or some of them still can be
exposed by the hubs of other vendors. Most of the circuit designers just add real
EEPROMs to be connected to hubs, so their configurations would be loaded from them.
What shall we do with this bindings then? Shall we add the vendor-specific vendor to
the bindings file?

> Rob

[toc] | [prev] | [next] | [standalone]


#1733155 — [PATCH 4/5] usb: usb251xb: Use GPIO descriptor consumer interface

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 01:40 +0200
Subject[PATCH 4/5] usb: usb251xb: Use GPIO descriptor consumer interface
Message-ID<uq8nf-1yS-17@gated-at.bofh.it>
In reply to#1733150
The driver used to be developed with legacy GPIO API support. It's
better to use descriptor-based interface for several reasons. First
of all the legacy API doesn't support the ACTIVE_LOW/HIGH flag of dts
nodes, which is essential since different hardware may have different
GPIOs connectivity including the logical value inversion. Secondly,
by requesting the reset GPIO descriptor the driver prevent the other
applications from changing its value. And last but not least the
legacy GPIO interface should be avoided in the new code due to it
obsolescence.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
---
 Documentation/devicetree/bindings/usb/usb251xb.txt |  2 +-
 drivers/usb/misc/usb251xb.c                        | 33 +++++++++-------------
 2 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
index dd59a32e7..7c981d556 100644
--- a/Documentation/devicetree/bindings/usb/usb251xb.txt
+++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
@@ -8,10 +8,10 @@ Required properties :
 	"microchip,usb2512b", "microchip,usb2512bi", "microchip,usb2513b",
 	"microchip,usb2513bi", "microchip,usb2514b", "microchip,usb2514bi",
 	"microchip,usb2517", "microchip,usb2517i"
- - reset-gpios : Should specify the gpio for hub reset
  - reg : I2C address on the selected bus (default is <0x2C>)
 
 Optional properties :
+ - reset-gpios : Should specify the gpio for hub reset
  - skip-config : Skip Hub configuration, but only send the USB-Attach command
  - vendor-id : Set USB Vendor ID of the hub (16 bit, default is 0x0424)
  - product-id : Set USB Product ID of the hub (16 bit, default depends on type)
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index d6a0ff4ec..1d47acd09 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -20,12 +20,11 @@
  */
 
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/module.h>
 #include <linux/nls.h>
 #include <linux/of_device.h>
-#include <linux/of_gpio.h>
 #include <linux/slab.h>
 
 /* Internal Register Set Addresses & Default Values acc. to DS00001692C */
@@ -127,7 +126,7 @@ struct usb251xb {
 	struct device *dev;
 	struct i2c_client *i2c;
 	u8 skip_config;
-	int gpio_reset;
+	struct gpio_desc *gpio_reset;
 	u16 vendor_id;
 	u16 product_id;
 	u16 device_id;
@@ -235,13 +234,13 @@ static const struct usb251xb_data usb2517i_data = {
 
 static void usb251xb_reset(struct usb251xb *hub, int state)
 {
-	if (!gpio_is_valid(hub->gpio_reset))
+	if (!hub->gpio_reset)
 		return;
 
-	gpio_set_value_cansleep(hub->gpio_reset, state);
+	gpiod_set_value_cansleep(hub->gpio_reset, state);
 
 	/* wait for hub recovery/stabilization */
-	if (state)
+	if (!state)
 		usleep_range(500, 750);	/* >=500us at power on */
 	else
 		usleep_range(1, 10);	/* >=1us at power down */
@@ -260,7 +259,7 @@ static int usb251xb_connect(struct usb251xb *hub)
 		i2c_wb[0] = 0x01;
 		i2c_wb[1] = USB251XB_STATUS_COMMAND_ATTACH;
 
-		usb251xb_reset(hub, 1);
+		usb251xb_reset(hub, 0);
 
 		err = i2c_smbus_write_i2c_block_data(hub->i2c,
 				USB251XB_ADDR_STATUS_COMMAND, 2, i2c_wb);
@@ -310,7 +309,7 @@ static int usb251xb_connect(struct usb251xb *hub)
 	i2c_wb[USB251XB_ADDR_PORT_MAP_7]        = hub->port_map7;
 	i2c_wb[USB251XB_ADDR_STATUS_COMMAND] = USB251XB_STATUS_COMMAND_ATTACH;
 
-	usb251xb_reset(hub, 1);
+	usb251xb_reset(hub, 0);
 
 	/* write registers */
 	for (i = 0; i < (USB251XB_I2C_REG_SZ / USB251XB_I2C_WRITE_SZ); i++) {
@@ -363,19 +362,13 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	else
 		hub->skip_config = 0;
 
-	hub->gpio_reset = of_get_named_gpio(np, "reset-gpios", 0);
-	if (hub->gpio_reset == -EPROBE_DEFER)
+	hub->gpio_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
+	if (PTR_ERR(hub->gpio_reset) == -EPROBE_DEFER) {
 		return -EPROBE_DEFER;
-	if (gpio_is_valid(hub->gpio_reset)) {
-		err = devm_gpio_request_one(dev, hub->gpio_reset,
-					    GPIOF_OUT_INIT_LOW,
-					    "usb251xb reset");
-		if (err) {
-			dev_err(dev,
-				"unable to request GPIO %d as reset pin (%d)\n",
-				hub->gpio_reset, err);
-			return err;
-		}
+	} else if (IS_ERR(hub->gpio_reset)) {
+		err = PTR_ERR(hub->gpio_reset);
+		dev_err(dev, "unable to request GPIO reset pin (%d)\n", err);
+		return err;
 	}
 
 	if (of_property_read_u16_array(np, "vendor-id", &hub->vendor_id, 1))
-- 
2.12.0

[toc] | [prev] | [next] | [standalone]


#1733159 — [PATCH 5/5] usb: usb251xb: Add copyrights

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 01:40 +0200
Subject[PATCH 5/5] usb: usb251xb: Add copyrights
Message-ID<uq8ng-1yS-21@gated-at.bofh.it>
In reply to#1733150
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
---
 drivers/usb/misc/usb251xb.c | 1 +
 1 file changed, 1 insertions(+), 0 deletion(-)

diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 1d47acd09..43afa04ad 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -3,6 +3,7 @@
  * Configuration via SMBus.
  *
  * Copyright (c) 2017 SKIDATA AG
+ * Copyright (c) 2017 T-platforms
  *
  * This work is based on the USB3503 driver by Dongjin Kim and
  * a not-accepted patch by Fabien Lahoudere, see:
-- 
2.12.0

[toc] | [prev] | [next] | [standalone]


#1733162 — Re: [PATCH 5/5] usb: usb251xb: Add copyrights

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 01:50 +0200
SubjectRe: [PATCH 5/5] usb: usb251xb: Add copyrights
Message-ID<uq8wV-1CG-1@gated-at.bofh.it>
In reply to#1733159
On Fri, Sep 15, 2017 at 04:40:28PM -0700, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Sat, Sep 16, 2017 at 02:31:13AM +0300, Serge Semin wrote:
> > Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
> > ---
> >  drivers/usb/misc/usb251xb.c | 1 +
> >  1 file changed, 1 insertions(+), 0 deletion(-)
> 
> I can't take patches without any changelog text, sorry.
> 

I'll merge it into the previous patch then. There is nothing to changeloging here. 

> > 
> > diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
> > index 1d47acd09..43afa04ad 100644
> > --- a/drivers/usb/misc/usb251xb.c
> > +++ b/drivers/usb/misc/usb251xb.c
> > @@ -3,6 +3,7 @@
> >   * Configuration via SMBus.
> >   *
> >   * Copyright (c) 2017 SKIDATA AG
> > + * Copyright (c) 2017 T-platforms
> 
> I don't see the connection between a random company, and a random
> gmail.com email address.  Please explain :)

Why do you see gmail.com only? I cc-ed this patchset to my work email:
Sergey.Semin@t-platforms.ru
Do I really need to send it from my work e-mail? I have met such rule before.

> 
> thanks,
> 
> greg k-h

[toc] | [prev] | [next] | [standalone]


#1733170 — Re: [PATCH 5/5] usb: usb251xb: Add copyrights

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-09-16 02:00 +0200
SubjectRe: [PATCH 5/5] usb: usb251xb: Add copyrights
Message-ID<uq8GB-1Go-5@gated-at.bofh.it>
In reply to#1733162
On Sat, Sep 16, 2017 at 02:45:17AM +0300, Serge Semin wrote:
> On Fri, Sep 15, 2017 at 04:40:28PM -0700, Greg KH <gregkh@linuxfoundation.org> wrote:
> > On Sat, Sep 16, 2017 at 02:31:13AM +0300, Serge Semin wrote:
> > > Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
> > > ---
> > >  drivers/usb/misc/usb251xb.c | 1 +
> > >  1 file changed, 1 insertions(+), 0 deletion(-)
> > 
> > I can't take patches without any changelog text, sorry.
> > 
> 
> I'll merge it into the previous patch then. There is nothing to changeloging here. 
> 
> > > 
> > > diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
> > > index 1d47acd09..43afa04ad 100644
> > > --- a/drivers/usb/misc/usb251xb.c
> > > +++ b/drivers/usb/misc/usb251xb.c
> > > @@ -3,6 +3,7 @@
> > >   * Configuration via SMBus.
> > >   *
> > >   * Copyright (c) 2017 SKIDATA AG
> > > + * Copyright (c) 2017 T-platforms
> > 
> > I don't see the connection between a random company, and a random
> > gmail.com email address.  Please explain :)
> 
> Why do you see gmail.com only? I cc-ed this patchset to my work email:
> Sergey.Semin@t-platforms.ru
> Do I really need to send it from my work e-mail? I have met such rule before.

The authorship of these patches are coming from a gmail.com address, how
do I know what that relates to some random email you cc: on the patch :)

thanks,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1733172 — Re: [PATCH 5/5] usb: usb251xb: Add copyrights

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 02:20 +0200
SubjectRe: [PATCH 5/5] usb: usb251xb: Add copyrights
Message-ID<uq8ZY-25T-5@gated-at.bofh.it>
In reply to#1733170
On Fri, Sep 15, 2017 at 04:53:13PM -0700, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Sat, Sep 16, 2017 at 02:45:17AM +0300, Serge Semin wrote:
> > On Fri, Sep 15, 2017 at 04:40:28PM -0700, Greg KH <gregkh@linuxfoundation.org> wrote:
> > > On Sat, Sep 16, 2017 at 02:31:13AM +0300, Serge Semin wrote:
> > > > Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
> > > > ---
> > > >  drivers/usb/misc/usb251xb.c | 1 +
> > > >  1 file changed, 1 insertions(+), 0 deletion(-)
> > > 
> > > I can't take patches without any changelog text, sorry.
> > > 
> > 
> > I'll merge it into the previous patch then. There is nothing to changeloging here. 
> > 
> > > > 
> > > > diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
> > > > index 1d47acd09..43afa04ad 100644
> > > > --- a/drivers/usb/misc/usb251xb.c
> > > > +++ b/drivers/usb/misc/usb251xb.c
> > > > @@ -3,6 +3,7 @@
> > > >   * Configuration via SMBus.
> > > >   *
> > > >   * Copyright (c) 2017 SKIDATA AG
> > > > + * Copyright (c) 2017 T-platforms
> > > 
> > > I don't see the connection between a random company, and a random
> > > gmail.com email address.  Please explain :)
> > 
> > Why do you see gmail.com only? I cc-ed this patchset to my work email:
> > Sergey.Semin@t-platforms.ru
> > Do I really need to send it from my work e-mail? I have met such rule before.
> 
> The authorship of these patches are coming from a gmail.com address, how
> do I know what that relates to some random email you cc: on the patch :)
> 
> thanks,
> 
> greg k-h

Does it really matter? I could create any domain and add some random company
as copyright. How would you know the copyrighted company is real then? The
only way would be just google it. That's it. But still the site can be faked
if it is really necessary.
I thought these things are a matter of trust. I submitted a patchset from my
personal e-mail, but created it while working for the company. It's highly
possible, that my personal email is going to be mine for much longer time, then
I'll be working in the company. In this case, the better way to declare it as
primary email, instead of the company one, so to have a longer support. Isn't it?
Why would I need to fake a copyrighted company anyway?

-Sergey

[toc] | [prev] | [next] | [standalone]


#1733164 — Re: [PATCH 5/5] usb: usb251xb: Add copyrights

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-09-16 01:50 +0200
SubjectRe: [PATCH 5/5] usb: usb251xb: Add copyrights
Message-ID<uq8wV-1CG-7@gated-at.bofh.it>
In reply to#1733159
On Fri, Sep 15, 2017 at 04:40:28PM -0700, Greg KH wrote:
> On Sat, Sep 16, 2017 at 02:31:13AM +0300, Serge Semin wrote:
> > Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
> > ---
> >  drivers/usb/misc/usb251xb.c | 1 +
> >  1 file changed, 1 insertions(+), 0 deletion(-)
> 
> I can't take patches without any changelog text, sorry.
> 
> > 
> > diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
> > index 1d47acd09..43afa04ad 100644
> > --- a/drivers/usb/misc/usb251xb.c
> > +++ b/drivers/usb/misc/usb251xb.c
> > @@ -3,6 +3,7 @@
> >   * Configuration via SMBus.
> >   *
> >   * Copyright (c) 2017 SKIDATA AG
> > + * Copyright (c) 2017 T-platforms
> 
> I don't see the connection between a random company, and a random
> gmail.com email address.  Please explain :)

Also, based on the changes in this series, I fail to see how you could
even claim copyright on the entire file.  Please explain that as well
when you resend this patch.

Note, I'm not a lawyer, and this isn't legal advice, please contact your
company's lawyers, they know this type of thing, and now the normal
rules for claiming copyright of a whole file.  They also know that
copyright notices in files don't mean anything, but lawyers love to
cargo-cult things more than any other profession :)

thanks,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1733166 — Re: [PATCH 5/5] usb: usb251xb: Add copyrights

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-09-16 01:50 +0200
SubjectRe: [PATCH 5/5] usb: usb251xb: Add copyrights
Message-ID<uq8wV-1CG-3@gated-at.bofh.it>
In reply to#1733159
On Sat, Sep 16, 2017 at 02:31:13AM +0300, Serge Semin wrote:
> Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
> ---
>  drivers/usb/misc/usb251xb.c | 1 +
>  1 file changed, 1 insertions(+), 0 deletion(-)

I can't take patches without any changelog text, sorry.

> 
> diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
> index 1d47acd09..43afa04ad 100644
> --- a/drivers/usb/misc/usb251xb.c
> +++ b/drivers/usb/misc/usb251xb.c
> @@ -3,6 +3,7 @@
>   * Configuration via SMBus.
>   *
>   * Copyright (c) 2017 SKIDATA AG
> + * Copyright (c) 2017 T-platforms

I don't see the connection between a random company, and a random
gmail.com email address.  Please explain :)

thanks,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1733160 — [PATCH 2/5] usb: usb251xb: Fix property_u32 NULL pointer dereference

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 01:40 +0200
Subject[PATCH 2/5] usb: usb251xb: Fix property_u32 NULL pointer dereference
Message-ID<uq8ng-1yS-25@gated-at.bofh.it>
In reply to#1733150
The methods like of_property_read_u32 utilizing the specified
pointer permit only the pointer to a preallocated u32 storage as the
third argument. As a result the driver crashes on NULL pointer
dereference in case if "oc-delay-us" or "power-on-time-ms" declared
in dts file.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
---
 drivers/usb/misc/usb251xb.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 2ef22758c..8101c6212 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -348,7 +348,7 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	struct device *dev = hub->dev;
 	struct device_node *np = dev->of_node;
 	int len, err, i;
-	u32 *property_u32 = NULL;
+	u32 property_u32 = 0;
 	const u32 *cproperty_u32;
 	const char *cproperty_char;
 	char str[USB251XB_STRING_BUFSIZE / 2];
@@ -425,16 +425,16 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	if (of_get_property(np, "dynamic-power-switching", NULL))
 		hub->conf_data2 |= BIT(7);
 
-	if (!of_property_read_u32(np, "oc-delay-us", property_u32)) {
-		if (*property_u32 == 100) {
+	if (!of_property_read_u32(np, "oc-delay-us", &property_u32)) {
+		if (property_u32 == 100) {
 			/* 100 us*/
 			hub->conf_data2 &= ~BIT(5);
 			hub->conf_data2 &= ~BIT(4);
-		} else if (*property_u32 == 4000) {
+		} else if (property_u32 == 4000) {
 			/* 4 ms */
 			hub->conf_data2 &= ~BIT(5);
 			hub->conf_data2 |= BIT(4);
-		} else if (*property_u32 == 16000) {
+		} else if (property_u32 == 16000) {
 			/* 16 ms */
 			hub->conf_data2 |= BIT(5);
 			hub->conf_data2 |= BIT(4);
@@ -494,8 +494,8 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	}
 
 	hub->power_on_time = USB251XB_DEF_POWER_ON_TIME;
-	if (!of_property_read_u32(np, "power-on-time-ms", property_u32))
-		hub->power_on_time = min_t(u8, *property_u32 / 2, 255);
+	if (!of_property_read_u32(np, "power-on-time-ms", &property_u32))
+		hub->power_on_time = min_t(u8, property_u32 / 2, 255);
 
 	if (of_property_read_u16_array(np, "language-id", &hub->lang_id, 1))
 		hub->lang_id = USB251XB_DEF_LANGUAGE_ID;
-- 
2.12.0

[toc] | [prev] | [next] | [standalone]


#1733242 — [PATCH 7/9 v2] usb: usb251xb: Fix property_u32 NULL pointer dereference

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 12:50 +0200
Subject[PATCH 7/9 v2] usb: usb251xb: Fix property_u32 NULL pointer dereference
Message-ID<uqiPD-kz-1@gated-at.bofh.it>
In reply to#1733150
The methods like of_property_read_u32 utilizing the specified
pointer permit only the pointer to a preallocated u32 storage as the
third argument. As a result the driver crashes on NULL pointer
dereference in case if "oc-delay-us" or "power-on-time-ms" declared
in dts file.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
---
 drivers/usb/misc/usb251xb.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 51cc53ddc..c308b0006 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -348,7 +348,7 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	struct device *dev = hub->dev;
 	struct device_node *np = dev->of_node;
 	int len, err, i;
-	u32 *property_u32 = NULL;
+	u32 property_u32 = 0;
 	const u32 *cproperty_u32;
 	const char *cproperty_char;
 	char str[USB251XB_STRING_BUFSIZE / 2];
@@ -425,16 +425,16 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	if (of_get_property(np, "dynamic-power-switching", NULL))
 		hub->conf_data2 |= BIT(7);
 
-	if (!of_property_read_u32(np, "oc-delay-us", property_u32)) {
-		if (*property_u32 == 100) {
+	if (!of_property_read_u32(np, "oc-delay-us", &property_u32)) {
+		if (property_u32 == 100) {
 			/* 100 us*/
 			hub->conf_data2 &= ~BIT(5);
 			hub->conf_data2 &= ~BIT(4);
-		} else if (*property_u32 == 4000) {
+		} else if (property_u32 == 4000) {
 			/* 4 ms */
 			hub->conf_data2 &= ~BIT(5);
 			hub->conf_data2 |= BIT(4);
-		} else if (*property_u32 == 16000) {
+		} else if (property_u32 == 16000) {
 			/* 16 ms */
 			hub->conf_data2 |= BIT(5);
 			hub->conf_data2 |= BIT(4);
@@ -498,8 +498,8 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	}
 
 	hub->power_on_time = USB251XB_DEF_POWER_ON_TIME;
-	if (!of_property_read_u32(np, "power-on-time-ms", property_u32))
-		hub->power_on_time = min_t(u8, *property_u32 / 2, 255);
+	if (!of_property_read_u32(np, "power-on-time-ms", &property_u32))
+		hub->power_on_time = min_t(u8, property_u32 / 2, 255);
 
 	if (of_property_read_u16_array(np, "language-id", &hub->lang_id, 1))
 		hub->lang_id = USB251XB_DEF_LANGUAGE_ID;
-- 
2.12.0

[toc] | [prev] | [next] | [standalone]


#1733243 — [PATCH 4/9 v2] usb: usb251xb: Add 5,6,7 ports boost settings

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 12:50 +0200
Subject[PATCH 4/9 v2] usb: usb251xb: Add 5,6,7 ports boost settings
Message-ID<uqiPD-kz-7@gated-at.bofh.it>
In reply to#1733150
USB electrical signaling drive strength boost bit is also supported
by USB2517 hub. Since it got three addition ports, the designers
needed to add one more register for initialization. It turned out
to be formerly reserved 0xF7. As before we just initialize it with
default zeros.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
---
 drivers/usb/misc/usb251xb.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 3de0de93b..44fa7d084 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -94,8 +94,10 @@
 
 #define USB251XB_ADDR_BOOST_UP	0xF6
 #define USB251XB_DEF_BOOST_UP	0x00
-#define USB251XB_ADDR_BOOST_X	0xF8
-#define USB251XB_DEF_BOOST_X	0x00
+#define USB251XB_ADDR_BOOST_57	0xF7
+#define USB251XB_DEF_BOOST_57	0x00
+#define USB251XB_ADDR_BOOST_14	0xF8
+#define USB251XB_DEF_BOOST_14	0x00
 
 #define USB251XB_ADDR_PORT_SWAP	0xFA
 #define USB251XB_DEF_PORT_SWAP	0x00
@@ -149,7 +151,8 @@ struct usb251xb {
 	char serial[USB251XB_STRING_BUFSIZE];
 	u8  bat_charge_en;
 	u8  boost_up;
-	u8  boost_x;
+	u8  boost_57;
+	u8  boost_14;
 	u8  port_swap;
 	u8  port_map12;
 	u8  port_map34;
@@ -280,7 +283,8 @@ static int usb251xb_connect(struct usb251xb *hub)
 	       USB251XB_STRING_BUFSIZE);
 	i2c_wb[USB251XB_ADDR_BATTERY_CHARGING_ENABLE] = hub->bat_charge_en;
 	i2c_wb[USB251XB_ADDR_BOOST_UP]          = hub->boost_up;
-	i2c_wb[USB251XB_ADDR_BOOST_X]           = hub->boost_x;
+	i2c_wb[USB251XB_ADDR_BOOST_57]          = hub->boost_57;
+	i2c_wb[USB251XB_ADDR_BOOST_14]          = hub->boost_14;
 	i2c_wb[USB251XB_ADDR_PORT_SWAP]         = hub->port_swap;
 	i2c_wb[USB251XB_ADDR_PORT_MAP_12]       = hub->port_map12;
 	i2c_wb[USB251XB_ADDR_PORT_MAP_34]       = hub->port_map34;
@@ -517,7 +521,8 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	hub->max_current_bp = USB251XB_DEF_MAX_CURRENT_BUS;
 	hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE;
 	hub->boost_up = USB251XB_DEF_BOOST_UP;
-	hub->boost_x = USB251XB_DEF_BOOST_X;
+	hub->boost_57 = USB251XB_DEF_BOOST_57;
+	hub->boost_14 = USB251XB_DEF_BOOST_14;
 	hub->port_swap = USB251XB_DEF_PORT_SWAP;
 	hub->port_map12 = USB251XB_DEF_PORT_MAP_12;
 	hub->port_map34 = USB251XB_DEF_PORT_MAP_34;
-- 
2.12.0

[toc] | [prev] | [next] | [standalone]


#1733244 — [PATCH 3/9 v2] usb: usb251xb: Add 5,6,7 ports mapping def setting

FromSerge Semin <fancer.lancer@gmail.com>
Date2017-09-16 12:50 +0200
Subject[PATCH 3/9 v2] usb: usb251xb: Add 5,6,7 ports mapping def setting
Message-ID<uqiPD-kz-9@gated-at.bofh.it>
In reply to#1733150
USB2517 got three additionl downstream ports, which can
as well be mapped to another logical ports. USB2551xb driver
currently doesn't fully support such setting configuration
from dts file. This patch doesn't change this, but adds
usb2517 spcific ports default liner mapping.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
---
 drivers/usb/misc/usb251xb.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 5cb0e5570..3de0de93b 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -103,7 +103,11 @@
 #define USB251XB_ADDR_PORT_MAP_12	0xFB
 #define USB251XB_DEF_PORT_MAP_12	0x00
 #define USB251XB_ADDR_PORT_MAP_34	0xFC
-#define USB251XB_DEF_PORT_MAP_34	0x00 /* USB2513B/i & USB2514B/i only */
+#define USB251XB_DEF_PORT_MAP_34	0x00 /* USB251{3B/i,4B/i,7/i} only */
+#define USB251XB_ADDR_PORT_MAP_56	0xFD
+#define USB251XB_DEF_PORT_MAP_56	0x00 /* USB2517/i only */
+#define USB251XB_ADDR_PORT_MAP_7	0xFE
+#define USB251XB_DEF_PORT_MAP_7		0x00 /* USB2517/i only */
 
 #define USB251XB_ADDR_STATUS_COMMAND		0xFF
 #define USB251XB_STATUS_COMMAND_SMBUS_DOWN	0x04
@@ -149,6 +153,8 @@ struct usb251xb {
 	u8  port_swap;
 	u8  port_map12;
 	u8  port_map34;
+	u8  port_map56;
+	u8  port_map7;
 	u8  status;
 };
 
@@ -278,6 +284,8 @@ static int usb251xb_connect(struct usb251xb *hub)
 	i2c_wb[USB251XB_ADDR_PORT_SWAP]         = hub->port_swap;
 	i2c_wb[USB251XB_ADDR_PORT_MAP_12]       = hub->port_map12;
 	i2c_wb[USB251XB_ADDR_PORT_MAP_34]       = hub->port_map34;
+	i2c_wb[USB251XB_ADDR_PORT_MAP_56]       = hub->port_map56;
+	i2c_wb[USB251XB_ADDR_PORT_MAP_7]        = hub->port_map7;
 	i2c_wb[USB251XB_ADDR_STATUS_COMMAND] = USB251XB_STATUS_COMMAND_ATTACH;
 
 	usb251xb_reset(hub, 1);
@@ -513,6 +521,8 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	hub->port_swap = USB251XB_DEF_PORT_SWAP;
 	hub->port_map12 = USB251XB_DEF_PORT_MAP_12;
 	hub->port_map34 = USB251XB_DEF_PORT_MAP_34;
+	hub->port_map56 = USB251XB_DEF_PORT_MAP_56;
+	hub->port_map7  = USB251XB_DEF_PORT_MAP_7;
 
 	return 0;
 }
-- 
2.12.0

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.kernel


csiph-web