linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/6] Add support for Maxim 77663 MFD
@ 2019-05-05 15:43 Dmitry Osipenko
  2019-05-05 15:43 ` [PATCH v4 1/6] dt-bindings: mfd: max77620: Add compatible for Maxim 77663 Dmitry Osipenko
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Dmitry Osipenko @ 2019-05-05 15:43 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter
  Cc: devicetree, linux-tegra, linux-kernel

Hello,

This series adds support for the Maxim 77663 chip that provides PMIC, RTC,
GPIO and watchdog timer functionality. The hardware is very similar to the
Maxim 77620/20024 hardware units that are already supported by the kernel,
hence we will reuse the existing drivers for 77663. The GPIO, regulator,
RTC and watchdog timer functionality was tested on a Nexus 7 tablet that
has the Max77663 chip, everything is working perfectly fine. I'm looking
at upstreaming support for that tablet device and Max77663 is one of the
core components that are currently missing in the upstream kernel.

Changelog:

v4: Addressed review comments from Rob Herring to v3 by making use of
    generic "system-power-controller" property and making couple other
    minor cosmetic changes. Added Mark's Brown a-b to the regulator-patch.

v3: Dropped "Support device-tree properly" patch since turned out that
    I2C core takes care of the device-tree matching and I wasn't aware of
    it.

v2: Added PINCTRL sub-device to Max77663 MFD as it looks compatible with
    77620.

    Added new "maxim,system-power-controller" OF property.

    Patch "Support device-tree properly" now doesn't remove driver's
    "id_table" since potentially it could have some use in the downstream
    kernel forks and it doesn't hurt to keep it around.

Dmitry Osipenko (6):
  dt-bindings: mfd: max77620: Add compatible for Maxim 77663
  dt-bindings: mfd: max77620: Add system-power-controller property
  mfd: max77620: Fix swapped FPS_PERIOD_MAX_US values
  mfd: max77620: Support Maxim 77663
  mfd: max77620: Provide system power-off functionality
  regulator: max77620: Support Maxim 77663

 .../devicetree/bindings/mfd/max77620.txt      |  9 +-
 drivers/mfd/max77620.c                        | 87 ++++++++++++++++++-
 drivers/regulator/max77620-regulator.c        | 26 +++++-
 include/linux/mfd/max77620.h                  |  5 +-
 4 files changed, 122 insertions(+), 5 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v4 1/6] dt-bindings: mfd: max77620: Add compatible for Maxim 77663
  2019-05-05 15:43 [PATCH v4 0/6] Add support for Maxim 77663 MFD Dmitry Osipenko
@ 2019-05-05 15:43 ` Dmitry Osipenko
  2019-05-08 11:46   ` Lee Jones
  2019-05-05 15:43 ` [PATCH v4 2/6] dt-bindings: mfd: max77620: Add system-power-controller property Dmitry Osipenko
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Dmitry Osipenko @ 2019-05-05 15:43 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter
  Cc: devicetree, linux-tegra, linux-kernel

Maxim 77663 has a few minor differences in regards to hardware interface
and available capabilities by comparing it with 77620 and 20024 models,
hence re-use 77620 device-tree binding for the 77663.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 Documentation/devicetree/bindings/mfd/max77620.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/max77620.txt b/Documentation/devicetree/bindings/mfd/max77620.txt
index 9c16d51cc15b..b75283787ba1 100644
--- a/Documentation/devicetree/bindings/mfd/max77620.txt
+++ b/Documentation/devicetree/bindings/mfd/max77620.txt
@@ -4,7 +4,8 @@ Required properties:
 -------------------
 - compatible: Must be one of
 		"maxim,max77620"
-		"maxim,max20024".
+		"maxim,max20024"
+		"maxim,max77663"
 - reg: I2C device address.
 
 Optional properties:
