linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Mike Looijmans <mike.looijmans@topic.nl>
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: Mon, 27 Oct 2014 17:38:43 +0100	[thread overview]
Message-ID: <20141027163842.GB20765@earth.universe> (raw)
In-Reply-To: <1414067918-6688-1-git-send-email-mike.looijmans@topic.nl>

[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]

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").

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-10-27 16:38 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 [this message]
2014-10-28  7:03       ` Mike Looijmans
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=20141027163842.GB20765@earth.universe \
    --to=sre@kernel.org \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mike.looijmans@topic.nl \
    /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).