Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1733246
| From | Serge Semin <fancer.lancer@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/9 v2] usb: usb251xb: Add battery enable setting flag |
| Date | 2017-09-16 12:50 +0200 |
| Message-ID | <uqiPD-kz-13@gated-at.bofh.it> (permalink) |
| References | <uq8nf-1yS-1@gated-at.bofh.it> <uqiPD-kz-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 to change 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 corresponding dts setting arises.
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
---
drivers/usb/misc/usb251xb.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 44fa7d084..0834729d1 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -164,54 +164,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",
};
--
2.12.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] usb: usb251xb: Add USB2517i hub support and fix some bugs Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
[PATCH 3/5] usb: usb251xb: Add max power/current dts nodes Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
[PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Greg KH <gregkh@linuxfoundation.org> - 2017-09-16 01:50 +0200
Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 02:00 +0200
Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Rob Herring <robh@kernel.org> - 2017-09-20 23:10 +0200
Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Serge Semin <fancer.lancer@gmail.com> - 2017-09-20 23:20 +0200
Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Rob Herring <robh@kernel.org> - 2017-09-21 19:00 +0200
Re: [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Serge Semin <fancer.lancer@gmail.com> - 2017-09-21 19:50 +0200
[PATCH 4/5] usb: usb251xb: Use GPIO descriptor consumer interface Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
[PATCH 5/5] usb: usb251xb: Add copyrights Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
Re: [PATCH 5/5] usb: usb251xb: Add copyrights Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:50 +0200
Re: [PATCH 5/5] usb: usb251xb: Add copyrights Greg KH <gregkh@linuxfoundation.org> - 2017-09-16 02:00 +0200
Re: [PATCH 5/5] usb: usb251xb: Add copyrights Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 02:20 +0200
Re: [PATCH 5/5] usb: usb251xb: Add copyrights Greg KH <gregkh@linuxfoundation.org> - 2017-09-16 01:50 +0200
Re: [PATCH 5/5] usb: usb251xb: Add copyrights Greg KH <gregkh@linuxfoundation.org> - 2017-09-16 01:50 +0200
[PATCH 2/5] usb: usb251xb: Fix property_u32 NULL pointer dereference Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 01:40 +0200
[PATCH 7/9 v2] usb: usb251xb: Fix property_u32 NULL pointer dereference Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
[PATCH 4/9 v2] usb: usb251xb: Add 5,6,7 ports boost settings Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
[PATCH 3/9 v2] usb: usb251xb: Add 5,6,7 ports mapping def setting Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
[PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface Rob Herring <robh@kernel.org> - 2017-09-20 23:00 +0200
Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface Serge Semin <fancer.lancer@gmail.com> - 2017-09-20 23:30 +0200
Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface Greg KH <gregkh@linuxfoundation.org> - 2017-09-21 10:30 +0200
Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface Serge Semin <fancer.lancer@gmail.com> - 2017-09-21 17:00 +0200
Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface Greg KH <gregkh@linuxfoundation.org> - 2017-09-21 17:10 +0200
Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface Serge Semin <fancer.lancer@gmail.com> - 2017-09-22 17:30 +0200
Re: [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface Greg KH <gregkh@linuxfoundation.org> - 2017-09-22 18:10 +0200
[PATCH 5/9 v2] usb: usb251xb: Add battery enable setting flag Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
[PATCH 0/9 v2] usb: usb251xb: Add USB2517i hub support and fix some bugs Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
[PATCH 2/9 v2] usb: usb251xb: Add USB251x specific port count setting Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
[PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property support Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
Re: [PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property support Rob Herring <robh@kernel.org> - 2017-09-20 23:00 +0200
Re: [PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property support Serge Semin <fancer.lancer@gmail.com> - 2017-09-20 23:30 +0200
Re: [PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property support Rob Herring <robh@kernel.org> - 2017-09-21 18:30 +0200
Re: [PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property support Serge Semin <fancer.lancer@gmail.com> - 2017-09-21 19:20 +0200
[PATCH 6/9 v2] usb: usb251xb: Add USB2517 LED settings Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
[PATCH 1/9 v2] usb: usb251xb: Add USB2517i specific struct and IDs Serge Semin <fancer.lancer@gmail.com> - 2017-09-16 12:50 +0200
csiph-web