linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Looijmans <mike.looijmans@topic.nl>
To: Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	dbaryshkov@gmail.com, dwmw2@infradead.org
Subject: Re: [PATCH v4] Add LTC2941/LTC2943 Battery Gauge Driver
Date: Tue, 28 Oct 2014 08:03:31 +0100	[thread overview]
Message-ID: <544F3FC3.3040106@topic.nl> (raw)
In-Reply-To: <20141027163842.GB20765@earth.universe>

On 10/27/2014 05:38 PM, Sebastian Reichel wrote:
> Hi,
>
> On Thu, Oct 23, 2014 at 02:38:38PM +0200, Mike Looijmans wrote:
>> Both the LTC2941 and LTC2943 measure battery capacity.
>> The LTC2943 is compatible with the LTC2941, it adds voltage and
>> temperature monitoring, and uses a slightly different conversion
>> formula for the charge counter.
>>
>> To avoid confusion with e.g. the LTC2945, the driver is called
>> LTC2941 instead of LTC294X.
>>
>> v2: Fix units of measurement: uV, uA and centidegrees.
>> v3: Correctly set configuration register. Allow negative values
>>      for the sense resistor.
>> v4: Run checkpatch.pl and fix all errors and warnings.
>>
>> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
>> ---
>> [...]
>>
>> +	np = of_node_get(client->dev.of_node);
>> +
>> +	/* r_sense can be negative, when sense+ is connected to the battery
>> +	 * instead of the sense-. This results in reversed measurements. */
>> +	ret = of_property_read_u32(np, "resistor-sense", &r_sense);
>> +	if (ret < 0) {
>> +		dev_err(&client->dev,
>> +			"Could not find resistor-sense in devicetree\n");
>> +		goto fail_name;
>> +	}
>> +	info->r_sense = r_sense;
>> +
>> +	ret = of_property_read_u32(np, "prescaler-exponent", &prescaler_exp);
>> +	if (ret < 0) {
>> +		dev_err(&client->dev,
>> +			"PrescalerExponent not in devicetree, assume max\n");
>> +		prescaler_exp = LTC2941_MAX_PRESCALER_EXP;
>> +	}
>
> The device tree properties are not documented. Please document them
> in a separate patch and Cc devicetree binding maintainers.
>
> Apart from that the properties should be vendor prefixed (e.g.
> "lltc,resistor-sense").

Thanks for your feedback. I will post the requested changes asap.





Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Systems
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: (+31) (0) 499 33 69 79
Telefax:  (+31) (0) 499 33 69 70
E-mail: mike.looijmans@topic.nl
Website: www.topic.nl

Please consider the environment before printing this e-mail

Topic zoekt gedreven (embedded) software specialisten!
http://topic.nl/vacatures/topic-zoekt-software-engineers/

  reply	other threads:[~2014-10-28  7:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 13:32 [PATCH v2] Added LTC2941/LTC2943 Battery Gauge Driver Mike Looijmans
2014-10-08  6:05 ` [PATCH v3] Add " Mike Looijmans
2014-10-23 12:38   ` [PATCH v4] " Mike Looijmans
2014-10-27  4:14     ` Pavel Machek
2014-10-27 16:38     ` Sebastian Reichel
2014-10-28  7:03       ` Mike Looijmans [this message]
2014-10-28  7:05       ` [PATCH] " Mike Looijmans
2015-01-22  2:24         ` Sebastian Reichel
2015-02-11 11:21           ` Mike Looijmans
2015-02-11 17:01             ` Sebastian Reichel
2014-10-28  7:08       ` [PATCH] Add devicetree binding documentation for the LTC2941/LTC2943 driver Mike Looijmans
     [not found]         ` <1414480084-3604-1-git-send-email-mike.looijmans-Oq418RWZeHk@public.gmane.org>
2015-01-22  2:24           ` 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=544F3FC3.3040106@topic.nl \
    --to=mike.looijmans@topic.nl \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    /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).