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",
};
if (of_get_property(np, "port-mapping-mode", NULL))
hub->conf_data3 |= BIT(3);
+ if (data->led_support && of_get_property(np, "led-usb-mode", NULL))
+ hub->conf_data3 &= ~BIT(1);
+
if (of_get_property(np, "string-support", NULL))
hub->conf_data3 |= BIT(0);