Linux Power Management development
 help / color / mirror / Atom feed
From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: Liam Breck <liam@networkimprov.net>, Sebastian Reichel <sre@kernel.org>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
	"Andrew F. Davis" <afd@ti.com>,
	"Linux PM mailing list" <linux-pm@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Discussions about the Letux Kernel"
	<letux-kernel@openphoenux.org>,
	kernel@pyra-handheld.com
Subject: Re: [PATCH resend v2] power: supply: bq27xxx: enable writing capacity values for bq27421
Date: Wed, 30 Aug 2017 11:30:57 +0200	[thread overview]
Message-ID: <7428DD60-FE09-41C4-9DBC-FFDCB9D0B591@goldelico.com> (raw)
In-Reply-To: <CAKvHMgQDcgabM3UogXE3L07n9yiHgD3FfJ5GCOqkAk1=SA2A=Q@mail.gmail.com>

Hi Liam and Sebastian,

> Am 29.08.2017 um 22:20 schrieb Liam Breck <liam@networkimprov.net>:
> 
> Hi Nikolaus, thanks for the patch...
> 
> On Tue, Aug 29, 2017 at 1:10 PM, H. Nikolaus Schaller <hns@goldelico.com> wrote:
>> Tested on Pyra prototype with bq27421.
>> 
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> ---
>> drivers/power/supply/bq27xxx_battery.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
>> index b6c3120ca5ad..e3c878ef7c7e 100644
>> --- a/drivers/power/supply/bq27xxx_battery.c
>> +++ b/drivers/power/supply/bq27xxx_battery.c
>> @@ -688,7 +688,7 @@ static struct bq27xxx_dm_reg bq27545_dm_regs[] = {
>> #define bq27545_dm_regs 0
>> #endif
>> 
>> -#if 0 /* not yet tested */
>> +#if 1 /* tested on Pyra */
>> static struct bq27xxx_dm_reg bq27421_dm_regs[] = {
> 
> I think we can drop the #if and #else...#endif so it's just the
> dm_regs table, as with bq27425.

I have fixed that and did take the chance to update my OpenPandora
kernel so that I also could test and make the bq27500 working.

The biggest hurdle was to find out that I have to change the
compatible string to "ti,bq27500-1" to get non-NULL dm_regs...

[   12.765930] bq27xxx_battery_i2c_probe name=bq27500-1-0
[   12.771392] bq27xxx_battery_i2c_probe call setup
[   12.874816] bq27xxx_battery_setup
[   12.904266] bq27xxx_battery_setup: dm_regs=bf0520e0
[   12.933380] (NULL device *): hwmon: 'bq27500-1-0' is not a valid name attribute, please fix
[   13.234893] bq27xxx_battery_settings
[   13.238891] bq27xxx-battery 2-0055: invalid battery:energy-full-design-microwatt-hours 14800000
[   13.312469] bq27xxx_battery_set_config
[   13.407745] bq27xxx_battery_unseal
[   13.455993] bq27xxx_battery_update_dm_block
[   13.460418] bq27xxx-battery 2-0055: update terminate-voltage to 3200
[   13.694885] bq27xxx_battery_seal

Does this look ok for

	bat: battery {
		compatible = "simple-battery", "openpandora-battery";
		voltage-min-design-microvolt = <3200000>;
		energy-full-design-microwatt-hours = <14800000>;
		charge-full-design-microamp-hours = <4000000>;
	};

?

I will send a patch for enabling both fuel gauges and the omap3-pandora-common.dtsi asap.

BR and thanks,
Nikolaus

  parent reply	other threads:[~2017-08-30  9:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 20:10 [PATCH resend v2] power: supply: bq27xxx: enable writing capacity values for bq27421 H. Nikolaus Schaller
2017-08-29 20:20 ` Liam Breck
2017-08-30  0:37   ` Sebastian Reichel
2017-08-30  9:30   ` H. Nikolaus Schaller [this message]
2017-08-30 11:24     ` Liam Breck
2017-08-31  6:58       ` H. Nikolaus Schaller
2017-08-31  8:58         ` Liam Breck
2017-08-31  9:35           ` H. Nikolaus Schaller
2017-08-31 20:19             ` Liam Breck
2017-09-08 17:38               ` H. Nikolaus Schaller
2017-09-08 17:40                 ` Pali Rohár
2017-09-08 17:44                   ` H. Nikolaus Schaller
2017-09-08 20:19                 ` Liam Breck
2017-09-08 20:28                   ` H. Nikolaus Schaller
2017-09-08 20:57                     ` Liam Breck
2017-09-08 22:08                       ` H. Nikolaus Schaller
2017-09-09 20:21                     ` [PATCH resend v2] power: supply: bq27xxx: enable writing capacity values for bq27421 + bq27500 H. Nikolaus Schaller

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=7428DD60-FE09-41C4-9DBC-FFDCB9D0B591@goldelico.com \
    --to=hns@goldelico.com \
    --cc=afd@ti.com \
    --cc=kernel@pyra-handheld.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=liam@networkimprov.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --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