All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@free-electrons.com>
To: icenowy@aosc.xyz, bonbons@linux-vserver.org, sre@kernel.org,
	robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org,
	linux@armlinux.org.uk, maxime.ripard@free-electrons.com,
	jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de,
	pmeerw@pmeerw.net, lee.jones@linaro.org
Cc: Quentin Schulz <quentin.schulz@free-electrons.com>,
	liam@networkimprov.net, thomas.petazzoni@free-electrons.com,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org,
	linux-sunxi@googlegroups.com
Subject: [PATCH v4 12/18] mfd: axp20x: add CHRG_CTRL1/2/3 to writeable regs for AXP20X/AXP22X
Date: Wed, 15 Mar 2017 11:55:31 +0100	[thread overview]
Message-ID: <20170315105537.22349-13-quentin.schulz@free-electrons.com> (raw)
In-Reply-To: <20170315105537.22349-1-quentin.schulz@free-electrons.com>

The CHRG_CTRL1 and CHRG_CTRL2 registers are made for controlling
different battery charging settings such as the constant current charge
value.

The AXP22X also have a third register CHRG_CTRL3 which has settings for
battery charging too.

This adds the CHRG_CTRL1, CHRG_CTRL2 and CHRG_CTRL3 registers to the
list of writeable registers for AXP20X and AXP22X PMICs.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
---

