aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/misc/usb251xb.c
diff options
context:
space:
mode:
authorSerge Semin2017-10-22 23:38:08 +0300
committerGreg Kroah-Hartman2017-11-01 17:14:21 +0100
commitdd99d106de255eb48ad7fce8a44afe3ee1526cef (patch)
tree24f214dc023951a448baa7ca0d162684ca99d2d0 /drivers/usb/misc/usb251xb.c
parentccdddc0343b8a1955ca9217e02d693546f792392 (diff)
usb: usb251xb: Add battery enable setting flag
Battery charging settings are supported by USB251xb hubs only. USB2517i isn't one of them. So we need to reflect it within the device-specific data structure. The driver doesn't support dts property changing this setting, but instead defaults it with zero. So the flag isn't used anywhere in the driver, but still can be helpful in future, when necessity of the corresponding dts setting arises. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/usb251xb.c')
-rw-r--r--drivers/usb/misc/usb251xb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 530ef13b353d..5b1c4f565d2f 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -163,54 +163,63 @@ struct usb251xb {
struct usb251xb_data {
u16 product_id;
u8 port_cnt;
+ 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,
+ .bat_support = true,
.product_str = "USB2512B",
};
static const struct usb251xb_data usb2512bi_data = {
.product_id = 0x2512,
.port_cnt = 2,
+ .bat_support = true,
.product_str = "USB2512Bi",
};
static const struct usb251xb_data usb2513b_data = {
.product_id = 0x2513,
.port_cnt = 3,
+ .bat_support = true,
.product_str = "USB2513B",
};
static const struct usb251xb_data usb2513bi_data = {
.product_id = 0x2513,
.port_cnt = 3,
+ .bat_support = true,
.product_str = "USB2513Bi",
};
static const struct usb251xb_data usb2514b_data = {
.product_id = 0x2514,
.port_cnt = 4,
+ .bat_support = true,
.product_str = "USB2514B",
};
static const struct usb251xb_data usb2514bi_data = {
.product_id = 0x2514,
.port_cnt = 4,
+ .bat_support = true,
.product_str = "USB2514Bi",
};
static const struct usb251xb_data usb2517_data = {
.product_id = 0x2517,
.port_cnt = 7,
+ .bat_support = false,
.product_str = "USB2517",
};
static const struct usb251xb_data usb2517i_data = {
.product_id = 0x2517,
.port_cnt = 7,
+ .bat_support = false,
.product_str = "USB2517i",
};