summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorZhang Jiejing <jiejing.zhang@freescale.com>2012-02-09 17:08:32 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:22:43 +0800
commit8f1bc5cc3c6c045b82fb358d0bf2b95edeaaaef3 (patch)
treeebd1408f308f94c3dc80a8c266fc2185fc57e45a /drivers/power
parentfd031f924c6cb07bc50981858e408b7b6f3d5fc4 (diff)
ENGR00174121-1 power: max8903 add support for dcm always high.
add this to support MX6Q_SABRESD board hardware design. Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/max8903_charger.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/power/max8903_charger.c b/drivers/power/max8903_charger.c
index 33ff0e37809e..19ca5fb3713a 100644
--- a/drivers/power/max8903_charger.c
+++ b/drivers/power/max8903_charger.c
@@ -40,6 +40,7 @@ static enum power_supply_property max8903_charger_props[] = {
POWER_SUPPLY_PROP_STATUS, /* Charger status output */
POWER_SUPPLY_PROP_ONLINE, /* External power source */
POWER_SUPPLY_PROP_HEALTH, /* Fault or OK */
+ POWER_SUPPLY_PROP_CAPACITY,
};
static int max8903_get_property(struct power_supply *psy,
@@ -211,9 +212,14 @@ static __devinit int max8903_probe(struct platform_device *pdev)
gpio = pdata->dcm; /* Output */
gpio_set_value(gpio, ta_in);
+ } else if (pdata->dok && gpio_is_valid(pdata->dok) &&
+ pdata->dcm_always_high) {
+ ta_in = pdata->dok; /* PULL_UPed Interrupt */
+ ta_in = gpio_get_value(gpio) ? 0 : 1;
} else {
dev_err(dev, "When DC is wired, DOK and DCM should"
- " be wired as well.\n");
+ " be wired as well."
+ " or set dcm always high\n");
ret = -EINVAL;
goto err;
}