Re: [PATCH] Add support for bq27521 battery monitor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 09 November 2017 22:06:15 Pavel Machek wrote:
> diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
> index ed44439..ee2851a 100644
> --- a/drivers/power/supply/bq27xxx_battery.c
> +++ b/drivers/power/supply/bq27xxx_battery.c
> @@ -381,6 +381,30 @@ static u8 bq27xxx_regs[][BQ27XXX_REG_MAX] = {
>  		[BQ27XXX_REG_AP] = INVALID_REG_ADDR,
>  		BQ27XXX_DM_REG_ROWS,
>  	},
> +	[BQ27521] = {				/* FIXME */
> +		[BQ27XXX_REG_CTRL] = 0x02,
> +		[BQ27XXX_REG_TEMP] = 0x0a,
> +		[BQ27XXX_REG_INT_TEMP] = INVALID_REG_ADDR,
> +		[BQ27XXX_REG_VOLT] = 0x0c,
> +		[BQ27XXX_REG_AI] = 0x0e,
> +		[BQ27XXX_REG_FLAGS] = 0x08,
> +		[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] = INVALID_REG_ADDR,
> +		[BQ27XXX_REG_FCC] = INVALID_REG_ADDR,
> +		[BQ27XXX_REG_CYCT] = INVALID_REG_ADDR,
> +		[BQ27XXX_REG_AE] = INVALID_REG_ADDR,
> +		[BQ27XXX_REG_SOC] = INVALID_REG_ADDR,
> +		[BQ27XXX_REG_DCAP] = INVALID_REG_ADDR,
> +		[BQ27XXX_REG_AP] = INVALID_REG_ADDR,
> +		[BQ27XXX_DM_CTRL] = INVALID_REG_ADDR,
> +		[BQ27XXX_DM_CLASS] = INVALID_REG_ADDR,
> +		[BQ27XXX_DM_BLOCK] = INVALID_REG_ADDR,
> +		[BQ27XXX_DM_DATA] = INVALID_REG_ADDR,
> +		[BQ27XXX_DM_CKSUM] = INVALID_REG_ADDR,
> +	},
>  	[BQ27530] = {
>  		[BQ27XXX_REG_CTRL] = 0x00,
>  		[BQ27XXX_REG_TEMP] = 0x06,

Hi! IIRC those registers are valid only for sn27521 chip in revision 14
(or new). For older revision is used different register map. And
detection of chip revision is somehow possible via some registers.

-- 
Pali Rohár
pali.rohar@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux