Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: quentin.schulz@free-electrons.com (Quentin Schulz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/10] mfd: axp20x: add separate MFD cell for AXP223
Date: Fri, 25 Nov 2016 10:09:16 +0100	[thread overview]
Message-ID: <20161125090921.23138-6-quentin.schulz@free-electrons.com> (raw)
In-Reply-To: <20161125090921.23138-1-quentin.schulz@free-electrons.com>

The AXP223 shares most of its logic with the AXP221 but has some
differences for the VBUS power supply driver. Thus, to probe the driver
with the correct compatible, the AXP221 and the AXP223 now have separate
MFD cells.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
---
 drivers/mfd/axp20x.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index ba130be..989d568 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -602,6 +602,21 @@ static struct mfd_cell axp22x_cells[] = {
 	},
 };
 
+static struct mfd_cell axp223_cells[] = {
+	{
+		.name			= "axp20x-pek",
+		.num_resources		= ARRAY_SIZE(axp22x_pek_resources),
+		.resources		= axp22x_pek_resources,
+	}, {
+		.name			= "axp20x-regulator",
+	}, {
+		.name		= "axp20x-usb-power-supply",
+		.of_compatible	= "x-powers,axp223-usb-power-supply",
+		.num_resources	= ARRAY_SIZE(axp22x_usb_power_supply_resources),
+		.resources	= axp22x_usb_power_supply_resources,
+	},
+};
+
 static struct mfd_cell axp152_cells[] = {
 	{
 		.name			= "axp20x-pek",
@@ -789,12 +804,17 @@ int axp20x_match_device(struct axp20x_dev *axp20x)
 		axp20x->regmap_irq_chip = &axp20x_regmap_irq_chip;
 		break;
 	case AXP221_ID:
-	case AXP223_ID:
 		axp20x->nr_cells = ARRAY_SIZE(axp22x_cells);
 		axp20x->cells = axp22x_cells;
 		axp20x->regmap_cfg = &axp22x_regmap_config;
 		axp20x->regmap_irq_chip = &axp22x_regmap_irq_chip;
 		break;
+	case AXP223_ID:
+		axp20x->nr_cells = ARRAY_SIZE(axp223_cells);
+		axp20x->cells = axp223_cells;
+		axp20x->regmap_cfg = &axp22x_regmap_config;
+		axp20x->regmap_irq_chip = &axp22x_regmap_irq_chip;
+		break;
 	case AXP288_ID:
 		axp20x->cells = axp288_cells;
 		axp20x->nr_cells = ARRAY_SIZE(axp288_cells);
-- 
2.9.3

  parent reply	other threads:[~2016-11-25  9:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25  9:09 [PATCH 00/10] add support for VBUS max current and min voltage limits AXP20X and AXP22X PMICs Quentin Schulz
2016-11-25  9:09 ` [PATCH 01/10] power: supply: axp20x_usb_power: use of_device_id data field instead of device_is_compatible Quentin Schulz
2016-11-25  9:23   ` Chen-Yu Tsai
2016-11-25 10:52   ` kbuild test robot
2016-11-25  9:09 ` [PATCH 02/10] power: supply: axp20x_usb_power: set min voltage and max current from sysfs Quentin Schulz
2016-11-25  9:42   ` Chen-Yu Tsai
2016-11-25  9:48   ` Thomas Petazzoni
2016-11-25  9:09 ` [PATCH 03/10] Documentation: DT: binding: axp20x_usb_power: add axp223 compatible Quentin Schulz
2016-11-25  9:25   ` Chen-Yu Tsai
2016-11-25  9:09 ` [PATCH 04/10] power: supply: axp20x_usb_power: add 100mA max current limit for AXP223 Quentin Schulz
2016-11-25  9:56   ` Chen-Yu Tsai
2016-11-25  9:09 ` Quentin Schulz [this message]
2016-11-25 10:03   ` [PATCH 05/10] mfd: axp20x: add separate MFD cell " Chen-Yu Tsai
2016-11-25  9:09 ` [PATCH 06/10] ARM: dtsi: add DTSI " Quentin Schulz
2016-11-25 10:04   ` Chen-Yu Tsai
2016-11-25  9:09 ` [PATCH 07/10] ARM: dts: sun8i-a33-olinuxino: use AXP223 DTSI Quentin Schulz
2016-11-25 10:05   ` Chen-Yu Tsai
2016-11-25  9:09 ` [PATCH 08/10] ARM: dts: sun8i-a33-sinlinx-sina33: " Quentin Schulz
2016-11-25 10:05   ` Chen-Yu Tsai
2016-11-25  9:09 ` [PATCH 09/10] ARM: dts: sun8i-r16-parrot: " Quentin Schulz
2016-11-25 10:05   ` Chen-Yu Tsai
2016-11-25  9:09 ` [PATCH 10/10] ARM: dtsi: sun8i-reference-design-tablet: " Quentin Schulz
2016-11-25 10:06   ` Chen-Yu Tsai

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=20161125090921.23138-6-quentin.schulz@free-electrons.com \
    --to=quentin.schulz@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox