Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544932

BQ27xxx registers

From Chris Lapa <chris@lapa.com.au>
Newsgroups linux.kernel
Subject BQ27xxx registers
Date 2016-12-20 07:10 +0100
Message-ID <sQlMC-1Lp-17@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi,

I'm testing out the 4.9 kernel on a AM3359 board fitted with a 
BQ27510-G3 fuel gauge. The board previously worked on the 4.1 kernel, 
however on the 4.9 kernel the bq27xxx_battery.c driver is spitting out 
this error continuously:

power_supply bq27510-0: driver failed to report `charge_full_design' 
property: -121

I have narrowed down the problem to commit 099867a16 where the 
BQ27XXX_REG_DCAP value was changed from 0x2e to 0x3c.

I can generate a patch to fix this issue, however the bigger problem 
exists as to which revision fuel gauge the bq27xxx_battery.c driver is 
intended to support for each family.

Attached is a table I put together of all the register addresses for 
each supported device under the BQ27500 definition and what the current 
driver utilizes (I didn't paste it here as the word wrapping messes with 
the formatting).

There isn't really an ideal solution I can see where we keep the single 
BQ27500 definition and support all the functionality of each revision.

We can try and just support the latest revisions (BQ27510-G3 and 
BQ27520-G4) but I think it could hurt backwards compatibility for 
existing hardware.

I'm happy to work on a fix but just wanted to get some thoughts before 
proceeding.

Cheers,
Chris

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

BQ27xxx registers Chris Lapa <chris@lapa.com.au> - 2016-12-20 07:10 +0100
  Re: BQ27xxx registers Pali Rohár <pali.rohar@gmail.com> - 2016-12-20 12:40 +0100
    Re: BQ27xxx registers Chris Lapa <chris@lapa.com.au> - 2016-12-21 03:50 +0100
      Re: BQ27xxx registers Pali Rohár <pali.rohar@gmail.com> - 2016-12-21 13:50 +0100
        Re: BQ27xxx registers Sebastian Reichel <sre@kernel.org> - 2016-12-21 14:30 +0100
        Re: BQ27xxx registers Chris Lapa <chris@lapa.com.au> - 2016-12-22 00:40 +0100

csiph-web