Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1723883 > unrolled thread
| Started by | "H. Nikolaus Schaller" <hns@goldelico.com> |
|---|---|
| First post | 2017-08-31 09:10 +0200 |
| Last post | 2017-08-31 09:10 +0200 |
| Articles | 7 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v3 0/4] fixes for latest bq27xxx driver and OpenPandora DT nodes "H. Nikolaus Schaller" <hns@goldelico.com> - 2017-08-31 09:10 +0200
[PATCH v3 2/4] power: supply: bq27xxx: enable writing capacity values for bq27500 "H. Nikolaus Schaller" <hns@goldelico.com> - 2017-08-31 09:10 +0200
Re: [PATCH v3 2/4] power: supply: bq27xxx: enable writing capacity values for bq27500 Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-08-31 10:40 +0200
[PATCH v3 4/4] DT: OpenPandora: fix for configuration of bq27500 fuel gauge "H. Nikolaus Schaller" <hns@goldelico.com> - 2017-08-31 09:10 +0200
[PATCH v3 1/4] power: supply: bq27xxx: enable writing capacity values for bq27421 "H. Nikolaus Schaller" <hns@goldelico.com> - 2017-08-31 09:10 +0200
Re: [PATCH v3 1/4] power: supply: bq27xxx: enable writing capacity values for bq27421 Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-08-31 10:40 +0200
[PATCH v3 3/4] DT: OpenPandora: add battery node to describe OpenPandora battery "H. Nikolaus Schaller" <hns@goldelico.com> - 2017-08-31 09:10 +0200
| From | "H. Nikolaus Schaller" <hns@goldelico.com> |
|---|---|
| Date | 2017-08-31 09:10 +0200 |
| Subject | [PATCH v3 0/4] fixes for latest bq27xxx driver and OpenPandora DT nodes |
| Message-ID | <ukrLY-2y1-5@gated-at.bofh.it> |
Latest bq27xxx drivers allow to write RAM/NVRAM parameters of the fuel gauge chip from values defined in board specific device tree. This allows to specify the battery properties of a standard battery. This patch set enables this for two chips where I have tested it on real devices: bq27421: Pyra handheld prototype bq27500: OpenPandora 600 Mhz standard device Since the Pyra DT is not yet mainlined, there are only DT patches for the OpenPandora. H. Nikolaus Schaller (4): power: supply: bq27xxx: enable writing capacity values for bq27421 power: supply: bq27xxx: enable writing capacity values for bq27500 DT: OpenPandora: add battery node to describe OpenPandora battery DT: OpenPandora: fix for configuration of bq27500 fuel gauge arch/arm/boot/dts/omap3-pandora-common.dtsi | 11 ++++++++++- drivers/power/supply/bq27xxx_battery.c | 8 -------- 2 files changed, 10 insertions(+), 9 deletions(-) -- 2.12.2
[toc] | [next] | [standalone]
| From | "H. Nikolaus Schaller" <hns@goldelico.com> |
|---|---|
| Date | 2017-08-31 09:10 +0200 |
| Subject | [PATCH v3 2/4] power: supply: bq27xxx: enable writing capacity values for bq27500 |
| Message-ID | <ukrLY-2y1-7@gated-at.bofh.it> |
| In reply to | #1723883 |
Tested on OpenPandora with bq27500.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
drivers/power/supply/bq27xxx_battery.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index e80571cf7be1..5562f998330f 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -653,15 +653,11 @@ enum bq27xxx_dm_reg_id {
#define bq2751x_dm_regs 0
#define bq2752x_dm_regs 0
-#if 0 /* not yet tested */
static struct bq27xxx_dm_reg bq27500_dm_regs[] = {
[BQ27XXX_DM_DESIGN_CAPACITY] = { 48, 10, 2, 0, 65535 },
[BQ27XXX_DM_DESIGN_ENERGY] = { }, /* missing on chip */
[BQ27XXX_DM_TERMINATE_VOLTAGE] = { 80, 48, 2, 1000, 32767 },
};
-#else
-#define bq27500_dm_regs 0
-#endif
/* todo create data memory definitions from datasheets and test on chips */
#define bq27510g1_dm_regs 0
--
2.12.2
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-08-31 10:40 +0200 |
| Subject | Re: [PATCH v3 2/4] power: supply: bq27xxx: enable writing capacity values for bq27500 |
| Message-ID | <uktb3-3io-19@gated-at.bofh.it> |
| In reply to | #1723884 |
[Multipart message — attachments visible in raw view] — view raw
Hi,
On Thu, Aug 31, 2017 at 08:59:51AM +0200, H. Nikolaus Schaller wrote:
> Tested on OpenPandora with bq27500.
>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
Thanks, queued.
-- Sebastian
> drivers/power/supply/bq27xxx_battery.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
> index e80571cf7be1..5562f998330f 100644
> --- a/drivers/power/supply/bq27xxx_battery.c
> +++ b/drivers/power/supply/bq27xxx_battery.c
> @@ -653,15 +653,11 @@ enum bq27xxx_dm_reg_id {
> #define bq2751x_dm_regs 0
> #define bq2752x_dm_regs 0
>
> -#if 0 /* not yet tested */
> static struct bq27xxx_dm_reg bq27500_dm_regs[] = {
> [BQ27XXX_DM_DESIGN_CAPACITY] = { 48, 10, 2, 0, 65535 },
> [BQ27XXX_DM_DESIGN_ENERGY] = { }, /* missing on chip */
> [BQ27XXX_DM_TERMINATE_VOLTAGE] = { 80, 48, 2, 1000, 32767 },
> };
> -#else
> -#define bq27500_dm_regs 0
> -#endif
>
> /* todo create data memory definitions from datasheets and test on chips */
> #define bq27510g1_dm_regs 0
> --
> 2.12.2
>
[toc] | [prev] | [next] | [standalone]
| From | "H. Nikolaus Schaller" <hns@goldelico.com> |
|---|---|
| Date | 2017-08-31 09:10 +0200 |
| Subject | [PATCH v3 4/4] DT: OpenPandora: fix for configuration of bq27500 fuel gauge |
| Message-ID | <ukrLY-2y1-19@gated-at.bofh.it> |
| In reply to | #1723883 |
Using the latest driver features requires to use "ti,bq27500-1"
instead of "ti,bq27500" as the compatible property.
Also add a reference to the monitored-battery.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
arch/arm/boot/dts/omap3-pandora-common.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/omap3-pandora-common.dtsi b/arch/arm/boot/dts/omap3-pandora-common.dtsi
index 154865289dba..bdf082246f9b 100644
--- a/arch/arm/boot/dts/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/omap3-pandora-common.dtsi
@@ -545,8 +545,9 @@
clock-frequency = <100000>;
bq27500@55 {
- compatible = "ti,bq27500";
+ compatible = "ti,bq27500-1";
reg = <0x55>;
+ monitored-battery = <&bat>;
};
};
--
2.12.2
[toc] | [prev] | [next] | [standalone]
| From | "H. Nikolaus Schaller" <hns@goldelico.com> |
|---|---|
| Date | 2017-08-31 09:10 +0200 |
| Subject | [PATCH v3 1/4] power: supply: bq27xxx: enable writing capacity values for bq27421 |
| Message-ID | <ukrLY-2y1-23@gated-at.bofh.it> |
| In reply to | #1723883 |
Tested on Pyra prototype with bq27421.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
drivers/power/supply/bq27xxx_battery.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
index ad876a3abe01..e80571cf7be1 100644
--- a/drivers/power/supply/bq27xxx_battery.c
+++ b/drivers/power/supply/bq27xxx_battery.c
@@ -688,15 +688,11 @@ static struct bq27xxx_dm_reg bq27545_dm_regs[] = {
#define bq27545_dm_regs 0
#endif
-#if 0 /* not yet tested */
static struct bq27xxx_dm_reg bq27421_dm_regs[] = {
[BQ27XXX_DM_DESIGN_CAPACITY] = { 82, 10, 2, 0, 8000 },
[BQ27XXX_DM_DESIGN_ENERGY] = { 82, 12, 2, 0, 32767 },
[BQ27XXX_DM_TERMINATE_VOLTAGE] = { 82, 16, 2, 2500, 3700 },
};
-#else
-#define bq27421_dm_regs 0
-#endif
static struct bq27xxx_dm_reg bq27425_dm_regs[] = {
[BQ27XXX_DM_DESIGN_CAPACITY] = { 82, 12, 2, 0, 32767 },
--
2.12.2
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-08-31 10:40 +0200 |
| Subject | Re: [PATCH v3 1/4] power: supply: bq27xxx: enable writing capacity values for bq27421 |
| Message-ID | <uktb3-3io-7@gated-at.bofh.it> |
| In reply to | #1723886 |
[Multipart message — attachments visible in raw view] — view raw
Hi,
On Thu, Aug 31, 2017 at 08:59:50AM +0200, H. Nikolaus Schaller wrote:
> Tested on Pyra prototype with bq27421.
>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
Thanks, queued.
-- Sebastian
> drivers/power/supply/bq27xxx_battery.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
> index ad876a3abe01..e80571cf7be1 100644
> --- a/drivers/power/supply/bq27xxx_battery.c
> +++ b/drivers/power/supply/bq27xxx_battery.c
> @@ -688,15 +688,11 @@ static struct bq27xxx_dm_reg bq27545_dm_regs[] = {
> #define bq27545_dm_regs 0
> #endif
>
> -#if 0 /* not yet tested */
> static struct bq27xxx_dm_reg bq27421_dm_regs[] = {
> [BQ27XXX_DM_DESIGN_CAPACITY] = { 82, 10, 2, 0, 8000 },
> [BQ27XXX_DM_DESIGN_ENERGY] = { 82, 12, 2, 0, 32767 },
> [BQ27XXX_DM_TERMINATE_VOLTAGE] = { 82, 16, 2, 2500, 3700 },
> };
> -#else
> -#define bq27421_dm_regs 0
> -#endif
>
> static struct bq27xxx_dm_reg bq27425_dm_regs[] = {
> [BQ27XXX_DM_DESIGN_CAPACITY] = { 82, 12, 2, 0, 32767 },
> --
> 2.12.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[toc] | [prev] | [next] | [standalone]
| From | "H. Nikolaus Schaller" <hns@goldelico.com> |
|---|---|
| Date | 2017-08-31 09:10 +0200 |
| Subject | [PATCH v3 3/4] DT: OpenPandora: add battery node to describe OpenPandora battery |
| Message-ID | <ukrLY-2y1-21@gated-at.bofh.it> |
| In reply to | #1723883 |
Add DT node to describe the standard OpenPandora battery PB-4000-001
so that its properties can be used by the fuel gauge driver.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
arch/arm/boot/dts/omap3-pandora-common.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/omap3-pandora-common.dtsi b/arch/arm/boot/dts/omap3-pandora-common.dtsi
index 582e1fe25602..154865289dba 100644
--- a/arch/arm/boot/dts/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/omap3-pandora-common.dtsi
@@ -273,6 +273,14 @@
enable-active-high;
gpio = <&twl_gpio 13 GPIO_ACTIVE_HIGH>;
};
+
+ /* standard OpenPandora battery (PB-4000-001) */
+ bat: battery {
+ compatible = "simple-battery", "openpandora-battery";
+ voltage-min-design-microvolt = <3200000>;
+ energy-full-design-microwatt-hours = <14800000>;
+ charge-full-design-microamp-hours = <4000000>;
+ };
};
&omap3_pmx_core {
--
2.12.2
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web