Commit a3a8799
platform/x86: dell-laptop: Use power_supply_charge_types_show/_parse() helpers
Make battery_modes a map between tokens and enum power_supply_charge_type
values instead of between tokens and strings and use the new
power_supply_charge_types_show/_parse() helpers for show()/store()
to ensure that things are handled in the same way as in other drivers.
This also changes battery_supported_modes to be a bitmap of charge-types
(enum power_supply_charge_type values) rather then a bitmap of indices
into battery_modes[].
Reviewed-by: Thomas Weißschuh <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Acked-by: Ilpo Järvinen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sebastian Reichel <[email protected]>1 parent f6945d5 commit a3a8799
1 file changed
+25
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
2261 | 2261 | | |
2262 | 2262 | | |
2263 | 2263 | | |
2264 | | - | |
| 2264 | + | |
2265 | 2265 | | |
2266 | 2266 | | |
2267 | 2267 | | |
2268 | | - | |
| 2268 | + | |
2269 | 2269 | | |
2270 | | - | |
| 2270 | + | |
2271 | 2271 | | |
2272 | 2272 | | |
2273 | | - | |
2274 | | - | |
2275 | | - | |
2276 | | - | |
| 2273 | + | |
| 2274 | + | |
2277 | 2275 | | |
2278 | | - | |
2279 | | - | |
2280 | | - | |
2281 | | - | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
2282 | 2279 | | |
2283 | | - | |
| 2280 | + | |
| 2281 | + | |
2284 | 2282 | | |
2285 | 2283 | | |
2286 | 2284 | | |
2287 | 2285 | | |
2288 | 2286 | | |
2289 | 2287 | | |
2290 | | - | |
2291 | | - | |
| 2288 | + | |
2292 | 2289 | | |
2293 | | - | |
2294 | | - | |
2295 | | - | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
2296 | 2293 | | |
2297 | | - | |
2298 | | - | |
| 2294 | + | |
| 2295 | + | |
2299 | 2296 | | |
2300 | | - | |
2301 | 2297 | | |
2302 | | - | |
2303 | | - | |
| 2298 | + | |
| 2299 | + | |
2304 | 2300 | | |
2305 | 2301 | | |
2306 | 2302 | | |
| |||
2430 | 2426 | | |
2431 | 2427 | | |
2432 | 2428 | | |
2433 | | - | |
| 2429 | + | |
2434 | 2430 | | |
2435 | 2431 | | |
2436 | 2432 | | |
| |||
0 commit comments