From: Chris Lapa <chris@lapa.com.au> To: pali.rohar@gmail.com, afd@ti.com, Sebastian Reichel <sre@kernel.org>, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: BQ27xxx registers Date: Tue, 20 Dec 2016 17:00:41 +1100 [thread overview] Message-ID: <6da60215-4b73-8924-d5ca-48f99c70e7fb@lapa.com.au> (raw) [-- Attachment #1: Type: text/plain, Size: 1255 bytes --] 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 [-- Attachment #2: BQ275xx-Gx.txt --] [-- Type: text/plain, Size: 1255 bytes --] Register BQ27500/1 BQ27510-G1 BQ27510-G2 BQ27510-G3 BQ27520-G1 BQ27520-G2 BQ27520-G3 BQ27520-G4 bq27xxx_battery.c BQ27XXX_REG_CTRL 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 BQ27XXX_REG_TEMP 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 BQ27XXX_REG_INT_TEMP — - - 0x28 - 0x36 0x36 0x28 0x28 BQ27XXX_REG_VOLT 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 BQ27XXX_REG_AI 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 BQ27XXX_REG_FLAGS 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a BQ27XXX_REG_TTE 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 BQ27XXX_REG_TTF 0x18 0x18 0x18 — 0x18 0x18 - - - BQ27XXX_REG_TTES 0x1c 0x1c 0x1c 0x1a 0x1c 0x1c 0x1c 0x1a 0x1a BQ27XXX_REG_TTECP 0x26 0x26 0x26 - 0x26 0x26 0x26 - - BQ27XXX_REG_NAC 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c BQ27XXX_REG_FCC 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 BQ27XXX_REG_CYCT 0x2a 0x2a 0x2a 0x1e - 0x2a 0x2a 0x1e 0x2a BQ27XXX_REG_AE 0x22 0x22 0x22 - 0x22 0x22 0x22 - - BQ27XXX_REG_SOC 0x2c 0x2c 0x2c 0x20 0x2c 0x2c 0x2c 0x20 0x2c BQ27XXX_REG_DCAP 0x3c 0x3c 0x3c 0x2e 0x3c 0x3c 0x3c - 0x3c BQ27XXX_REG_AP 0x24 0x24 0x24 - 0x24 0x24 0x24 - -
next reply other threads:[~2016-12-20 6:00 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-12-20 6:00 Chris Lapa [this message] 2016-12-20 11:34 ` Pali Rohár 2016-12-21 2:49 ` Chris Lapa 2016-12-21 12:46 ` Pali Rohár 2016-12-21 13:19 ` Sebastian Reichel 2016-12-21 23:37 ` Chris Lapa 2017-01-16 17:43 ` Andrew F. Davis 2017-01-17 4:47 ` Chris Lapa
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=6da60215-4b73-8924-d5ca-48f99c70e7fb@lapa.com.au \ --to=chris@lapa.com.au \ --cc=afd@ti.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=pali.rohar@gmail.com \ --cc=sre@kernel.org \ --subject='Re: BQ27xxx registers' \ /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
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).