[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150924154529.GB3125@earth>
Date: Thu, 24 Sep 2015 17:45:30 +0200
From: Sebastian Reichel <sre@...nel.org>
To: Enric Balletbo i Serra <eballetbo@...il.com>
Cc: devicetree@...r.kernel.org, linux-omap@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
robh+dt@...nel.org, pawel.moll@....com, mark.rutland@....com,
ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
dbaryshkov@...il.com, dwmw2@...radead.org, tony@...mide.com,
sameo@...ux.intel.com, lee.jones@...aro.org,
sjoerd.simons@...labora.co.uk, javier@...hile0.org
Subject: Re: [PATCHv2 2/2] power_supply: Add support for tps65217-charger.
Hi,
On Thu, Sep 24, 2015 at 09:23:25AM +0200, Enric Balletbo i Serra wrote:
> This patch adds support for the tps65217 charger driver. This driver is
> responsible for controlling the charger aspect of the tps65217 mfd.
> Currently, this mainly consists of turning on and off the charger, but
> some other features of the charger can be supported through this driver.
>
> [...]
>
> +static int tps65217_ac_get_property(struct power_supply *psy,
> + enum power_supply_property psp,
> + union power_supply_propval *val)
> +{
> + struct tps65217_charger *charger = power_supply_get_drvdata(psy);
> +
> + if (psp == POWER_SUPPLY_PROP_ONLINE) {
> + val->intval = charger->ac_online;
> + charger->prev_ac_online = charger->ac_online;
I think this is no longer needed at this place.
> + return 0;
> + }
> + return -EINVAL;
> +}
>
> [...]
>
> +static int tps65217_charger_remove(struct platform_device *pdev)
> +{
> + struct tps65217_charger *charger = platform_get_drvdata(pdev);
> +
> + kthread_stop(charger->poll_task);
> +
> + power_supply_unregister(charger->ac);
This is not needed with devm_power_supply_register() and actually
it's wrong, since it would be called again by managed resources
infrastructure.
> + return 0;
> +}
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists