lkml.org 
[lkml]   [2015]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCHv2 2/2] power_supply: Add support for tps65217-charger.
From
Hi,

2015-09-24 17:45 GMT+02:00 Sebastian Reichel <sre@kernel.org>:
> 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.
>
Right, as I moved ...

>> + 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.
>

Yes I missed this unregister. I'll send v3

Thanks,
Enric

>> + return 0;
>> +}
>
> -- Sebastian


\
 
 \ /
  Last update: 2015-09-24 18:21    [W:0.601 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site