From: Sebastian Reichel <sre@kernel.org>
To: Matt Ranostay <matt@ranostay.consulting>
Cc: linux-pm@vger.kernel.org, tony@atomide.com
Subject: Re: [PATCH v4 5/8] power: bq27xxx_battery: add BQ27425 chip id
Date: Sun, 29 Jan 2017 16:35:12 +0100 [thread overview]
Message-ID: <20170129153512.eyaqj7mhuwlqkiu7@earth> (raw)
In-Reply-To: <20170122071404.9654-6-matt@ranostay.consulting>
[-- Attachment #1: Type: text/plain, Size: 3875 bytes --]
Hi,
I queued this into power-supply's for-next branch. I fixed up
the patch subject & description:
power: supply: bq27xxx: add BQ27425 chip id
This fixes over- & undertemperature detection of BQ27425.
-- Sebastian
On Sat, Jan 21, 2017 at 11:14:01PM -0800, Matt Ranostay wrote:
> Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
> ---
> drivers/power/supply/bq27xxx_battery.c | 23 ++++++++++++++++++++++-
> drivers/power/supply/bq27xxx_battery_i2c.c | 2 +-
> include/linux/power/bq27xxx_battery.h | 3 ++-
> 3 files changed, 25 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
> index 398801a21b86..12ecea308186 100644
> --- a/drivers/power/supply/bq27xxx_battery.c
> +++ b/drivers/power/supply/bq27xxx_battery.c
> @@ -417,6 +417,25 @@ static u8 bq27xxx_regs[][BQ27XXX_REG_MAX] = {
> [BQ27XXX_REG_DCAP] = 0x3c,
> [BQ27XXX_REG_AP] = 0x18,
> },
> + [BQ27425] = {
> + [BQ27XXX_REG_CTRL] = 0x00,
> + [BQ27XXX_REG_TEMP] = 0x02,
> + [BQ27XXX_REG_INT_TEMP] = 0x1e,
> + [BQ27XXX_REG_VOLT] = 0x04,
> + [BQ27XXX_REG_AI] = 0x10,
> + [BQ27XXX_REG_FLAGS] = 0x06,
> + [BQ27XXX_REG_TTE] = INVALID_REG_ADDR,
> + [BQ27XXX_REG_TTF] = INVALID_REG_ADDR,
> + [BQ27XXX_REG_TTES] = INVALID_REG_ADDR,
> + [BQ27XXX_REG_TTECP] = INVALID_REG_ADDR,
> + [BQ27XXX_REG_NAC] = 0x08,
> + [BQ27XXX_REG_FCC] = 0x0e,
> + [BQ27XXX_REG_CYCT] = INVALID_REG_ADDR,
> + [BQ27XXX_REG_AE] = INVALID_REG_ADDR,
> + [BQ27XXX_REG_SOC] = 0x1c,
> + [BQ27XXX_REG_DCAP] = 0x3c,
> + [BQ27XXX_REG_AP] = 0x18,
> + },
> };
>
> static enum power_supply_property bq27000_battery_props[] = {
> @@ -752,6 +771,7 @@ static struct {
> BQ27XXX_PROP(BQ27541, bq27541_battery_props),
> BQ27XXX_PROP(BQ27545, bq27545_battery_props),
> BQ27XXX_PROP(BQ27421, bq27421_battery_props),
> + BQ27XXX_PROP(BQ27425, bq27421_battery_props),
> };
>
> static DEFINE_MUTEX(bq27xxx_list_lock);
> @@ -1015,6 +1035,7 @@ static bool bq27xxx_battery_overtemp(struct bq27xxx_device_info *di, u16 flags)
> return flags & (BQ27XXX_FLAG_OTC | BQ27XXX_FLAG_OTD);
> case BQ27530:
> case BQ27421:
> + case BQ27425:
> return flags & BQ27XXX_FLAG_OT;
> default:
> return false;
> @@ -1026,7 +1047,7 @@ static bool bq27xxx_battery_overtemp(struct bq27xxx_device_info *di, u16 flags)
> */
> static bool bq27xxx_battery_undertemp(struct bq27xxx_device_info *di, u16 flags)
> {
> - if (di->chip == BQ27530 || di->chip == BQ27421)
> + if (di->chip == BQ27530 || di->chip == BQ27421 || di->chip == BQ27425)
> return flags & BQ27XXX_FLAG_UT;
>
> return false;
> diff --git a/drivers/power/supply/bq27xxx_battery_i2c.c b/drivers/power/supply/bq27xxx_battery_i2c.c
> index c68fbc3fe50a..2ea2d0b06948 100644
> --- a/drivers/power/supply/bq27xxx_battery_i2c.c
> +++ b/drivers/power/supply/bq27xxx_battery_i2c.c
> @@ -167,9 +167,9 @@ static const struct i2c_device_id bq27xxx_i2c_id_table[] = {
> { "bq27742", BQ27541 },
> { "bq27545", BQ27545 },
> { "bq27421", BQ27421 },
> - { "bq27425", BQ27421 },
> { "bq27441", BQ27421 },
> { "bq27621", BQ27421 },
> + { "bq27425", BQ27425 },
> {},
> };
> MODULE_DEVICE_TABLE(i2c, bq27xxx_i2c_id_table);
> diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h
> index b312bcef53da..3f265dbf11af 100644
> --- a/include/linux/power/bq27xxx_battery.h
> +++ b/include/linux/power/bq27xxx_battery.h
> @@ -17,7 +17,8 @@ enum bq27xxx_chip {
> BQ27530, /* bq27530, bq27531 */
> BQ27541, /* bq27541, bq27542, bq27546, bq27742 */
> BQ27545, /* bq27545 */
> - BQ27421, /* bq27421, bq27425, bq27441, bq27621 */
> + BQ27421, /* bq27421, bq27441, bq27621 */
> + BQ27425, /* bq27425 */
> };
>
> /**
> --
> 2.10.2
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-01-29 15:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-22 7:13 [PATCH v4 0/8] power: bq27xxx: add support for NVRAM R/W access Matt Ranostay
2017-01-22 7:13 ` [PATCH v4 1/8] devicetree: property-units: add mWh and mAh units Matt Ranostay
2017-01-23 17:50 ` Rob Herring
2017-01-22 7:13 ` [PATCH v4 2/8] devicetree: power: add battery state machine documentation Matt Ranostay
2017-01-22 22:22 ` Liam Breck
2017-01-24 19:56 ` Liam Breck
[not found] ` <CAKvHMgS9ZxE2qxDqeAVRJFzerjkJV=io58aQjtU51j=kFzbYtw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-29 17:27 ` Sebastian Reichel
2017-01-26 6:19 ` Liam Breck
2017-01-26 7:02 ` Matt Ranostay
2017-01-29 17:20 ` Sebastian Reichel
2017-01-29 23:22 ` Liam Breck
2017-01-30 2:30 ` Sebastian Reichel
2017-01-30 10:54 ` Liam Breck
[not found] ` <CAKvHMgQi1tRyUXh0504rP8VUVkFVPt_4NnYTOrBXeO4dde6KMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-30 21:40 ` Liam Breck
[not found] ` <20170122222212.27086-1-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org>
2017-01-29 18:06 ` Sebastian Reichel
2017-01-29 23:32 ` Liam Breck
[not found] ` <CAKvHMgTrFjjEWwK-NeGOF1o6KRQPXYUvcqWcDwaW+5ZKjQ7VZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-30 2:39 ` Sebastian Reichel
2017-01-30 2:46 ` Liam Breck
2017-01-31 20:59 ` Liam Breck
[not found] ` <20170122071404.9654-1-matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org>
2017-01-22 7:13 ` [PATCH v4 3/8] power: power_supply: add battery information struct Matt Ranostay
[not found] ` <20170122071404.9654-4-matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org>
2017-01-29 18:23 ` Sebastian Reichel
2017-01-22 7:14 ` [PATCH v4 4/8] power: power_supply: add battery info platform data retrieval Matt Ranostay
[not found] ` <20170122071404.9654-5-matt-sk+viVC6FLCDq+mSdOJa79kegs52MxvZ@public.gmane.org>
2017-01-29 18:28 ` Sebastian Reichel
2017-01-22 7:14 ` [PATCH v4 5/8] power: bq27xxx_battery: add BQ27425 chip id Matt Ranostay
2017-01-29 15:35 ` Sebastian Reichel [this message]
2017-01-29 20:29 ` Liam Breck
2017-01-22 7:14 ` [PATCH v4 7/8] devicetree: power: bq27xxx: add monitored battery documentation Matt Ranostay
2017-01-22 7:14 ` [PATCH v4 6/8] power: bq27xxx_battery: add i2c bulk read/write functions Matt Ranostay
2017-01-29 18:38 ` Sebastian Reichel
2017-01-22 7:14 ` [PATCH v4 8/8] power: bq27xxx_battery: add initial state machine support Matt Ranostay
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=20170129153512.eyaqj7mhuwlqkiu7@earth \
--to=sre@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=matt@ranostay.consulting \
--cc=tony@atomide.com \
/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