aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-12-14 11:38:53 -0500
committerSebastian Reichel <sre@kernel.org>2017-01-04 15:56:10 -0500
commit888f97435a856c2c5c6ca0b3337b68d595b5639e (patch)
tree985fdcc9c45d7ec8d1505e07609aff4957e166e1 /include/linux/mfd
parenteac53b3664f592713655f5de59dc44bdd0cfc0bd (diff)
power: supply: axp288_fuel_gauge: Drop platform_data dependency
When the axp288_faul_gauge driver was originally merged, it was merged with a dependency on some other driver providing platform data for it. However the battery-data-framework which should provide that data never got merged, resulting in x86 tablets / laptops with an axp288 having no working battery monitor, as before this commit the driver would simply return -ENODEV if there is no platform data. This commit removes the dependency on the platform_data instead checking that the firmware has initialized the fuel-gauge and reading the info back from the pmic. What is missing from the read-back info is the table to map raw adc values to temperature, so this commit drops the temperature and temperature limits properties. The min voltage, charge design and model name info is also missing. Note that none of these are really important for userspace to have. All other functionality is preserved and actually made available by this commit. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=88471 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/axp20x.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h
index e460fc42d63e..812806d6319b 100644
--- a/include/linux/mfd/axp20x.h
+++ b/include/linux/mfd/axp20x.h
@@ -532,28 +532,6 @@ struct axp20x_dev {
532 const struct regmap_irq_chip *regmap_irq_chip; 532 const struct regmap_irq_chip *regmap_irq_chip;
533}; 533};
534 534
535#define BATTID_LEN 64
536#define OCV_CURVE_SIZE 32
537#define MAX_THERM_CURVE_SIZE 25
538#define PD_DEF_MIN_TEMP 0
539#define PD_DEF_MAX_TEMP 55
540
541struct axp20x_fg_pdata {
542 char battid[BATTID_LEN + 1];
543 int design_cap;
544 int min_volt;
545 int max_volt;
546 int max_temp;
547 int min_temp;
548 int cap1;
549 int cap0;
550 int rdc1;
551 int rdc0;
552 int ocv_curve[OCV_CURVE_SIZE];
553 int tcsz;
554 int thermistor_curve[MAX_THERM_CURVE_SIZE][2];
555};
556
557struct axp288_extcon_pdata { 535struct axp288_extcon_pdata {
558 /* GPIO pin control to switch D+/D- lines b/w PMIC and SOC */ 536 /* GPIO pin control to switch D+/D- lines b/w PMIC and SOC */
559 struct gpio_desc *gpio_mux_cntl; 537 struct gpio_desc *gpio_mux_cntl;