@@ -105,6 +106,7 @@ Optional properties:
 Here supported time periods by device in microseconds are as follows:
 MAX77620 supports 40, 80, 160, 320, 640, 1280, 2560 and 5120 microseconds.
 MAX20024 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.
+MAX77663 supports 20, 40, 80, 160, 320, 640, 1280 and 2540 microseconds.
 
 -maxim,power-ok-control: configure map power ok bit
 			1: Enables POK(Power OK) to control nRST_IO and GPIO1
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v4 2/6] dt-bindings: mfd: max77620: Add system-power-controller property
  2019-05-05 15:43 [PATCH v4 0/6] Add support for Maxim 77663 MFD Dmitry Osipenko
  2019-05-05 15:43 ` [PATCH v4 1/6] dt-bindings: mfd: max77620: Add compatible for Maxim 77663 Dmitry Osipenko
@ 2019-05-05 15:43 ` Dmitry Osipenko
  2019-05-07 17:46   ` Rob Herring
  2019-05-08 11:46   ` Lee Jones
  2019-05-05 15:43 ` [PATCH v4 3/6] mfd: max77620: Fix swapped FPS_PERIOD_MAX_US values Dmitry Osipenko
                   ` (4 subsequent siblings)
  6 siblings, 2 replies; 16+ messages in thread
From: Dmitry Osipenko @ 2019-05-05 15:43 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter
  Cc: devicetree, linux-tegra, linux-kernel

Document new generic property that designates the PMIC as the system's
power controller.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 Documentation/devicetree/bindings/mfd/max77620.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/max77620.txt b/Documentation/devicetree/bindings/mfd/max77620.txt
index b75283787ba1..5a642a51d58e 100644
--- a/Documentation/devicetree/bindings/mfd/max77620.txt
+++ b/Documentation/devicetree/bindings/mfd/max77620.txt
@@ -18,6 +18,11 @@ Optional properties:
 			IRQ numbers for different interrupt source of MAX77620
 			are defined at dt-bindings/mfd/max77620.h.
 
+- system-power-controller: Indicates that this PMIC is controlling the
+			   system power, see [1] for more details.
+
+[1] Documentation/devicetree/bindings/power/power-controller.txt
+
 Optional subnodes and their properties:
 =======================================
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v4 3/6] mfd: max77620: Fix swapped FPS_PERIOD_MAX_US values
  2019-05-05 15:43 [PATCH v4 0/6] Add support for Maxim 77663 MFD Dmitry Osipenko
  2019-05-05 15:43 ` [PATCH v4 1/6] dt-bindings: mfd: max77620: Add compatible for Maxim 77663 Dmitry Osipenko
  2019-05-05 15:43 ` [PATCH v4 2/6] dt-bindings: mfd: max77620: Add system-power-controller property Dmitry Osipenko
@ 2019-05-05 15:43 ` Dmitry Osipenko
  2019-05-08 11:47   ` Lee Jones
  2019-05-05 15:43 ` [PATCH v4 4/6] mfd: max77620: Support Maxim 77663 Dmitry Osipenko
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Dmitry Osipenko @ 2019-05-05 15:43 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter
  Cc: devicetree, linux-tegra, linux-kernel

The FPS_PERIOD_MAX_US definitions are swapped for MAX20024 and MAX77620,
fix it.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 include/linux/mfd/max77620.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/mfd/max77620.h b/include/linux/mfd/max77620.h
index ad2a9a852aea..b4fd5a7c2aaa 100644
--- a/include/linux/mfd/max77620.h
+++ b/include/linux/mfd/max77620.h
@@ -136,8 +136,8 @@
 #define MAX77620_FPS_PERIOD_MIN_US		40
 #define MAX20024_FPS_PERIOD_MIN_US		20
 
-#define MAX77620_FPS_PERIOD_MAX_US		2560
-#define MAX20024_FPS_PERIOD_MAX_US		5120
+#define MAX20024_FPS_PERIOD_MAX_US		2560
+#define MAX77620_FPS_PERIOD_MAX_US		5120
 
 #define MAX77620_REG_FPS_GPIO1			0x54
 #define MAX77620_REG_FPS_GPIO2			0x55
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v4 4/6] mfd: max77620: Support Maxim 77663
  2019-05-05 15:43 [PATCH v4 0/6] Add support for Maxim 77663 MFD Dmitry Osipenko
                   ` (2 preceding siblings ...)
  2019-05-05 15:43 ` [PATCH v4 3/6] mfd: max77620: Fix swapped FPS_PERIOD_MAX_US values Dmitry Osipenko
@ 2019-05-05 15:43 ` Dmitry Osipenko
  2019-05-08 11:47   ` Lee Jones
  2019-05-05 15:43 ` [PATCH v4 5/6] mfd: max77620: Provide system power-off functionality Dmitry Osipenko
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Dmitry Osipenko @ 2019-05-05 15:43 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter
  Cc: devicetree, linux-tegra, linux-kernel

Add support for Maxim 77663 using the Max77620 driver. The hardware
is very similar to Max77663/20024, although there are couple minor
differences.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/mfd/max77620.c       | 69 +++++++++++++++++++++++++++++++++++-
 include/linux/mfd/max77620.h |  1 +
 2 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c
index d8ddd1a6f304..c2d88a5eca7a 100644
--- a/drivers/mfd/max77620.c
+++ b/drivers/mfd/max77620.c
@@ -111,6 +111,26 @@ static const struct mfd_cell max20024_children[] = {
 	},
 };
 
+static const struct mfd_cell max77663_children[] = {
+	{ .name = "max77620-pinctrl", },
+	{ .name = "max77620-clock", },
+	{ .name = "max77663-pmic", },
+	{ .name = "max77620-watchdog", },
+	{
+		.name = "max77620-gpio",
+		.resources = gpio_resources,
+		.num_resources = ARRAY_SIZE(gpio_resources),
+	}, {
+		.name = "max77620-rtc",
+		.resources = rtc_resources,
+		.num_resources = ARRAY_SIZE(rtc_resources),
+	}, {
+		.name = "max77663-power",
+		.resources = power_resources,
+		.num_resources = ARRAY_SIZE(power_resources),
+	},
+};
+
 static const struct regmap_range max77620_readable_ranges[] = {
 	regmap_reg_range(MAX77620_REG_CNFGGLBL1, MAX77620_REG_DVSSD4),
 };
@@ -171,6 +191,35 @@ static const struct regmap_config max20024_regmap_config = {
 	.volatile_table = &max77620_volatile_table,
 };
 
