linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Михайлов Алексей Анатольевич" <minimumlaw@rambler.ru>
To: Sebastian Reichel <sre@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, zbr@ioremap.net
Subject: Re: [PATCH 2/2] Add driver for MAX17211/MAX17215 fuel gauge
Date: Sun, 30 Apr 2017 20:32:10 +0300	[thread overview]
Message-ID: <77d557e3-3ff3-de60-826c-b98937360d8c@rambler.ru> (raw)
In-Reply-To: <20170429164053.olynja4kyqpwhfpk@earth>

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?

  reply	other threads:[~2017-04-30 17:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-29 14:34 [PATCH 0/2] Add support for MAX1721x fuel gauge chips Alex A. Mihaylov
2017-04-29 14:34 ` [PATCH 1/2] Add support for OneWire (W1) devices family 0x26 (MAX17211/MAX17215) Alex A. Mihaylov
2017-04-29 15:59   ` Sebastian Reichel
2017-04-30  5:21     ` Alex A. Mihaylov
2017-04-30 20:53       ` Sebastian Reichel
2017-05-01  6:13         ` Alex A. Mihaylov
2017-04-29 14:34 ` [PATCH 2/2] Add driver for MAX17211/MAX17215 fuel gauge Alex A. Mihaylov
2017-04-29 16:40   ` Sebastian Reichel
2017-04-30 17:32     ` Михайлов Алексей Анатольевич [this message]
2017-04-30 20:44       ` Sebastian Reichel

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=77d557e3-3ff3-de60-826c-b98937360d8c@rambler.ru \
    --to=minimumlaw@rambler.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    --cc=zbr@ioremap.net \
    /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).