aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/usb251xb.c
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2017-10-22 16:38:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-01 12:14:21 -0400
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 {
163struct usb251xb_data { 163struct usb251xb_data {
164 u16 product_id; 164 u16 product_id;
165 u8 port_cnt; 165 u8 port_cnt;
166 bool bat_support;
166 char product_str[USB251XB_STRING_BUFSIZE / 2]; /* ASCII string */ 167 char product_str[USB251XB_STRING_BUFSIZE / 2]; /* ASCII string */
167}; 168};
168 169
169static const struct usb251xb_data usb2512b_data = { 170static const struct usb251xb_data usb2512b_data = {
170 .product_id = 0x2512, 171 .product_id = 0x2512,
171 .port_cnt = 2, 172 .port_cnt = 2,
173 .bat_support = true,
172 .product_str = "USB2512B", 174 .product_str = "USB2512B",
173}; 175};
174 176
175static const struct usb251xb_data usb2512bi_data = { 177static const struct usb251xb_data usb2512bi_data = {
176 .product_id = 0x2512, 178 .product_id = 0x2512,
177 .port_cnt = 2, 179 .port_cnt = 2,
180 .bat_support = true,
178 .product_str = "USB2512Bi", 181 .product_str = "USB2512Bi",
179}; 182};
180 183
181static const struct usb251xb_data usb2513b_data = { 184static const struct usb251xb_data usb2513b_data = {
182 .product_id = 0x2513, 185 .product_id = 0x2513,
183 .port_cnt = 3, 186 .port_cnt = 3,
187 .bat_support = true,
184 .product_str = "USB2513B", 188 .product_str = "USB2513B",
185}; 189};
186 190
187static const struct usb251xb_data usb2513bi_data = { 191static const struct usb251xb_data usb2513bi_data = {
188 .product_id = 0x2513, 192 .product_id = 0x2513,
189 .port_cnt = 3, 193 .port_cnt = 3,
194 .bat_support = true,
190 .product_str = "USB2513Bi", 195 .product_str = "USB2513Bi",
191}; 196};
192 197
193static const struct usb251xb_data usb2514b_data = { 198static const struct usb251xb_data usb2514b_data = {
194 .product_id = 0x2514, 199 .product_id = 0x2514,
195 .port_cnt = 4, 200 .port_cnt = 4,
201 .bat_support = true,
196 .product_str = "USB2514B", 202 .product_str = "USB2514B",
197}; 203};
198 204
199static const struct usb251xb_data usb2514bi_data = { 205static const struct usb251xb_data usb2514bi_data = {
200 .product_id = 0x2514, 206 .product_id = 0x2514,
201 .port_cnt = 4, 207 .port_cnt = 4,
208 .bat_support = true,
202 .product_str = "USB2514Bi", 209 .product_str = "USB2514Bi",
203}; 210};
204 211
205static const struct usb251xb_data usb2517_data = { 212static const struct usb251xb_data usb2517_data = {
206 .product_id = 0x2517, 213 .product_id = 0x2517,
207 .port_cnt = 7, 214 .port_cnt = 7,
215 .bat_support = false,
208 .product_str = "USB2517", 216 .product_str = "USB2517",
209}; 217};
210 218
211static const struct usb251xb_data usb2517i_data = { 219static const struct usb251xb_data usb2517i_data = {
212 .product_id = 0x2517, 220 .product_id = 0x2517,
213 .port_cnt = 7, 221 .port_cnt = 7,
222 .bat_support = false,
214 .product_str = "USB2517i", 223 .product_str = "USB2517i",
215}; 224};
216 225