Skip to contentSkip to conversation

mfd: RK8xx tidyup

PATCH Applied Robin Murphy 4 participants 18 messages Jan 12, 2020 – Apr 27, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover mfd: RK8xx tidyup

Hi all,

Here's a second crack at my RK805-inspired cleanup. There was a bit of debate around v1[1], but it seems like we're now all happy that this is a reasonable way to go. For clarity I decided to include Soeren's patch as #1/5, but since I've rewritten most of my patches I've not included the tested-by tags.

Robin.

[1] https://lore.kernel.org/lkml/[email protected]/

Robin Murphy (4):
mfd: rk808: Ensure suspend/resume hooks always work
mfd: rk808: Stop using syscore ops
mfd: rk808: Reduce shutdown duplication
mfd: rk808: Convert RK805 to shutdown/suspend hooks

Soeren Moch (1):
mfd: rk808: Always use poweroff when requested

 drivers/mfd/rk808.c       | 139 +++++++++++++-------------------------
 include/linux/mfd/rk808.h |   2 -
 2 files changed, 48 insertions(+), 93 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/5 mfd: rk808: Always use poweroff when requested

From: Soeren Moch <[email protected]>

With the device tree property "rockchip,system-power-controller" we explicitly request to use this PMIC to power off the system. So always register our poweroff function, even if some other handler (probably PSCI poweroff) was registered before.

This does tend to reveal a warning on shutdown due to the Rockchip I2C driver not implementing an atomic transfer method, however since the write to DEV_OFF takes effect immediately the I2C completion interrupt is moot anyway, and as the very last thing written to the console it is only visible to users going out of their way to capture serial output.

[ rm: note potential warning in commit message ]
---
 drivers/mfd/rk808.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/mfd/rk808.c +2 -9
index a69a6742ecdc..616e44e7ef98 100644
@@ -550,7 +550,7 @@ static int rk808_probe(struct i2c_client *client,
 	const struct mfd_cell *cells;
 	int nr_pre_init_regs;
 	int nr_cells;
-	int pm_off = 0, msb, lsb;
+	int msb, lsb;
 	unsigned char pmic_id_msb, pmic_id_lsb;
 	int ret;
 	int i;
@@ -674,16 +674,9 @@ static int rk808_probe(struct i2c_client *client,
 		goto err_irq;
 	}
 
-	pm_off = of_property_read_bool(np,
-				"rockchip,system-power-controller");
-	if (pm_off && !pm_power_off) {
+	if (of_property_read_bool(np, "rockchip,system-power-controller")) {
 		rk808_i2c_client = client;
 		pm_power_off = rk808->pm_pwroff_fn;
-	}
-
-	if (pm_off && !pm_power_off_prepare) {
-		if (!rk808_i2c_client)
-			rk808_i2c_client = client;
 		pm_power_off_prepare = rk808->pm_pwroff_prep_fn;
 	}
 
Signature · 1 line
2.17.1
Applied
#2 lore raw

Re: [PATCH v2 1/5] mfd: rk808: Always use poweroff when requested

Quoted 13 lines · Robin Murphy

From: Soeren Moch <[email protected]>

With the device tree property "rockchip,system-power-controller" we explicitly request to use this PMIC to power off the system. So always register our poweroff function, even if some other handler (probably PSCI poweroff) was registered before.

This does tend to reveal a warning on shutdown due to the Rockchip I2C driver not implementing an atomic transfer method, however since the write to DEV_OFF takes effect immediately the I2C completion interrupt is moot anyway, and as the very last thing written to the console it is only visible to users going out of their way to capture serial output.

Quoted 7 lines
[ rm: note potential warning in commit message ]
---
 drivers/mfd/rk808.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw

PATCH v2 2/5 mfd: rk808: Ensure suspend/resume hooks always work

In reply to Robin Murphy

The RK809/RK817 suspend/resume hooks should not have to depend on whether this driver owns the pm_power_off hook, and thus the global rk808_i2c_client is set - indeed, the GPIO-based control is really only relevant when PSCI firmware is in charge of power rather than the kernel. As driver model callbacks, they have an appropriate device argument to hand, so can just always use that.

---
 drivers/mfd/rk808.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/rk808.c +2 -2
index 616e44e7ef98..ac798053c26a 100644
@@ -712,7 +712,7 @@ static int rk808_remove(struct i2c_client *client)
 
 static int __maybe_unused rk8xx_suspend(struct device *dev)
 {
-	struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
+	struct rk808 *rk808 = i2c_get_clientdata(to_i2c_client(dev));
 	int ret = 0;
 
 	switch (rk808->variant) {
@@ -732,7 +732,7 @@ static int __maybe_unused rk8xx_suspend(struct device *dev)
 
 static int __maybe_unused rk8xx_resume(struct device *dev)
 {
-	struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
+	struct rk808 *rk808 = i2c_get_clientdata(to_i2c_client(dev));
 	int ret = 0;
 
 	switch (rk808->variant) {
Signature · 1 line
2.17.1
Applied
#4 lore raw

Re: [PATCH v2 2/5] mfd: rk808: Ensure suspend/resume hooks always work

Quoted 11 lines · Robin Murphy

The RK809/RK817 suspend/resume hooks should not have to depend on whether this driver owns the pm_power_off hook, and thus the global rk808_i2c_client is set - indeed, the GPIO-based control is really only relevant when PSCI firmware is in charge of power rather than the kernel. As driver model callbacks, they have an appropriate device argument to hand, so can just always use that.

---
 drivers/mfd/rk808.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#5 lore raw

PATCH v2 3/5 mfd: rk808: Stop using syscore ops

In reply to Robin Murphy

Setting the SLEEP pin to its shutdown function for appropriate PMICs doesn't need to happen in single-CPU context, so there's really no point involving the syscore machinery. Hook it up to the standard driver model shutdown method instead. This also obviates the issue that the syscore ops weren't being unregistered on probe failure or module removal.

---
 drivers/mfd/rk808.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)
drivers/mfd/rk808.c +12 -14
index ac798053c26a..8116ed6cf2e7 100644
@@ -19,7 +19,6 @@
 #include <linux/module.h>
 #include <linux/of_device.h>
 #include <linux/regmap.h>
-#include <linux/syscore_ops.h>
 
 struct rk808_reg_data {
 	int addr;
@@ -509,28 +508,27 @@ static void rk818_device_shutdown(void)
 		dev_err(&rk808_i2c_client->dev, "Failed to shutdown device!\n");
 }
 
-static void rk8xx_syscore_shutdown(void)
+static void rk8xx_shutdown(struct i2c_client *client)
 {
-	struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
+	struct rk808 *rk808 = i2c_get_clientdata(client);
 	int ret;
 
-	if (system_state == SYSTEM_POWER_OFF &&
-	    (rk808->variant == RK809_ID || rk808->variant == RK817_ID)) {
+	switch (rk808->variant) {
+	case RK809_ID:
+	case RK817_ID:
 		ret = regmap_update_bits(rk808->regmap,
 					 RK817_SYS_CFG(3),
 					 RK817_SLPPIN_FUNC_MSK,
 					 SLPPIN_DN_FUN);
-		if (ret) {
-			dev_warn(&rk808_i2c_client->dev,
-				 "Cannot switch to power down function\n");
-		}
+		break;
+	default:
+		return;
 	}
+	if (ret)
+		dev_warn(&client->dev,
+			 "Cannot switch to power down function\n");
 }
 
-static struct syscore_ops rk808_syscore_ops = {
-	.shutdown = rk8xx_syscore_shutdown,
-};
-
 static const struct of_device_id rk808_of_match[] = {
 	{ .compatible = "rockchip,rk805" },
 	{ .compatible = "rockchip,rk808" },
@@ -623,7 +621,6 @@ static int rk808_probe(struct i2c_client *client,
 		nr_pre_init_regs = ARRAY_SIZE(rk817_pre_init_reg);
 		cells = rk817s;
 		nr_cells = ARRAY_SIZE(rk817s);
-		register_syscore_ops(&rk808_syscore_ops);
 		break;
 	default:
 		dev_err(&client->dev, "Unsupported RK8XX ID %lu\n",
@@ -759,6 +756,7 @@ static struct i2c_driver rk808_i2c_driver = {
 	},
 	.probe    = rk808_probe,
 	.remove   = rk808_remove,
+	.shutdown = rk8xx_shutdown,
 };
 
 module_i2c_driver(rk808_i2c_driver);
Signature · 1 line
2.17.1
#6 lore raw

Re: [PATCH v2 3/5] mfd: rk808: Stop using syscore ops

Quoted 10 lines · Robin Murphy

Setting the SLEEP pin to its shutdown function for appropriate PMICs doesn't need to happen in single-CPU context, so there's really no point involving the syscore machinery. Hook it up to the standard driver model shutdown method instead. This also obviates the issue that the syscore ops weren't being unregistered on probe failure or module removal.

---
 drivers/mfd/rk808.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

Going to ignore the unrelated change in this one!

(reviewing the remainder before responding)

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Applied
#7 lore raw

Re: [PATCH v2 3/5] mfd: rk808: Stop using syscore ops

In reply to Robin Murphy
Quoted 10 lines · Robin Murphy

Setting the SLEEP pin to its shutdown function for appropriate PMICs doesn't need to happen in single-CPU context, so there's really no point involving the syscore machinery. Hook it up to the standard driver model shutdown method instead. This also obviates the issue that the syscore ops weren't being unregistered on probe failure or module removal.

---
 drivers/mfd/rk808.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#8 lore raw

PATCH v2 4/5 mfd: rk808: Reduce shutdown duplication

In reply to Robin Murphy

Rather than having 3 almost-identical functions plus the machinery to keep track of them, it's far simpler to just dynamically select the appropriate register field per variant.

---
 drivers/mfd/rk808.c       | 61 +++++++++++++--------------------------
 include/linux/mfd/rk808.h |  1 -
 2 files changed, 20 insertions(+), 42 deletions(-)
drivers/mfd/rk808.c +20 -41
index 8116ed6cf2e7..b2265c6e94ae 100644
@@ -448,21 +448,6 @@ static const struct regmap_irq_chip rk818_irq_chip = {
 
 static struct i2c_client *rk808_i2c_client;
 
-static void rk805_device_shutdown(void)
-{
-	int ret;
-	struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
-
-	if (!rk808)
-		return;
-
-	ret = regmap_update_bits(rk808->regmap,
-				 RK805_DEV_CTRL_REG,
-				 DEV_OFF, DEV_OFF);
-	if (ret)
-		dev_err(&rk808_i2c_client->dev, "Failed to shutdown device!\n");
-}
-
 static void rk805_device_shutdown_prepare(void)
 {
 	int ret;
@@ -478,32 +463,29 @@ static void rk805_device_shutdown_prepare(void)
 		dev_err(&rk808_i2c_client->dev, "Failed to shutdown device!\n");
 }
 
-static void rk808_device_shutdown(void)
+static void rk808_pm_power_off(void)
 {
 	int ret;
+	unsigned int reg, bit;
 	struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
 
-	if (!rk808)
+	switch (rk808->variant) {
+	case RK805_ID:
+		reg = RK805_DEV_CTRL_REG;
+		bit = DEV_OFF;
+		break;
+	case RK808_ID:
+		reg = RK808_DEVCTRL_REG,
+		bit = DEV_OFF_RST;
+		break;
+	case RK818_ID:
+		reg = RK818_DEVCTRL_REG;
+		bit = DEV_OFF;
+		break;
+	default:
 		return;
-
-	ret = regmap_update_bits(rk808->regmap,
-				 RK808_DEVCTRL_REG,
-				 DEV_OFF_RST, DEV_OFF_RST);
-	if (ret)
-		dev_err(&rk808_i2c_client->dev, "Failed to shutdown device!\n");
-}
-
-static void rk818_device_shutdown(void)
-{
-	int ret;
-	struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
-
-	if (!rk808)
-		return;
-
-	ret = regmap_update_bits(rk808->regmap,
-				 RK818_DEVCTRL_REG,
-				 DEV_OFF, DEV_OFF);
+	}
+	ret = regmap_update_bits(rk808->regmap, reg, bit, bit);
 	if (ret)
 		dev_err(&rk808_i2c_client->dev, "Failed to shutdown device!\n");
 }
@@ -592,7 +574,6 @@ static int rk808_probe(struct i2c_client *client,
 		nr_pre_init_regs = ARRAY_SIZE(rk805_pre_init_reg);
 		cells = rk805s;
 		nr_cells = ARRAY_SIZE(rk805s);
-		rk808->pm_pwroff_fn = rk805_device_shutdown;
 		rk808->pm_pwroff_prep_fn = rk805_device_shutdown_prepare;
 		break;
 	case RK808_ID:
@@ -602,7 +583,6 @@ static int rk808_probe(struct i2c_client *client,
 		nr_pre_init_regs = ARRAY_SIZE(rk808_pre_init_reg);
 		cells = rk808s;
 		nr_cells = ARRAY_SIZE(rk808s);
-		rk808->pm_pwroff_fn = rk808_device_shutdown;
 		break;
 	case RK818_ID:
 		rk808->regmap_cfg = &rk818_regmap_config;
@@ -611,7 +591,6 @@ static int rk808_probe(struct i2c_client *client,
 		nr_pre_init_regs = ARRAY_SIZE(rk818_pre_init_reg);
 		cells = rk818s;
 		nr_cells = ARRAY_SIZE(rk818s);
-		rk808->pm_pwroff_fn = rk818_device_shutdown;
 		break;
 	case RK809_ID:
 	case RK817_ID:
@@ -673,7 +652,7 @@ static int rk808_probe(struct i2c_client *client,
 
 	if (of_property_read_bool(np, "rockchip,system-power-controller")) {
 		rk808_i2c_client = client;
-		pm_power_off = rk808->pm_pwroff_fn;
+		pm_power_off = rk808_pm_power_off;
 		pm_power_off_prepare = rk808->pm_pwroff_prep_fn;
 	}
 
@@ -694,7 +673,7 @@ static int rk808_remove(struct i2c_client *client)
 	 * pm_power_off may points to a function from another module.
 	 * Check if the pointer is set by us and only then overwrite it.
 	 */
-	if (rk808->pm_pwroff_fn && pm_power_off == rk808->pm_pwroff_fn)
+	if (pm_power_off == rk808_pm_power_off)
 		pm_power_off = NULL;
 
 	/**
include/linux/mfd/rk808.h +0 -1
index a59bf323f713..b038653fa87e 100644
@@ -620,7 +620,6 @@ struct rk808 {
 	long				variant;
 	const struct regmap_config	*regmap_cfg;
 	const struct regmap_irq_chip	*regmap_irq_chip;
-	void				(*pm_pwroff_fn)(void);
 	void				(*pm_pwroff_prep_fn)(void);
 };
 #endif /* __LINUX_REGULATOR_RK808_H */
Signature · 1 line
2.17.1
Applied
#9 lore raw

Re: [PATCH v2 4/5] mfd: rk808: Reduce shutdown duplication

Quoted 9 lines · Robin Murphy

Rather than having 3 almost-identical functions plus the machinery to keep track of them, it's far simpler to just dynamically select the appropriate register field per variant.

---
 drivers/mfd/rk808.c       | 61 +++++++++++++--------------------------
 include/linux/mfd/rk808.h |  1 -
 2 files changed, 20 insertions(+), 42 deletions(-)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#10 lore raw

PATCH v2 5/5 mfd: rk808: Convert RK805 to shutdown/suspend hooks

In reply to Robin Murphy

RK805 has the same kind of dual-role sleep/shutdown pin as RK809/RK817, so it makes little sense for the driver to have to have two completely different mechanisms to handle essentially the same thing. Move RK805 over to the shutdown/suspend flow to clean things up.

---
 drivers/mfd/rk808.c       | 37 ++++++++++++-------------------------
 include/linux/mfd/rk808.h |  1 -
 2 files changed, 12 insertions(+), 26 deletions(-)
drivers/mfd/rk808.c +12 -25
index b2265c6e94ae..d109b9f14407 100644
@@ -185,7 +185,6 @@ static const struct rk808_reg_data rk805_pre_init_reg[] = {
 	{RK805_BUCK4_CONFIG_REG, RK805_BUCK3_4_ILMAX_MASK,
 				 RK805_BUCK4_ILMAX_3500MA},
 	{RK805_BUCK4_CONFIG_REG, BUCK_ILMIN_MASK, BUCK_ILMIN_400MA},
-	{RK805_GPIO_IO_POL_REG, SLP_SD_MSK, SLEEP_FUN},
 	{RK805_THERMAL_REG, TEMP_HOTDIE_MSK, TEMP115C},
 };
 
@@ -448,21 +447,6 @@ static const struct regmap_irq_chip rk818_irq_chip = {
 
 static struct i2c_client *rk808_i2c_client;
 
-static void rk805_device_shutdown_prepare(void)
-{
-	int ret;
-	struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
-
-	if (!rk808)
-		return;
-
-	ret = regmap_update_bits(rk808->regmap,
-				 RK805_GPIO_IO_POL_REG,
-				 SLP_SD_MSK, SHUTDOWN_FUN);
-	if (ret)
-		dev_err(&rk808_i2c_client->dev, "Failed to shutdown device!\n");
-}
-
 static void rk808_pm_power_off(void)
 {
 	int ret;
@@ -496,6 +480,12 @@ static void rk8xx_shutdown(struct i2c_client *client)
 	int ret;
 
 	switch (rk808->variant) {
+	case RK805_ID:
+		ret = regmap_update_bits(rk808->regmap,
+					 RK805_GPIO_IO_POL_REG,
+					 SLP_SD_MSK,
+					 SHUTDOWN_FUN);
+		break;
 	case RK809_ID:
 	case RK817_ID:
 		ret = regmap_update_bits(rk808->regmap,
@@ -574,7 +564,6 @@ static int rk808_probe(struct i2c_client *client,
 		nr_pre_init_regs = ARRAY_SIZE(rk805_pre_init_reg);
 		cells = rk805s;
 		nr_cells = ARRAY_SIZE(rk805s);
-		rk808->pm_pwroff_prep_fn = rk805_device_shutdown_prepare;
 		break;
 	case RK808_ID:
 		rk808->regmap_cfg = &rk808_regmap_config;
@@ -653,7 +642,6 @@ static int rk808_probe(struct i2c_client *client,
 	if (of_property_read_bool(np, "rockchip,system-power-controller")) {
 		rk808_i2c_client = client;
 		pm_power_off = rk808_pm_power_off;
-		pm_power_off_prepare = rk808->pm_pwroff_prep_fn;
 	}
 
 	return 0;
@@ -676,13 +664,6 @@ static int rk808_remove(struct i2c_client *client)
 	if (pm_power_off == rk808_pm_power_off)
 		pm_power_off = NULL;
 
-	/**
-	 * As above, check if the pointer is set by us before overwrite.
-	 */
-	if (rk808->pm_pwroff_prep_fn &&
-	    pm_power_off_prepare == rk808->pm_pwroff_prep_fn)
-		pm_power_off_prepare = NULL;
-
 	return 0;
 }
 
@@ -692,6 +673,12 @@ static int __maybe_unused rk8xx_suspend(struct device *dev)
 	int ret = 0;
 
 	switch (rk808->variant) {
+	case RK805_ID:
+		ret = regmap_update_bits(rk808->regmap,
+					 RK805_GPIO_IO_POL_REG,
+					 SLP_SD_MSK,
+					 SLEEP_FUN);
+		break;
 	case RK809_ID:
 	case RK817_ID:
 		ret = regmap_update_bits(rk808->regmap,
include/linux/mfd/rk808.h +0 -1
index b038653fa87e..e07f6e61cd38 100644
@@ -620,6 +620,5 @@ struct rk808 {
 	long				variant;
 	const struct regmap_config	*regmap_cfg;
 	const struct regmap_irq_chip	*regmap_irq_chip;
-	void				(*pm_pwroff_prep_fn)(void);
 };
 #endif /* __LINUX_REGULATOR_RK808_H */
Signature · 1 line
2.17.1
Applied
#11 lore raw

Re: [PATCH v2 5/5] mfd: rk808: Convert RK805 to shutdown/suspend hooks

Quoted 10 lines · Robin Murphy

RK805 has the same kind of dual-role sleep/shutdown pin as RK809/RK817, so it makes little sense for the driver to have to have two completely different mechanisms to handle essentially the same thing. Move RK805 over to the shutdown/suspend flow to clean things up.

---
 drivers/mfd/rk808.c       | 37 ++++++++++++-------------------------
 include/linux/mfd/rk808.h |  1 -
 2 files changed, 12 insertions(+), 26 deletions(-)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Tested-by on the v2 series
#12 lore raw
In reply to Robin Murphy
Quoted 7 lines · Robin Murphy

Hi all,

Here's a second crack at my RK805-inspired cleanup. There was a bit of debate around v1[1], but it seems like we're now all happy that this is a reasonable way to go. For clarity I decided to include Soeren's patch as #1/5, but since I've rewritten most of my patches I've not included the tested-by tags.

I re-tested this series on a RockPro64 board with RK808 PMIC.

Regards,
Soeren

Quoted 18 lines

Robin.

[1] https://lore.kernel.org/lkml/[email protected]/

Robin Murphy (4):
mfd: rk808: Ensure suspend/resume hooks always work
mfd: rk808: Stop using syscore ops
mfd: rk808: Reduce shutdown duplication
mfd: rk808: Convert RK805 to shutdown/suspend hooks

Soeren Moch (1):
mfd: rk808: Always use poweroff when requested

 drivers/mfd/rk808.c       | 139 +++++++++++++-------------------------
 include/linux/mfd/rk808.h |   2 -
 2 files changed, 48 insertions(+), 93 deletions(-)
Tested-by on the v2 series
#13 lore raw
In reply to Robin Murphy

Hi Robin,

Quoted 9 lines · Robin Murphy

Hi all,

Here's a second crack at my RK805-inspired cleanup. There was a bit of debate around v1[1], but it seems like we're now all happy that this is a reasonable way to go. For clarity I decided to include Soeren's patch as #1/5, but since I've rewritten most of my patches I've not included the tested-by tags.

Quoted 4 lines

Robin.

[1] https://lore.kernel.org/lkml/[email protected]/

Despite the i2c warning message it performs clean shutdown. So Please add my

-Anand

Quoted 21 lines

Robin Murphy (4):
mfd: rk808: Ensure suspend/resume hooks always work
mfd: rk808: Stop using syscore ops
mfd: rk808: Reduce shutdown duplication
mfd: rk808: Convert RK805 to shutdown/suspend hooks

Soeren Moch (1):
mfd: rk808: Always use poweroff when requested

 drivers/mfd/rk808.c       | 139 +++++++++++++-------------------------
 include/linux/mfd/rk808.h |   2 -
 2 files changed, 48 insertions(+), 93 deletions(-)

--
2.17.1

_______________________________________________
Linux-rockchip mailing list [email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#14 lore raw
In reply to Robin Murphy
Quoted 7 lines · Robin Murphy

Hi all,

Here's a second crack at my RK805-inspired cleanup. There was a bit of debate around v1[1], but it seems like we're now all happy that this is a reasonable way to go. For clarity I decided to include Soeren's patch as #1/5, but since I've rewritten most of my patches I've not included the tested-by tags.

Any more comments, or are these patches good to merge now? My local branch seemed to rebase to 5.6-rc1 cleanly, but I can resend if necessary.

Thanks,
Robin.

Quoted 16 lines

[1] https://lore.kernel.org/lkml/[email protected]/

Robin Murphy (4):
mfd: rk808: Ensure suspend/resume hooks always work
mfd: rk808: Stop using syscore ops
mfd: rk808: Reduce shutdown duplication
mfd: rk808: Convert RK805 to shutdown/suspend hooks

Soeren Moch (1):
mfd: rk808: Always use poweroff when requested

  drivers/mfd/rk808.c       | 139 +++++++++++++-------------------------
  include/linux/mfd/rk808.h |   2 -
  2 files changed, 48 insertions(+), 93 deletions(-)
#15 lore raw
In reply to Robin Murphy

Hi Robin,

Quoted 11 lines · Robin Murphy

Hi all,

Here's a second crack at my RK805-inspired cleanup. There was a bit of debate around v1[1], but it seems like we're now all happy that this is a reasonable way to go. For clarity I decided to include Soeren's patch as #1/5, but since I've rewritten most of my patches I've not included the tested-by tags.

Robin.

Can you re-spin this series, it seem these patches are lost.

-Anand

#16 lore raw
Quoted 11 lines · Anand Moon

Hi Robin,

Quoted 8 lines · Robin Murphy

Hi all,

Here's a second crack at my RK805-inspired cleanup. There was a bit of debate around v1[1], but it seems like we're now all happy that this is a reasonable way to go. For clarity I decided to include Soeren's patch as #1/5, but since I've rewritten most of my patches I've not included the tested-by tags.

Quoted 4 lines
Quoted 2 lines

Robin.

Can you re-spin this series, it seem these patches are lost.

These patches are already merged as
d8f083a302f7..42679765faf2

Soeren

#17 lore raw

Hi Soeren

Quoted 15 lines · Soeren Moch
Quoted 11 lines · Anand Moon

Hi Robin,

Quoted 8 lines · Robin Murphy

Hi all,

Here's a second crack at my RK805-inspired cleanup. There was a bit of debate around v1[1], but it seems like we're now all happy that this is a reasonable way to go. For clarity I decided to include Soeren's patch as #1/5, but since I've rewritten most of my patches I've not included the tested-by tags.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Robin.

Can you re-spin this series, it seem these patches are lost.

These patches are already merged as
d8f083a302f7..42679765faf2

Soeren

Thanks for the input.

-Anand