diff options
| author | Rajanikanth H.V <rajanikanth.hv@stericsson.com> | 2012-11-18 21:45:41 -0500 |
|---|---|---|
| committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-11-18 22:37:04 -0500 |
| commit | e0f1abeba5c2d8a2183566717d99294fd1a29c2e (patch) | |
| tree | bf4b3582791d3e4baa298f4268cf2bbad8169b74 /include/linux/mfd | |
| parent | e9f14c18b83ccf3ab291b83a1d6c640113ecf545 (diff) | |
ab8500: Add devicetree support for fuelgauge
- This patch adds device tree support for fuelgauge driver
- optimize bm devices platform_data usage and of_probe(...)
Note: of_probe() routine for battery managed devices is made
common across all bm drivers.
- test status:
- interrupt numbers assigned differs between legacy and FDT mode.
Signed-off-by: Rajanikanth H.V <rajanikanth.hv@stericsson.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'include/linux/mfd')
| -rw-r--r-- | include/linux/mfd/abx500.h | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 5d5298d5602..33f2c58554f 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h | |||
| @@ -267,39 +267,27 @@ struct abx500_bm_data { | |||
| 267 | int gnd_lift_resistance; | 267 | int gnd_lift_resistance; |
| 268 | const struct abx500_maxim_parameters *maxi; | 268 | const struct abx500_maxim_parameters *maxi; |
| 269 | const struct abx500_bm_capacity_levels *cap_levels; | 269 | const struct abx500_bm_capacity_levels *cap_levels; |
| 270 | const struct abx500_battery_type *bat_type; | 270 | struct abx500_battery_type *bat_type; |
| 271 | const struct abx500_bm_charger_parameters *chg_params; | 271 | const struct abx500_bm_charger_parameters *chg_params; |
| 272 | const struct abx500_fg_parameters *fg_params; | 272 | const struct abx500_fg_parameters *fg_params; |
| 273 | }; | 273 | }; |
| 274 | 274 | ||
| 275 | struct abx500_chargalg_platform_data { | 275 | extern struct abx500_bm_data ab8500_bm_data; |
| 276 | char **supplied_to; | ||
| 277 | size_t num_supplicants; | ||
| 278 | }; | ||
| 279 | |||
| 280 | struct abx500_charger_platform_data { | ||
| 281 | char **supplied_to; | ||
| 282 | size_t num_supplicants; | ||
| 283 | bool autopower_cfg; | ||
| 284 | }; | ||
| 285 | 276 | ||
| 286 | struct abx500_btemp_platform_data { | 277 | struct abx500_bmdevs_plat_data { |
| 287 | char **supplied_to; | 278 | char **supplied_to; |
| 288 | size_t num_supplicants; | 279 | size_t num_supplicants; |
| 280 | bool autopower_cfg; | ||
| 289 | }; | 281 | }; |
| 290 | 282 | ||
| 291 | struct abx500_fg_platform_data { | 283 | enum { |
| 292 | char **supplied_to; | 284 | NTC_EXTERNAL = 0, |
| 293 | size_t num_supplicants; | 285 | NTC_INTERNAL, |
| 294 | }; | 286 | }; |
| 295 | 287 | ||
| 296 | struct abx500_bm_plat_data { | 288 | int bmdevs_of_probe(struct device *dev, |
| 297 | struct abx500_bm_data *battery; | 289 | struct device_node *np, |
| 298 | struct abx500_charger_platform_data *charger; | 290 | struct abx500_bm_data **battery); |
| 299 | struct abx500_btemp_platform_data *btemp; | ||
| 300 | struct abx500_fg_platform_data *fg; | ||
| 301 | struct abx500_chargalg_platform_data *chargalg; | ||
| 302 | }; | ||
| 303 | 291 | ||
| 304 | int abx500_set_register_interruptible(struct device *dev, u8 bank, u8 reg, | 292 | int abx500_set_register_interruptible(struct device *dev, u8 bank, u8 reg, |
| 305 | u8 value); | 293 | u8 value); |
