diff options
author | Zhang Jiejing <jiejing.zhang@freescale.com> | 2012-02-09 17:08:32 +0800 |
---|---|---|
committer | Zhang Jiejing <jiejing.zhang@freescale.com> | 2012-02-14 15:18:56 +0800 |
commit | 59444728ea3e1dae78c343c6f38531b9e09205f8 (patch) | |
tree | 53af2af6e0170bbd14f4930aef4b2473857c4763 /drivers/power | |
parent | 69bf4d4cdb533b7c78a8ad2ada9f4aa9c519eb49 (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.c | 8 |
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; } |