+static const struct regmap_range max77663_readable_ranges[] = {
+	regmap_reg_range(MAX77620_REG_CNFGGLBL1, MAX77620_REG_CID5),
+};
+
+static const struct regmap_access_table max77663_readable_table = {
+	.yes_ranges = max77663_readable_ranges,
+	.n_yes_ranges = ARRAY_SIZE(max77663_readable_ranges),
+};
+
+static const struct regmap_range max77663_writable_ranges[] = {
+	regmap_reg_range(MAX77620_REG_CNFGGLBL1, MAX77620_REG_CID5),
+};
+
+static const struct regmap_access_table max77663_writable_table = {
+	.yes_ranges = max77663_writable_ranges,
+	.n_yes_ranges = ARRAY_SIZE(max77663_writable_ranges),
+};
+
+static const struct regmap_config max77663_regmap_config = {
+	.name = "power-slave",
+	.reg_bits = 8,
+	.val_bits = 8,
+	.max_register = MAX77620_REG_CID5 + 1,
+	.cache_type = REGCACHE_RBTREE,
+	.rd_table = &max77663_readable_table,
+	.wr_table = &max77663_writable_table,
+	.volatile_table = &max77620_volatile_table,
+};
+
 /*
  * MAX77620 and MAX20024 has the following steps of the interrupt handling
  * for TOP interrupts:
@@ -240,6 +289,9 @@ static int max77620_get_fps_period_reg_value(struct max77620_chip *chip,
 	case MAX77620:
 		fps_min_period = MAX77620_FPS_PERIOD_MIN_US;
 		break;
+	case MAX77663:
+		fps_min_period = MAX20024_FPS_PERIOD_MIN_US;
+		break;
 	default:
 		return -EINVAL;
 	}
@@ -274,6 +326,9 @@ static int max77620_config_fps(struct max77620_chip *chip,
 	case MAX77620:
 		fps_max_period = MAX77620_FPS_PERIOD_MAX_US;
 		break;
+	case MAX77663:
+		fps_max_period = MAX20024_FPS_PERIOD_MAX_US;
+		break;
 	default:
 		return -EINVAL;
 	}
@@ -375,6 +430,9 @@ static int max77620_initialise_fps(struct max77620_chip *chip)
 	}
 
 skip_fps:
+	if (chip->chip_id == MAX77663)
+		return 0;
+
 	/* Enable wake on EN0 pin */
 	ret = regmap_update_bits(chip->rmap, MAX77620_REG_ONOFFCNFG2,
 				 MAX77620_ONOFFCNFG2_WK_EN0,
@@ -453,6 +511,11 @@ static int max77620_probe(struct i2c_client *client,
 		n_mfd_cells = ARRAY_SIZE(max20024_children);
 		rmap_config = &max20024_regmap_config;
 		break;
+	case MAX77663:
+		mfd_cells = max77663_children;
+		n_mfd_cells = ARRAY_SIZE(max77663_children);
+		rmap_config = &max77663_regmap_config;
+		break;
 	default:
 		dev_err(chip->dev, "ChipID is invalid %d\n", chip->chip_id);
 		return -EINVAL;
@@ -546,6 +609,9 @@ static int max77620_i2c_suspend(struct device *dev)
 		return ret;
 	}
 
+	if (chip->chip_id == MAX77663)
+		goto out;
+
 	/* Disable WK_EN0 */
 	ret = regmap_update_bits(chip->rmap, MAX77620_REG_ONOFFCNFG2,
 				 MAX77620_ONOFFCNFG2_WK_EN0, 0);
@@ -581,7 +647,7 @@ static int max77620_i2c_resume(struct device *dev)
 	 * For MAX20024: No need to configure WKEN0 on resume as
 	 * it is configured on Init.
 	 */
-	if (chip->chip_id == MAX20024)
+	if (chip->chip_id == MAX20024 || chip->chip_id == MAX77663)
 		goto out;
 
 	/* Enable WK_EN0 */
@@ -603,6 +669,7 @@ static int max77620_i2c_resume(struct device *dev)
 static const struct i2c_device_id max77620_id[] = {
 	{"max77620", MAX77620},
 	{"max20024", MAX20024},
+	{"max77663", MAX77663},
 	{},
 };
 
diff --git a/include/linux/mfd/max77620.h b/include/linux/mfd/max77620.h
index b4fd5a7c2aaa..82407fe85ca2 100644
--- a/include/linux/mfd/max77620.h
+++ b/include/linux/mfd/max77620.h
@@ -324,6 +324,7 @@ enum max77620_fps_src {
 enum max77620_chip_id {
 	MAX77620,
 	MAX20024,
+	MAX77663,
 };
 
 struct max77620_chip {
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v4 5/6] mfd: max77620: Provide system power-off functionality
  2019-05-05 15:43 [PATCH v4 0/6] Add support for Maxim 77663 MFD Dmitry Osipenko
                   ` (3 preceding siblings ...)
  2019-05-05 15:43 ` [PATCH v4 4/6] mfd: max77620: Support Maxim 77663 Dmitry Osipenko
@ 2019-05-05 15:43 ` Dmitry Osipenko
  2019-05-08 11:48   ` Lee Jones
  2019-05-05 15:43 ` [PATCH v4 6/6] regulator: max77620: Support Maxim 77663 Dmitry Osipenko
  2019-05-08 11:51 ` [GIT PULL] Immutable branch between MFD and Regulator due for the v5.2 merge window Lee Jones
  6 siblings, 1 reply; 16+ messages in thread
From: Dmitry Osipenko @ 2019-05-05 15:43 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter
  Cc: devicetree, linux-tegra, linux-kernel

Provide system power-off functionality that allows to turn off machine
gracefully.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/mfd/max77620.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c
index c2d88a5eca7a..436361ce3737 100644
--- a/drivers/mfd/max77620.c
+++ b/drivers/mfd/max77620.c
@@ -37,6 +37,8 @@
 #include <linux/regmap.h>
 #include <linux/slab.h>
 
+static struct max77620_chip *max77620_scratch;
+
 static const struct resource gpio_resources[] = {
 	DEFINE_RES_IRQ(MAX77620_IRQ_TOP_GPIO),
 };
@@ -481,6 +483,15 @@ static int max77620_read_es_version(struct max77620_chip *chip)
 	return ret;
 }
 
+static void max77620_pm_power_off(void)
+{
+	struct max77620_chip *chip = max77620_scratch;
+
+	regmap_update_bits(chip->rmap, MAX77620_REG_ONOFFCNFG1,
+			   MAX77620_ONOFFCNFG1_SFT_RST,
+			   MAX77620_ONOFFCNFG1_SFT_RST);
+}
+
 static int max77620_probe(struct i2c_client *client,
 			  const struct i2c_device_id *id)
 {
@@ -488,6 +499,7 @@ static int max77620_probe(struct i2c_client *client,
 	struct max77620_chip *chip;
 	const struct mfd_cell *mfd_cells;
 	int n_mfd_cells;
+	bool pm_off;
 	int ret;
 
 	chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
@@ -554,6 +566,12 @@ static int max77620_probe(struct i2c_client *client,
 		return ret;
 	}
 
+	pm_off = of_device_is_system_power_controller(client->dev.of_node);
+	if (pm_off && !pm_power_off) {
+		max77620_scratch = chip;
+		pm_power_off = max77620_pm_power_off;
+	}
+
 	return 0;
 }
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v4 6/6] regulator: max77620: Support Maxim 77663
  2019-05-05 15:43 [PATCH v4 0/6] Add support for Maxim 77663 MFD Dmitry Osipenko
                   ` (4 preceding siblings ...)
  2019-05-05 15:43 ` [PATCH v4 5/6] mfd: max77620: Provide system power-off functionality Dmitry Osipenko
@ 2019-05-05 15:43 ` Dmitry Osipenko
  2019-05-12 14:08   ` Dmitry Osipenko
  2019-05-08 11:51 ` [GIT PULL] Immutable branch between MFD and Regulator due for the v5.2 merge window Lee Jones
  6 siblings, 1 reply; 16+ messages in thread
From: Dmitry Osipenko @ 2019-05-05 15:43 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter
  Cc: devicetree, linux-tegra, linux-kernel

Add support for Maxim 77663.

Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/regulator/max77620-regulator.c | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/max77620-regulator.c b/drivers/regulator/max77620-regulator.c
index 0ad91a7f9cb9..0ec9f81fe74a 100644
--- a/drivers/regulator/max77620-regulator.c
+++ b/drivers/regulator/max77620-regulator.c
@@ -761,6 +761,24 @@ static struct max77620_regulator_info max20024_regs_info[MAX77620_NUM_REGS] = {
 	RAIL_LDO(LDO8, ldo8, "in-ldo7-8", N, 800000, 3950000, 50000),
 };
 
+static struct max77620_regulator_info max77663_regs_info[MAX77620_NUM_REGS] = {
+	RAIL_SD(SD0, sd0, "in-sd0", SD0, 600000, 3387500, 12500, 0xFF, NONE),
+	RAIL_SD(SD1, sd1, "in-sd1", SD1, 800000, 1587500, 12500, 0xFF, NONE),
+	RAIL_SD(SD2, sd2, "in-sd2", SDX, 600000, 3787500, 12500, 0xFF, NONE),
+	RAIL_SD(SD3, sd3, "in-sd3", SDX, 600000, 3787500, 12500, 0xFF, NONE),
+	RAIL_SD(SD4, sd4, "in-sd4", SDX, 600000, 3787500, 12500, 0xFF, NONE),
+
+	RAIL_LDO(LDO0, ldo0, "in-ldo0-1", N, 800000, 2375000, 25000),
+	RAIL_LDO(LDO1, ldo1, "in-ldo0-1", N, 800000, 2375000, 25000),
+	RAIL_LDO(LDO2, ldo2, "in-ldo2",   P, 800000, 3950000, 50000),
+	RAIL_LDO(LDO3, ldo3, "in-ldo3-5", P, 800000, 3950000, 50000),
+	RAIL_LDO(LDO4, ldo4, "in-ldo4-6", P, 800000, 1587500, 12500),
+	RAIL_LDO(LDO5, ldo5, "in-ldo3-5", P, 800000, 3950000, 50000),
+	RAIL_LDO(LDO6, ldo6, "in-ldo4-6", P, 800000, 3950000, 50000),
+	RAIL_LDO(LDO7, ldo7, "in-ldo7-8", N, 800000, 3950000, 50000),
+	RAIL_LDO(LDO8, ldo8, "in-ldo7-8", N, 800000, 3950000, 50000),
+};
+
 static int max77620_regulator_probe(struct platform_device *pdev)
 {
 	struct max77620_chip *max77620_chip = dev_get_drvdata(pdev->dev.parent);
@@ -785,9 +803,14 @@ static int max77620_regulator_probe(struct platform_device *pdev)
 	case MAX77620:
 		rinfo = max77620_regs_info;
 		break;
-	default:
+	case MAX20024:
 		rinfo = max20024_regs_info;
 		break;
+	case MAX77663:
+		rinfo = max77663_regs_info;
+		break;
+	default:
+		return -EINVAL;
 	}
 
 	config.regmap = pmic->rmap;
@@ -881,6 +904,7 @@ static const struct dev_pm_ops max77620_regulator_pm_ops = {
 static const struct platform_device_id max77620_regulator_devtype[] = {
 	{ .name = "max77620-pmic", },
 	{ .name = "max20024-pmic", },
+	{ .name = "max77663-pmic", },
 	{},
 };
 MODULE_DEVICE_TABLE(platform, max77620_regulator_devtype);
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 2/6] dt-bindings: mfd: max77620: Add system-power-controller property
  2019-05-05 15:43 ` [PATCH v4 2/6] dt-bindings: mfd: max77620: Add system-power-controller property Dmitry Osipenko
@ 2019-05-07 17:46   ` Rob Herring
  2019-05-08 11:46   ` Lee Jones
  1 sibling, 0 replies; 16+ messages in thread
From: Rob Herring @ 2019-05-07 17:46 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Lee Jones, Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

On Sun,  5 May 2019 18:43:21 +0300, Dmitry Osipenko wrote:
> Document new generic property that designates the PMIC as the system's
> power controller.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  Documentation/devicetree/bindings/mfd/max77620.txt | 5 +++++
>  1 file changed, 5 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 1/6] dt-bindings: mfd: max77620: Add compatible for Maxim 77663
  2019-05-05 15:43 ` [PATCH v4 1/6] dt-bindings: mfd: max77620: Add compatible for Maxim 77663 Dmitry Osipenko
@ 2019-05-08 11:46   ` Lee Jones
  0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2019-05-08 11:46 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

