diff options
author | Serge Semin <fancer.lancer@gmail.com> | 2017-10-22 23:38:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-01 17:14:21 +0100 |
commit | db234b9a1b571a5f57917a3a0aeb7d53d9e1aa75 (patch) | |
tree | 19908ffe543f99de0c8cc178255f7bd5bd611cc6 /drivers/usb/misc | |
parent | 384811286f2db6845758eb5789b0dec015d40719 (diff) |
usb: usb251xb: Add 5,6,7 ports mapping def setting
USB2517 got three additionl downstream ports, which can
as well be mapped to another logical ports. USB251xb 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>
Acked-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/usb251xb.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index e49158bb3a02..202e931c697a 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 @@ -148,6 +152,8 @@ struct usb251xb { u8 port_swap; u8 port_map12; u8 port_map34; + u8 port_map56; + u8 port_map7; u8 status; }; @@ -277,6 +283,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); @@ -515,6 +523,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; } |