v2:
 - added AXP20X_CHRG_CTRL2 and AXP20X_CHRG_CTRL3 to the writeable
 registers table,
 - removed added reg range for ADC data in volatile regs range,

 drivers/mfd/axp20x.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index a58326e..b2b6b16 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -67,6 +67,7 @@ static const struct regmap_access_table axp152_volatile_table = {
 
 static const struct regmap_range axp20x_writeable_ranges[] = {
 	regmap_reg_range(AXP20X_DATACACHE(0), AXP20X_IRQ5_STATE),
+	regmap_reg_range(AXP20X_CHRG_CTRL1, AXP20X_CHRG_CTRL2),
 	regmap_reg_range(AXP20X_DCDC_MODE, AXP20X_FG_RES),
 	regmap_reg_range(AXP20X_RDC_H, AXP20X_OCV(AXP20X_OCV_MAX)),
 };
@@ -93,6 +94,7 @@ static const struct regmap_access_table axp20x_volatile_table = {
 /* AXP22x ranges are shared with the AXP809, as they cover the same range */
 static const struct regmap_range axp22x_writeable_ranges[] = {
 	regmap_reg_range(AXP20X_DATACACHE(0), AXP20X_IRQ5_STATE),
+	regmap_reg_range(AXP20X_CHRG_CTRL1, AXP22X_CHRG_CTRL3),
 	regmap_reg_range(AXP20X_DCDC_MODE, AXP22X_BATLOW_THRES1),
 };
 
-- 
2.9.3

WARNING: multiple messages have this Message-ID (diff)
From: Quentin Schulz <quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: icenowy-ymACFijhrKM@public.gmane.org,
	bonbons-ud5FBsm0p/xEiooADzr8i9i2O/JbrIOy@public.gmane.org,
	sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	wens-jdAy2FN1RRM@public.gmane.org,
	linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org,
	jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	knaack.h-Mmb7MZpHnFY@public.gmane.org,
	lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org,
	pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org,
	lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Cc: Quentin Schulz
	<quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org,
	thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: [PATCH v4 12/18] mfd: axp20x: add CHRG_CTRL1/2/3 to writeable regs for AXP20X/AXP22X
Date: Wed, 15 Mar 2017 11:55:31 +0100	[thread overview]
Message-ID: <20170315105537.22349-13-quentin.schulz@free-electrons.com> (raw)
In-Reply-To: <20170315105537.22349-1-quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

The CHRG_CTRL1 and CHRG_CTRL2 registers are made for controlling
different battery charging settings such as the constant current charge
value.

The AXP22X also have a third register CHRG_CTRL3 which has settings for
battery charging too.

This adds the CHRG_CTRL1, CHRG_CTRL2 and CHRG_CTRL3 registers to the
list of writeable registers for AXP20X and AXP22X PMICs.

Signed-off-by: Quentin Schulz <quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Acked-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Acked-for-MFD-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---

v2:
 - added AXP20X_CHRG_CTRL2 and AXP20X_CHRG_CTRL3 to the writeable
 registers table,
 - removed added reg range for ADC data in volatile regs range,

 drivers/mfd/axp20x.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index a58326e..b2b6b16 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -67,6 +67,7 @@ static const struct regmap_access_table axp152_volatile_table = {
 
 static const struct regmap_range axp20x_writeable_ranges[] = {
 	regmap_reg_range(AXP20X_DATACACHE(0), AXP20X_IRQ5_STATE),
+	regmap_reg_range(AXP20X_CHRG_CTRL1, AXP20X_CHRG_CTRL2),
 	regmap_reg_range(AXP20X_DCDC_MODE, AXP20X_FG_RES),
 	regmap_reg_range(AXP20X_RDC_H, AXP20X_OCV(AXP20X_OCV_MAX)),
 };
@@ -93,6 +94,7 @@ static const struct regmap_access_table axp20x_volatile_table = {
 /* AXP22x ranges are shared with the AXP809, as they cover the same range */
 static const struct regmap_range axp22x_writeable_ranges[] = {
 	regmap_reg_range(AXP20X_DATACACHE(0), AXP20X_IRQ5_STATE),
+	regmap_reg_range(AXP20X_CHRG_CTRL1, AXP22X_CHRG_CTRL3),
 	regmap_reg_range(AXP20X_DCDC_MODE, AXP22X_BATLOW_THRES1),
 };
 
-- 
2.9.3

WARNING: multiple messages have this Message-ID (diff)
From: quentin.schulz@free-electrons.com (Quentin Schulz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 12/18] mfd: axp20x: add CHRG_CTRL1/2/3 to writeable regs for AXP20X/AXP22X
Date: Wed, 15 Mar 2017 11:55:31 +0100	[thread overview]
Message-ID: <20170315105537.22349-13-quentin.schulz@free-electrons.com> (raw)
In-Reply-To: <20170315105537.22349-1-quentin.schulz@free-electrons.com>

The CHRG_CTRL1 and CHRG_CTRL2 registers are made for controlling
different battery charging settings such as the constant current charge
value.

The AXP22X also have a third register CHRG_CTRL3 which has settings for
battery charging too.

This adds the CHRG_CTRL1, CHRG_CTRL2 and CHRG_CTRL3 registers to the
list of writeable registers for AXP20X and AXP22X PMICs.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
---

v2:
 - added AXP20X_CHRG_CTRL2 and AXP20X_CHRG_CTRL3 to the writeable
 registers table,
 - removed added reg range for ADC data in volatile regs range,

 drivers/mfd/axp20x.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index a58326e..b2b6b16 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -67,6 +67,7 @@ static const struct regmap_access_table axp152_volatile_table = {
 
 static const struct regmap_range axp20x_writeable_ranges[] = {
 	regmap_reg_range(AXP20X_DATACACHE(0), AXP20X_IRQ5_STATE),
+	regmap_reg_range(AXP20X_CHRG_CTRL1, AXP20X_CHRG_CTRL2),
 	regmap_reg_range(AXP20X_DCDC_MODE, AXP20X_FG_RES),
 	regmap_reg_range(AXP20X_RDC_H, AXP20X_OCV(AXP20X_OCV_MAX)),
 };
@@ -93,6 +94,7 @@ static const struct regmap_access_table axp20x_volatile_table = {
 /* AXP22x ranges are shared with the AXP809, as they cover the same range */
 static const struct regmap_range axp22x_writeable_ranges[] = {
 	regmap_reg_range(AXP20X_DATACACHE(0), AXP20X_IRQ5_STATE),
+	regmap_reg_range(AXP20X_CHRG_CTRL1, AXP22X_CHRG_CTRL3),
 	regmap_reg_range(AXP20X_DCDC_MODE, AXP22X_BATLOW_THRES1),
 };
 
-- 
2.9.3

  parent reply	other threads:[~2017-03-15 10:58 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 10:55 [PATCH v4 00/18] add support for AXP20X and AXP22X power supply drivers Quentin Schulz
2017-03-15 10:55 ` Quentin Schulz
2017-03-15 10:55 ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 01/18] dt-bindings: power: battery: add constant-charge-current property Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 12:08   ` Liam Breck
     [not found]     ` <CAKvHMgSnyPPMEZ1o70Ed2oBHGcMho=-jjFhfXGn4t+2bdALEew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-15 13:10       ` Quentin Schulz
     [not found]         ` <ce6f2ddb-f875-0370-ca45-293397d97495-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-03-15 22:23           ` Sebastian Reichel
2017-03-16  6:27           ` Liam Breck
     [not found]             ` <CAKvHMgR58sDnB-nn386Bd-H0Duevkeoc8eEfz=otLAumc8FD+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-16  7:03               ` Quentin Schulz
2017-03-16  7:42                 ` Liam Breck
     [not found]                   ` <CAKvHMgRKroPFDdNMb=F=bA4bTwg9bYMAR-5Z4DKLzHJtCYz3_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-29  6:55                     ` Liam Breck
     [not found]                       ` <CAKvHMgRtEnNbokYReu2vEs9UKH6qZnncdyQD=1JMDTZeN+aYCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-29  7:09                         ` Quentin Schulz
2017-03-29  7:39                           ` Liam Breck
2017-03-29  7:54                             ` Quentin Schulz
2017-03-29  9:26                               ` Liam Breck
     [not found]                                 ` <CAKvHMgQf=Zod-F9SMPDDj5Eq3v=JHGh7uns-T_=ynQM0dMtEvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-30  6:41                                   ` Quentin Schulz
2017-03-30  7:30                                     ` Liam Breck
2017-03-15 22:45         ` Liam Breck
2017-03-15 10:55 ` [PATCH v4 02/18] power: supply: power_supply_core: add constant-charge-current optional property Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 22:24   ` Sebastian Reichel
2017-03-15 22:24     ` Sebastian Reichel
2017-03-15 22:24     ` Sebastian Reichel
2017-03-15 10:55 ` [PATCH v4 03/18] mfd: axp20x: correct name of temperature data ADC registers Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 04/18] iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 05/18] mfd: axp20x: add ADC cells for AXP20X and AXP22X PMICs Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 06/18] mfd: axp20x: add AC power supply cells for " Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 07/18] ARM: dtsi: axp209: add AC power supply subnode Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 08/18] ARM: dtsi: axp22x: " Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 09/18] ARM: dts: sun8i: sina33: enable ACIN " Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 10/18] ARM: sun5i: chip: " Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 11/18] dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 22:28   ` Sebastian Reichel
2017-03-15 22:28     ` Sebastian Reichel
2017-03-15 22:28     ` Sebastian Reichel
2017-03-15 22:41     ` Quentin Schulz
2017-03-15 22:41       ` Quentin Schulz
2017-03-15 22:41       ` Quentin Schulz
2017-03-15 23:02       ` Sebastian Reichel
2017-03-15 23:02         ` Sebastian Reichel
2017-03-15 23:02         ` Sebastian Reichel
2017-03-15 10:55 ` Quentin Schulz [this message]
2017-03-15 10:55   ` [PATCH v4 12/18] mfd: axp20x: add CHRG_CTRL1/2/3 to writeable regs for AXP20X/AXP22X Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 13/18] power: supply: add battery driver for AXP20X and AXP22X PMICs Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 22:38   ` Sebastian Reichel
2017-03-15 22:38     ` Sebastian Reichel
2017-03-15 22:38     ` Sebastian Reichel
2017-03-15 10:55 ` [PATCH v4 14/18] mfd: axp20x: add MFD cells for AXP20X and AXP22X battery driver Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 15/18] ARM: dtsi: axp209: add battery power supply subnode Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 16/18] ARM: dtsi: axp22x: " Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 17/18] ARM: dts: sun8i: sina33: enable " Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55 ` [PATCH v4 18/18] ARM: sun5i: chip: " Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 10:55   ` Quentin Schulz
2017-03-15 12:14 ` [PATCH v4 00/18] add support for AXP20X and AXP22X power supply drivers Lee Jones
2017-03-15 12:14   ` Lee Jones
2017-03-15 12:14   ` Lee Jones
2017-03-15 13:18   ` Quentin Schulz
2017-03-15 13:18     ` Quentin Schulz
2017-03-15 13:18     ` Quentin Schulz
2017-03-15 22:46     ` Sebastian Reichel
2017-03-15 22:46       ` Sebastian Reichel
2017-03-15 22:46       ` Sebastian Reichel
2017-03-20 11:34       ` Quentin Schulz
2017-03-20 11:34         ` Quentin Schulz
2017-03-20 11:34         ` Quentin Schulz
2017-03-20 19:11         ` Sebastian Reichel
2017-03-20 19:11           ` Sebastian Reichel
2017-03-20 19:11           ` Sebastian Reichel

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=20170315105537.22349-13-quentin.schulz@free-electrons.com \
    --to=quentin.schulz@free-electrons.com \
    --cc=bonbons@linux-vserver.org \
    --cc=devicetree@vger.kernel.org \
    --cc=icenowy@aosc.xyz \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.org \
    --cc=liam@networkimprov.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=sre@kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=wens@csie.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.