On Sun, 05 May 2019, Dmitry Osipenko wrote:

> Maxim 77663 has a few minor differences in regards to hardware interface
> and available capabilities by comparing it with 77620 and 20024 models,
> hence re-use 77620 device-tree binding for the 77663.
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 2/6] dt-bindings: mfd: max77620: Add system-power-controller property
  2019-05-05 15:43 ` [PATCH v4 2/6] dt-bindings: mfd: max77620: Add system-power-controller property Dmitry Osipenko
  2019-05-07 17:46   ` Rob Herring
@ 2019-05-08 11:46   ` Lee Jones
  1 sibling, 0 replies; 16+ messages in thread
From: Lee Jones @ 2019-05-08 11:46 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

On Sun, 05 May 2019, Dmitry Osipenko wrote:

> Document new generic property that designates the PMIC as the system's
> power controller.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 3/6] mfd: max77620: Fix swapped FPS_PERIOD_MAX_US values
  2019-05-05 15:43 ` [PATCH v4 3/6] mfd: max77620: Fix swapped FPS_PERIOD_MAX_US values Dmitry Osipenko
@ 2019-05-08 11:47   ` Lee Jones
  0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2019-05-08 11:47 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

On Sun, 05 May 2019, Dmitry Osipenko wrote:

> The FPS_PERIOD_MAX_US definitions are swapped for MAX20024 and MAX77620,
> fix it.
> 
> Cc: stable <stable@vger.kernel.org>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  include/linux/mfd/max77620.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 4/6] mfd: max77620: Support Maxim 77663
  2019-05-05 15:43 ` [PATCH v4 4/6] mfd: max77620: Support Maxim 77663 Dmitry Osipenko
@ 2019-05-08 11:47   ` Lee Jones
  0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2019-05-08 11:47 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

On Sun, 05 May 2019, Dmitry Osipenko wrote:

> Add support for Maxim 77663 using the Max77620 driver. The hardware
> is very similar to Max77663/20024, although there are couple minor
> differences.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/mfd/max77620.c       | 69 +++++++++++++++++++++++++++++++++++-
>  include/linux/mfd/max77620.h |  1 +
>  2 files changed, 69 insertions(+), 1 deletion(-)

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 5/6] mfd: max77620: Provide system power-off functionality
  2019-05-05 15:43 ` [PATCH v4 5/6] mfd: max77620: Provide system power-off functionality Dmitry Osipenko
@ 2019-05-08 11:48   ` Lee Jones
  0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2019-05-08 11:48 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

On Sun, 05 May 2019, Dmitry Osipenko wrote:

> Provide system power-off functionality that allows to turn off machine
> gracefully.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/mfd/max77620.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [GIT PULL] Immutable branch between MFD and Regulator due for the v5.2 merge window
  2019-05-05 15:43 [PATCH v4 0/6] Add support for Maxim 77663 MFD Dmitry Osipenko
                   ` (5 preceding siblings ...)
  2019-05-05 15:43 ` [PATCH v4 6/6] regulator: max77620: Support Maxim 77663 Dmitry Osipenko
@ 2019-05-08 11:51 ` Lee Jones
  6 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2019-05-08 11:51 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Rob Herring, Mark Rutland, Liam Girdwood, Mark Brown,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

