[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120928011930.GG5040@lizard>
Date: Thu, 27 Sep 2012 18:19:30 -0700
From: Anton Vorontsov <anton.vorontsov@...aro.org>
To: mathieu.poirier@...aro.org
Cc: linux-kernel@...r.kernel.org, dwmw2@...radead.org
Subject: Re: [PATCH 48/57] power: ab8500 : quick re-attach for ext charger
On Tue, Sep 25, 2012 at 10:12:45AM -0600, mathieu.poirier@...aro.org wrote:
> From: Rupesh Kumar <rupesh.kumar@...ricsson.com>
>
> Quick re-attach charging behaviour is not required
> for external ac charger. Internal AC/USB Charger removal
> detection problem is due to a bug in AB8500 ASICs.
>
> Signed-off-by: Rupesh Kumar <rupesh.kumar@...ricsson.com>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
> Reviewed-by: Hakan BERG <hakan.berg@...ricsson.com>
> Reviewed-by: Philippe LANGLAIS <philippe.langlais@...ricsson.com>
> ---
> drivers/power/abx500_chargalg.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c
> index 180deab..ce58f20 100644
> --- a/drivers/power/abx500_chargalg.c
> +++ b/drivers/power/abx500_chargalg.c
> @@ -330,12 +330,13 @@ static int abx500_chargalg_check_charger_enable(struct abx500_chargalg *di)
> return di->usb_chg->ops.check_enable(di->usb_chg,
> di->bat->bat_type[di->bat->batt_id].normal_vol_lvl,
> di->bat->bat_type[di->bat->batt_id].normal_cur_lvl);
> - } else if (di->chg_info.charger_type & AC_CHG) {
> + } else if ((di->chg_info.charger_type & AC_CHG) &&
> + !(di->ac_chg->external)) {
> return di->ac_chg->ops.check_enable(di->ac_chg,
> di->bat->bat_type[di->bat->batt_id].normal_vol_lvl,
> di->bat->bat_type[di->bat->batt_id].normal_cur_lvl);
> }
> - return -ENXIO;
> + return 0;
I'm not sure about this logic, but I guess it should be
} else {
return 0;
}
return -ENXIO;
> }
>
> /**
> --
> 1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists