From: Sebastian Reichel <sre@kernel.org>
To: Enric Balletbo i Serra <eballetbo@gmail.com>
Cc: devicetree@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
dbaryshkov@gmail.com, dwmw2@infradead.org, tony@atomide.com,
sameo@linux.intel.com, lee.jones@linaro.org,
sjoerd.simons@collabora.co.uk, javier@dowhile0.org
Subject: Re: [PATCHv2 2/2] power_supply: Add support for tps65217-charger.
Date: Thu, 24 Sep 2015 17:45:30 +0200 [thread overview]
Message-ID: <20150924154529.GB3125@earth> (raw)
In-Reply-To: <1443079405-17813-3-git-send-email-enric.balletbo@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-09-24 15:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-24 7:23 [PATCHv2 0/2] Add support for tps65217 charger Enric Balletbo i Serra
2015-09-24 7:23 ` [PATCHv2 1/2] devicetree: Add TPS65217 charger binding Enric Balletbo i Serra
2015-09-24 7:23 ` [PATCHv2 2/2] power_supply: Add support for tps65217-charger Enric Balletbo i Serra
2015-09-24 15:45 ` Sebastian Reichel [this message]
2015-09-24 15:55 ` Enric Balletbo Serra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150924154529.GB3125@earth \
--to=sre@kernel.org \
--cc=dbaryshkov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=eballetbo@gmail.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=javier@dowhile0.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=sameo@linux.intel.com \
--cc=sjoerd.simons@collabora.co.uk \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).