Enjoy!

The following changes since commit e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd:

  Linux 5.1 (2019-05-05 17:42:58 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-regulator-v5.2

for you to fetch changes up to 744b13107d0d2ec36c5293d7b59129d3186c9396:

  mfd: max77620: Provide system power-off functionality (2019-05-08 12:50:14 +0100)

----------------------------------------------------------------
Immutable branch between MFD and Regulator due for the v5.2 merge window

----------------------------------------------------------------
Dmitry Osipenko (5):
      dt-bindings: mfd: max77620: Add compatible for Maxim 77663
      dt-bindings: mfd: max77620: Add system-power-controller property
      mfd: max77620: Fix swapped FPS_PERIOD_MAX_US values
      mfd: max77620: Support Maxim 77663
      mfd: max77620: Provide system power-off functionality

 Documentation/devicetree/bindings/mfd/max77620.txt |  9 ++-
 drivers/mfd/max77620.c                             | 87 +++++++++++++++++++++-
 include/linux/mfd/max77620.h                       |  5 +-
 3 files changed, 97 insertions(+), 4 deletions(-)
 
-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 6/6] regulator: max77620: Support Maxim 77663
  2019-05-05 15:43 ` [PATCH v4 6/6] regulator: max77620: Support Maxim 77663 Dmitry Osipenko
@ 2019-05-12 14:08   ` Dmitry Osipenko
  2019-05-12 17:07     ` Mark Brown
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Osipenko @ 2019-05-12 14:08 UTC (permalink / raw)
  To: Mark Brown
  Cc: Lee Jones, Rob Herring, Mark Rutland, Liam Girdwood,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

05.05.2019 18:43, Dmitry Osipenko пишет:
> Add support for Maxim 77663.
> 
> Acked-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---

Hello Mark,

Just want to get yours attention to that Lee picked up the patches into
the MFD tree, excluding this patch. I assume this one will have to go
via the regulator's tree.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v4 6/6] regulator: max77620: Support Maxim 77663
  2019-05-12 14:08   ` Dmitry Osipenko
