Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1633468
| From | Михайлов Алексей Анатольевич <minimumlaw@rambler.ru> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] Add driver for MAX17211/MAX17215 fuel gauge |
| Date | 2017-04-30 19:40 +0200 |
| Message-ID | <tC0Zb-65x-5@gated-at.bofh.it> (permalink) |
| References | <tBBHr-7p2-7@gated-at.bofh.it> <tBBHr-7p2-9@gated-at.bofh.it> <tBDJf-c0-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi!
>> [...]
>>
>> + * FixMe:
>> + * Device without no_thermal = true not register (err -22)
>> + * Len of platform device name "max17211-battery.X.auto"
>> + * more than 20 chars limit in THERMAL_NAME_LENGTH from
>> + * include/uapi/linux/thermal.h
>> + */
> IIRC we already had problems with small THERMAL_NAME_LENGTH before.
> I suggest to add another patch, that increases THERMAL_NAME_LENGTH
> (don't forget to Cc/To the thermal subsystem people).
May be rename "max17211-battery" to "max17211" and remove no_thermal =
true? This case thermal zone will work again. In current (mainline)
kernel all drivers "xxxxxx-battery" (like ds2780-battery or
ds2760-battery) compiled, but not working (not registered). They can
start working again without thermal zone by adding no_thermal = true or
by remove "-battery" from platform device name. Alternative limit on
THERMAL_NAME_LENGTH may be extended.
>> + info->bat = power_supply_register(&pdev->dev, &info->bat_desc,
>> + &psy_cfg);
>> + if (IS_ERR(info->bat)) {
>> + dev_err(info->dev, "failed to register battery\n");
>> + return PTR_ERR(info->bat);
>> + }
> Please use devm_power_supply_register() and drop the remove
> function.
Khm... probe/remove paired functions. I can use
devm_power_supply_register in my code. But all other fuel gauge drivers
use classic probe/remove pair. Which decision will be more correct?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/2] Add driver for MAX17211/MAX17215 fuel gauge "Alex A. Mihaylov" <minimumlaw@rambler.ru> - 2017-04-29 16:40 +0200
Re: [PATCH 2/2] Add driver for MAX17211/MAX17215 fuel gauge Sebastian Reichel <sre@kernel.org> - 2017-04-29 18:50 +0200
Re: [PATCH 2/2] Add driver for MAX17211/MAX17215 fuel gauge Михайлов Алексей Анатольевич <minimumlaw@rambler.ru> - 2017-04-30 19:40 +0200
Re: [PATCH 2/2] Add driver for MAX17211/MAX17215 fuel gauge Sebastian Reichel <sre@kernel.org> - 2017-04-30 22:50 +0200
csiph-web