Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: usb251xb: Add USB2517i specific struct and IDs

There are USB2517 and USB2517i hubs, which have almost the same
registers space as already supported USB251xBi series. The difference
it in DIDs and in a few functions. This patch adds the USB2517/i data
structures to the driver, so it would have different setting depending
on the device discovered on i2c-bus.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Serge Semin and committed by
Greg Kroah-Hartman
7fcf5584 a8a52677

+23 -4
+2 -2
drivers/usb/misc/Kconfig
··· 238 238 depends on I2C 239 239 help 240 240 This option enables support for configuration via SMBus of the 241 - Microchip USB251xB/xBi USB 2.0 Hub Controller series. 242 - Configuration parameters may be set in devicetree or platform data. 241 + Microchip USB251x/xBi USB 2.0 Hub Controller series. Configuration 242 + parameters may be set in devicetree or platform data. 243 243 Say Y or M here if you need to configure such a device via SMBus. 244 244 245 245 config USB_HSIC_USB3503
+21 -2
drivers/usb/misc/usb251xb.c
··· 38 38 #define USB251XB_DEF_PRODUCT_ID_12 0x2512 /* USB2512B/12Bi */ 39 39 #define USB251XB_DEF_PRODUCT_ID_13 0x2513 /* USB2513B/13Bi */ 40 40 #define USB251XB_DEF_PRODUCT_ID_14 0x2514 /* USB2514B/14Bi */ 41 + #define USB251XB_DEF_PRODUCT_ID_17 0x2517 /* USB2517/17i */ 41 42 42 43 #define USB251XB_ADDR_DEVICE_ID_LSB 0x04 43 44 #define USB251XB_ADDR_DEVICE_ID_MSB 0x05 ··· 83 82 84 83 #define USB251XB_ADDR_PRODUCT_STRING_LEN 0x14 85 84 #define USB251XB_ADDR_PRODUCT_STRING 0x54 86 - #define USB251XB_DEF_PRODUCT_STRING "USB251xB/xBi" 85 + #define USB251XB_DEF_PRODUCT_STRING "USB251xB/xBi/7i" 87 86 88 87 #define USB251XB_ADDR_SERIAL_STRING_LEN 0x15 89 88 #define USB251XB_ADDR_SERIAL_STRING 0x92 ··· 184 183 static const struct usb251xb_data usb2514bi_data = { 185 184 .product_id = 0x2514, 186 185 .product_str = "USB2514Bi", 186 + }; 187 + 188 + static const struct usb251xb_data usb2517_data = { 189 + .product_id = 0x2517, 190 + .product_str = "USB2517", 191 + }; 192 + 193 + static const struct usb251xb_data usb2517i_data = { 194 + .product_id = 0x2517, 195 + .product_str = "USB2517i", 187 196 }; 188 197 189 198 static void usb251xb_reset(struct usb251xb *hub, int state) ··· 521 510 .compatible = "microchip,usb2514bi", 522 511 .data = &usb2514bi_data, 523 512 }, { 513 + .compatible = "microchip,usb2517", 514 + .data = &usb2517_data, 515 + }, { 516 + .compatible = "microchip,usb2517i", 517 + .data = &usb2517i_data, 518 + }, { 524 519 /* sentinel */ 525 520 } 526 521 }; ··· 590 573 { "usb2513bi", 0 }, 591 574 { "usb2514b", 0 }, 592 575 { "usb2514bi", 0 }, 576 + { "usb2517", 0 }, 577 + { "usb2517i", 0 }, 593 578 { /* sentinel */ } 594 579 }; 595 580 MODULE_DEVICE_TABLE(i2c, usb251xb_id); ··· 608 589 module_i2c_driver(usb251xb_i2c_driver); 609 590 610 591 MODULE_AUTHOR("Richard Leitner <richard.leitner@skidata.com>"); 611 - MODULE_DESCRIPTION("USB251xB/xBi USB 2.0 Hub Controller Driver"); 592 + MODULE_DESCRIPTION("USB251x/xBi USB 2.0 Hub Controller Driver"); 612 593 MODULE_LICENSE("GPL");