@ 2019-05-12 17:07     ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2019-05-12 17:07 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Lee Jones, Rob Herring, Mark Rutland, Liam Girdwood,
	Laxman Dewangan, Mallikarjun Kasoju, Thierry Reding,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

On Sun, May 12, 2019 at 05:08:15PM +0300, Dmitry Osipenko wrote:

> Just want to get yours attention to that Lee picked up the patches into
> the MFD tree, excluding this patch. I assume this one will have to go
> via the regulator's tree.

Please don't send content free pings and please allow a reasonable time
for review.  People get busy, go on holiday, attend conferences and so 
on so unless there is some reason for urgency (like critical bug fixes)
please allow at least a couple of weeks for review.  If there have been
review comments then people may be waiting for those to be addressed.

Sending content free pings adds to the mail volume (if they are seen at
all) which is often the problem and since they can't be reviewed
directly if something has gone wrong you'll have to resend the patches
anyway, so sending again is generally a better approach though there are
some other maintainers who like them - if in doubt look at how patches
for the subsystem are normally handled.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-05-12 17:07 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-05 15:43 [PATCH v4 0/6] Add support for Maxim 77663 MFD Dmitry Osipenko
2019-05-05 15:43 ` [PATCH v4 1/6] dt-bindings: mfd: max77620: Add compatible for Maxim 77663 Dmitry Osipenko
2019-05-08 11:46   ` Lee Jones
2019-05-05 15:43 ` [PATCH v4 2/6] dt-bindings: mfd: max77620: Add system-power-controller property Dmitry Osipenko
2019-05-07 17:46   ` Rob Herring
2019-05-08 11:46   ` Lee Jones
2019-05-05 15:43 ` [PATCH v4 3/6] mfd: max77620: Fix swapped FPS_PERIOD_MAX_US values Dmitry Osipenko
2019-05-08 11:47   ` Lee Jones
2019-05-05 15:43 ` [PATCH v4 4/6] mfd: max77620: Support Maxim 77663 Dmitry Osipenko
2019-05-08 11:47   ` Lee Jones
2019-05-05 15:43 ` [PATCH v4 5/6] mfd: max77620: Provide system power-off functionality Dmitry Osipenko
2019-05-08 11:48   ` Lee Jones
2019-05-05 15:43 ` [PATCH v4 6/6] regulator: max77620: Support Maxim 77663 Dmitry Osipenko
2019-05-12 14:08   ` Dmitry Osipenko
2019-05-12 17:07     ` Mark Brown
2019-05-08 11:51 ` [GIT PULL] Immutable branch between MFD and Regulator due for the v5.2 merge window Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).