Commit 4e9498b
power: supply: bq25890: Support boards with more then one charger IC
Some devices, such as the Lenovo Yoga Tab 3 Pro (YT3-X90F) have
multiple batteries with a separate bq25890 charger for each battery.
This requires the bq25890_charger code to use a unique name per
registered power_supply class device, rather then hardcoding
"bq25890-charger" as power_supply class device name.
Add a "-%d" prefix to the name, allocated through idr in the same way
as several other power_supply drivers are already doing this.
Note this also updates: drivers/platform/x86/x86-android-tablets.c
which refers to the charger by power_supply-class-device-name for
the purpose of setting the "supplied-from" property on the fuel-gauge
to this name.
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>1 parent dee0df8 commit 4e9498b
2 files changed
Lines changed: 26 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
| |||
989 | 995 | | |
990 | 996 | | |
991 | 997 | | |
992 | | - | |
993 | 998 | | |
994 | 999 | | |
995 | 1000 | | |
| |||
1003 | 1008 | | |
1004 | 1009 | | |
1005 | 1010 | | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
1006 | 1022 | | |
1007 | 1023 | | |
1008 | 1024 | | |
1009 | | - | |
1010 | | - | |
1011 | | - | |
| 1025 | + | |
1012 | 1026 | | |
1013 | 1027 | | |
1014 | 1028 | | |
| |||
1354 | 1368 | | |
1355 | 1369 | | |
1356 | 1370 | | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
1357 | 1377 | | |
1358 | 1378 | | |
1359 | 1379 | | |
| |||
1368 | 1388 | | |
1369 | 1389 | | |
1370 | 1390 | | |
| 1391 | + | |
1371 | 1392 | | |
1372 | 1393 | | |
1373 | 1394 | | |
| |||
0 commit comments