linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/47] pwm: Make pwmchip_remove return void
@ 2021-07-07 16:27 Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 01/47] pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered Uwe Kleine-König
                   ` (46 more replies)
  0 siblings, 47 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

Hello,

this series modifies the drivers that are still using the return value
of pwmchip_return to stop doing that and at the end change this function
to return void.

Best regards
Uwe

Uwe Kleine-König (47):
  pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was
    registered
  pwm: mxs: Don't modify HW state in .probe() after the PWM chip was
    registered
  pwm: img: Don't modify HW state in .remove() callback
  pwm: rockchip: Don't modify HW state in .remove() callback
  pwm: stm32-lp: Don't modify HW state in .remove() callback
  pwm: hibvt: Disable the clock only after the PWM was unregistered
  pwm: rockchip: Unprepare clocks only after the PWM was unregistered
  pwm: tiehrpwm: Unprepare clock only after the PWM was unregistered
  pwm: ntxec: Drop useless assignment to struct pwmchip::base
  pwm: jz4740: Improve compile coverage by allowing to enable on !MIPS
  pwm: keembay: Improve compile coverage by allowing to enable on !ARM64
  pwm: ab8500: Simplify using devm_pwmchip_add()
  pwm: bcm-kona: Simplify using devm_pwmchip_add()
  pwm: ep93xx: Simplify using devm_pwmchip_add()
  pwm: fsl-ftm: Simplify using devm_pwmchip_add()
  pwm: imx27: Simplify using devm_pwmchip_add()
  pwm: intel-lgm: Simplify using devm_pwmchip_add()
  pwm: iqs620a: Simplify using devm_pwmchip_add()
  pwm: jz4740: Simplify using devm_pwmchip_add()
  pwm: keembay: Simplify using devm_pwmchip_add()
  pwm: lp3943: Simplify using devm_pwmchip_add()
  pwm: lpc32xx: Simplify using devm_pwmchip_add()
  pwm: mediatek: Simplify using devm_pwmchip_add()
  pwm: mxs: Simplify using devm_pwmchip_add()
  pwm: ntxec: Simplify using devm_pwmchip_add()
  pwm: pxa: Simplify using devm_pwmchip_add()
  pwm: raspberrypi-poe: Simplify using devm_pwmchip_add()
  pwm: sl28cpld: Simplify using devm_pwmchip_add()
  pwm: stm32-lp: Simplify using devm_pwmchip_add()
  pwm: tiecap: Simplify using devm_pwmchip_add()
  pwm: twl-led: Simplify using devm_pwmchip_add()
  pwm: twl: Simplify using devm_pwmchip_add()
  pwm: atmel-hlcdc: Don't check the return code of pwmchip_remove()
  pwm: atmel-tcb: Don't check the return code of pwmchip_remove()
  pwm: brcmstb: Don't check the return code of pwmchip_remove()
  pwm: cros-ec: Don't check the return code of pwmchip_remove()
  pwm: img: Don't check the return code of pwmchip_remove()
  pwm: imx-tpm: Don't check the return code of pwmchip_remove()
  pwm: mtk-disp: Don't check the return code of pwmchip_remove()
  pwm: omap-dmtimer: Don't check the return code of pwmchip_remove()
  pwm: pca9685: Don't check the return code of pwmchip_remove()
  pwm: rcar: Don't check the return code of pwmchip_remove()
  pwm: renesas-tpu: Don't check the return code of pwmchip_remove()
  pwm: samsung: Don't check the return code of pwmchip_remove()
  pwm: sifive: Don't check the return code of pwmchip_remove()
  pwm: sun4i: Don't check the return code of pwmchip_remove()
  pwm: Make pwmchip_remove() return void

 drivers/pwm/Kconfig               |  5 +++--
 drivers/pwm/core.c                |  4 +---
 drivers/pwm/pwm-ab8500.c          | 18 +-----------------
 drivers/pwm/pwm-atmel-hlcdc.c     |  5 +----
 drivers/pwm/pwm-atmel-tcb.c       |  5 +----
 drivers/pwm/pwm-bcm-kona.c        | 12 +-----------
 drivers/pwm/pwm-brcmstb.c         |  5 ++---
 drivers/pwm/pwm-cros-ec.c         |  4 +++-
 drivers/pwm/pwm-ep93xx.c          | 11 +----------
 drivers/pwm/pwm-fsl-ftm.c         | 10 +---------
 drivers/pwm/pwm-hibvt.c           |  4 +++-
 drivers/pwm/pwm-img.c             | 20 +++-----------------
 drivers/pwm/pwm-imx-tpm.c         |  5 +++--
 drivers/pwm/pwm-imx27.c           | 14 +-------------
 drivers/pwm/pwm-intel-lgm.c       | 12 +-----------
 drivers/pwm/pwm-iqs620a.c         | 16 +---------------
 drivers/pwm/pwm-jz4740.c          | 12 +-----------
 drivers/pwm/pwm-keembay.c         | 12 +-----------
 drivers/pwm/pwm-lp3943.c          | 12 +-----------
 drivers/pwm/pwm-lpc32xx.c         | 22 ++++++----------------
 drivers/pwm/pwm-mediatek.c        | 12 +-----------
 drivers/pwm/pwm-mtk-disp.c        |  5 ++---
 drivers/pwm/pwm-mxs.c             | 25 ++++++-------------------
 drivers/pwm/pwm-ntxec.c           | 14 +-------------
 drivers/pwm/pwm-omap-dmtimer.c    |  5 +----
 drivers/pwm/pwm-pca9685.c         |  5 +----
 drivers/pwm/pwm-pxa.c             | 13 +------------
 drivers/pwm/pwm-raspberrypi-poe.c | 12 +-----------
 drivers/pwm/pwm-rcar.c            |  5 ++---
 drivers/pwm/pwm-renesas-tpu.c     |  5 ++---
 drivers/pwm/pwm-rockchip.c        | 16 ++--------------
 drivers/pwm/pwm-samsung.c         |  5 +----
 drivers/pwm/pwm-sifive.c          |  6 +++---
 drivers/pwm/pwm-sl28cpld.c        | 12 +-----------
 drivers/pwm/pwm-stm32-lp.c        | 12 +-----------
 drivers/pwm/pwm-sun4i.c           |  5 +----
 drivers/pwm/pwm-tiecap.c          |  6 ++----
 drivers/pwm/pwm-tiehrpwm.c        |  4 +++-
 drivers/pwm/pwm-twl-led.c         | 17 +----------------
 drivers/pwm/pwm-twl.c             | 17 +----------------
 include/linux/pwm.h               |  2 +-
 41 files changed, 71 insertions(+), 340 deletions(-)


base-commit: 96e45e5202377da39d086ec19f8934ebcc5b0fd6
prerequisite-patch-id: 83b82192f28d84e09e1cdcf9609fc4e085a15a17
-- 
2.30.2


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

* [PATCH 01/47] pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
@ 2021-07-07 16:27 ` Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 02/47] pwm: mxs: " Uwe Kleine-König
                   ` (45 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel, Sylvain Lemieux

This fixes a race condition: After pwmchip_add() is called there might
already be a consumer and then modifying the hardware behind the
consumer's back is bad. So set the default before.

(Side-note: I don't know what this register setting actually does, if
this modifies the polarity there is an inconsistency because the
inversed polarity isn't considered if the PWM is already running during
.probe().)

Fixes: acfd92fdfb93 ("pwm: lpc32xx: Set PWM_PIN_LEVEL bit to default value")
Cc: Sylvain Lemieux <slemieux@tycoint.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-lpc32xx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/pwm/pwm-lpc32xx.c b/drivers/pwm/pwm-lpc32xx.c
index 2834a0f001d3..719e8e913656 100644
--- a/drivers/pwm/pwm-lpc32xx.c
+++ b/drivers/pwm/pwm-lpc32xx.c
@@ -117,17 +117,17 @@ static int lpc32xx_pwm_probe(struct platform_device *pdev)
 	lpc32xx->chip.ops = &lpc32xx_pwm_ops;
 	lpc32xx->chip.npwm = 1;
 
+	/* If PWM is disabled, configure the output to the default value */
+	val = readl(lpc32xx->base + (lpc32xx->chip.pwms[0].hwpwm << 2));
+	val &= ~PWM_PIN_LEVEL;
+	writel(val, lpc32xx->base + (lpc32xx->chip.pwms[0].hwpwm << 2));
+
 	ret = pwmchip_add(&lpc32xx->chip);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to add PWM chip, error %d\n", ret);
 		return ret;
 	}
 
-	/* When PWM is disable, configure the output to the default value */
-	val = readl(lpc32xx->base + (lpc32xx->chip.pwms[0].hwpwm << 2));
-	val &= ~PWM_PIN_LEVEL;
-	writel(val, lpc32xx->base + (lpc32xx->chip.pwms[0].hwpwm << 2));
-
 	platform_set_drvdata(pdev, lpc32xx);
 
 	return 0;
-- 
2.30.2


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

* [PATCH 02/47] pwm: mxs: Don't modify HW state in .probe() after the PWM chip was registered
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 01/47] pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered Uwe Kleine-König
@ 2021-07-07 16:27 ` Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 03/47] pwm: img: Don't modify HW state in .remove() callback Uwe Kleine-König
                   ` (44 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel, Sascha Hauer, Shawn Guo

This fixes a race condition: After pwmchip_add() is called there might
already be a consumer and then modifying the hardware behind the
consumer's back is bad. So reset before calling pwmchip_add().

Note that reseting the hardware isn't the right thing to do if the PWM
is already running as it might e.g. disable (or even enable) a backlight
that is supposed to be on (or off).

Fixes: 4dce82c1e840 ("pwm: add pwm-mxs support")
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-mxs.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c
index a22180803bd7..558dc1de8f5d 100644
--- a/drivers/pwm/pwm-mxs.c
+++ b/drivers/pwm/pwm-mxs.c
@@ -145,6 +145,11 @@ static int mxs_pwm_probe(struct platform_device *pdev)
 		return ret;
 	}
 
+	/* FIXME: Only do this if the PWM isn't already running */
+	ret = stmp_reset_block(mxs->base);
+	if (ret)
+		return dev_err_probe(&pdev->dev, ret, "failed to reset PWM\n");
+
 	ret = pwmchip_add(&mxs->chip);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to add pwm chip %d\n", ret);
@@ -153,15 +158,7 @@ static int mxs_pwm_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, mxs);
 
-	ret = stmp_reset_block(mxs->base);
-	if (ret)
-		goto pwm_remove;
-
 	return 0;
-
-pwm_remove:
-	pwmchip_remove(&mxs->chip);
-	return ret;
 }
 
 static int mxs_pwm_remove(struct platform_device *pdev)
-- 
2.30.2


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

* [PATCH 03/47] pwm: img: Don't modify HW state in .remove() callback
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 01/47] pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 02/47] pwm: mxs: " Uwe Kleine-König
@ 2021-07-07 16:27 ` Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 04/47] pwm: rockchip: " Uwe Kleine-König
                   ` (43 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

A consumer is expected to disable a PWM before calling pwm_put(). And if
they didn't there is hopefully a good reason (or the consumer needs
fixing). Also if disabling an enabled PWM was the right thing to do,
this should better be done in the framework instead of in each low level
driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-img.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/drivers/pwm/pwm-img.c b/drivers/pwm/pwm-img.c
index 11b16ecc4f96..18d8e34d0d08 100644
--- a/drivers/pwm/pwm-img.c
+++ b/drivers/pwm/pwm-img.c
@@ -326,23 +326,7 @@ static int img_pwm_probe(struct platform_device *pdev)
 static int img_pwm_remove(struct platform_device *pdev)
 {
 	struct img_pwm_chip *pwm_chip = platform_get_drvdata(pdev);
-	u32 val;
-	unsigned int i;
-	int ret;
-
-	ret = pm_runtime_get_sync(&pdev->dev);
-	if (ret < 0) {
-		pm_runtime_put(&pdev->dev);
-		return ret;
-	}
-
-	for (i = 0; i < pwm_chip->chip.npwm; i++) {
-		val = img_pwm_readl(pwm_chip, PWM_CTRL_CFG);
-		val &= ~BIT(i);
-		img_pwm_writel(pwm_chip, PWM_CTRL_CFG, val);
-	}
 
-	pm_runtime_put(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		img_pwm_runtime_suspend(&pdev->dev);
-- 
2.30.2


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

* [PATCH 04/47] pwm: rockchip: Don't modify HW state in .remove() callback
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2021-07-07 16:27 ` [PATCH 03/47] pwm: img: Don't modify HW state in .remove() callback Uwe Kleine-König
@ 2021-07-07 16:27 ` Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 05/47] pwm: stm32-lp: " Uwe Kleine-König
                   ` (42 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

A consumer is expected to disable a PWM before calling pwm_put(). And if
they didn't there is hopefully a good reason (or the consumer needs
fixing). Also if disabling an enabled PWM was the right thing to do,
this should better be done in the framework instead of in each low level
driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-rockchip.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
index cbe900877724..8fcef29948d7 100644
--- a/drivers/pwm/pwm-rockchip.c
+++ b/drivers/pwm/pwm-rockchip.c
@@ -384,20 +384,6 @@ static int rockchip_pwm_remove(struct platform_device *pdev)
 {
 	struct rockchip_pwm_chip *pc = platform_get_drvdata(pdev);
 
-	/*
-	 * Disable the PWM clk before unpreparing it if the PWM device is still
-	 * running. This should only happen when the last PWM user left it
-	 * enabled, or when nobody requested a PWM that was previously enabled
-	 * by the bootloader.
-	 *
-	 * FIXME: Maybe the core should disable all PWM devices in
-	 * pwmchip_remove(). In this case we'd only have to call
-	 * clk_unprepare() after pwmchip_remove().
-	 *
-	 */
-	if (pwm_is_enabled(pc->chip.pwms))
-		clk_disable(pc->clk);
-
 	clk_unprepare(pc->pclk);
 	clk_unprepare(pc->clk);
 
-- 
2.30.2


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

* [PATCH 05/47] pwm: stm32-lp: Don't modify HW state in .remove() callback
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (3 preceding siblings ...)
  2021-07-07 16:27 ` [PATCH 04/47] pwm: rockchip: " Uwe Kleine-König
@ 2021-07-07 16:27 ` Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 06/47] pwm: hibvt: Disable the clock only after the PWM was unregistered Uwe Kleine-König
                   ` (41 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

A consumer is expected to disable a PWM before calling pwm_put(). And if
they didn't there is hopefully a good reason (or the consumer needs
fixing). Also if disabling an enabled PWM was the right thing to do,
this should better be done in the framework instead of in each low level
driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-stm32-lp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c
index 93dd03618465..e4a10aac354d 100644
--- a/drivers/pwm/pwm-stm32-lp.c
+++ b/drivers/pwm/pwm-stm32-lp.c
@@ -222,8 +222,6 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev)
 {
 	struct stm32_pwm_lp *priv = platform_get_drvdata(pdev);
 
-	pwm_disable(&priv->chip.pwms[0]);
-
 	return pwmchip_remove(&priv->chip);
 }
 
-- 
2.30.2


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

* [PATCH 06/47] pwm: hibvt: Disable the clock only after the PWM was unregistered
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (4 preceding siblings ...)
  2021-07-07 16:27 ` [PATCH 05/47] pwm: stm32-lp: " Uwe Kleine-König
@ 2021-07-07 16:27 ` Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 07/47] pwm: rockchip: Unprepare clocks " Uwe Kleine-König
                   ` (40 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

The driver is supposed to stay functional until pwmchip_remove()
returns. So disable clocks and reset the hardware only after that.

The return value of pwmchip_remove doesn't need to be checked because
it returns zero anyhow and should be changed to return void eventually.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-hibvt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-hibvt.c b/drivers/pwm/pwm-hibvt.c
index 4a6e9ad3c0ff..333f1b18ff4e 100644
--- a/drivers/pwm/pwm-hibvt.c
+++ b/drivers/pwm/pwm-hibvt.c
@@ -248,13 +248,15 @@ static int hibvt_pwm_remove(struct platform_device *pdev)
 
 	pwm_chip = platform_get_drvdata(pdev);
 
+	pwmchip_remove(&pwm_chip->chip);
+
 	reset_control_assert(pwm_chip->rstc);
 	msleep(30);
 	reset_control_deassert(pwm_chip->rstc);
 
 	clk_disable_unprepare(pwm_chip->clk);
 
-	return pwmchip_remove(&pwm_chip->chip);
+	return 0;
 }
 
 static const struct of_device_id hibvt_pwm_of_match[] = {
-- 
2.30.2


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

* [PATCH 07/47] pwm: rockchip: Unprepare clocks only after the PWM was unregistered
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (5 preceding siblings ...)
  2021-07-07 16:27 ` [PATCH 06/47] pwm: hibvt: Disable the clock only after the PWM was unregistered Uwe Kleine-König
@ 2021-07-07 16:27 ` Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 08/47] pwm: tiehrpwm: Unprepare clock " Uwe Kleine-König
                   ` (39 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

The driver is supposed to stay functional until pwmchip_remove()
returns. So disable clocks only after that.

pwmchip_remove() always returns 0, so the return code can be ignored
which keeps rockchip_pwm_remove() a bit simpler and allows to eventually
make pwmchip_remove() return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-rockchip.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
index 8fcef29948d7..f3647b317152 100644
--- a/drivers/pwm/pwm-rockchip.c
+++ b/drivers/pwm/pwm-rockchip.c
@@ -384,10 +384,12 @@ static int rockchip_pwm_remove(struct platform_device *pdev)
 {
 	struct rockchip_pwm_chip *pc = platform_get_drvdata(pdev);
 
+	pwmchip_remove(&pc->chip);
+
 	clk_unprepare(pc->pclk);
 	clk_unprepare(pc->clk);
 
-	return pwmchip_remove(&pc->chip);
+	return 0;
 }
 
 static struct platform_driver rockchip_pwm_driver = {
-- 
2.30.2


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

* [PATCH 08/47] pwm: tiehrpwm: Unprepare clock only after the PWM was unregistered
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (6 preceding siblings ...)
  2021-07-07 16:27 ` [PATCH 07/47] pwm: rockchip: Unprepare clocks " Uwe Kleine-König
@ 2021-07-07 16:27 ` Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 09/47] pwm: ntxec: Drop useless assignment to struct pwmchip::base Uwe Kleine-König
                   ` (38 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

The driver is supposed to stay functional until pwmchip_remove()
returns. So disable clocks only after that.

pwmchip_remove() always returns 0, so the return code can be ignored
which keeps ehrpwm_pwm_remove() a bit simpler and eventually allows to
make pwmchip_remove() return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-tiehrpwm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 17909fa53211..5b723a48c5f1 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -485,11 +485,13 @@ static int ehrpwm_pwm_remove(struct platform_device *pdev)
 {
 	struct ehrpwm_pwm_chip *pc = platform_get_drvdata(pdev);
 
+	pwmchip_remove(&pc->chip);
+
 	clk_unprepare(pc->tbclk);
 
 	pm_runtime_disable(&pdev->dev);
 
-	return pwmchip_remove(&pc->chip);
+	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
-- 
2.30.2


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

* [PATCH 09/47] pwm: ntxec: Drop useless assignment to struct pwmchip::base
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (7 preceding siblings ...)
  2021-07-07 16:27 ` [PATCH 08/47] pwm: tiehrpwm: Unprepare clock " Uwe Kleine-König
@ 2021-07-07 16:27 ` Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 10/47] pwm: jz4740: Improve compile coverage by allowing to enable on !MIPS Uwe Kleine-König
                   ` (37 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

Since commit f9a8ee8c8bcd ("pwm: Always allocate PWM chip base ID
dynamically") there is no effect any more for assigning this variable.
When the patch resulting in f9a8ee8c8bcd was created, this driver didn't
exist yet, so this was missed.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-ntxec.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pwm/pwm-ntxec.c b/drivers/pwm/pwm-ntxec.c
index 50c454c553c4..29a463b7d63a 100644
--- a/drivers/pwm/pwm-ntxec.c
+++ b/drivers/pwm/pwm-ntxec.c
@@ -155,7 +155,6 @@ static int ntxec_pwm_probe(struct platform_device *pdev)
 	chip = &priv->chip;
 	chip->dev = &pdev->dev;
 	chip->ops = &ntxec_pwm_ops;
-	chip->base = -1;
 	chip->npwm = 1;
 
 	return pwmchip_add(chip);
-- 
2.30.2


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

* [PATCH 10/47] pwm: jz4740: Improve compile coverage by allowing to enable on !MIPS
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (8 preceding siblings ...)
  2021-07-07 16:27 ` [PATCH 09/47] pwm: ntxec: Drop useless assignment to struct pwmchip::base Uwe Kleine-König
@ 2021-07-07 16:27 ` Uwe Kleine-König
  2021-07-07 16:27 ` [PATCH 11/47] pwm: keembay: Improve compile coverage by allowing to enable on !ARM64 Uwe Kleine-König
                   ` (36 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

There are no mips specific constructs in this driver and it compiles
just fine with ARCH=arm.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index c76adedd58c9..ecbd91ee3c46 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -272,7 +272,7 @@ config PWM_IQS620A
 
 config PWM_JZ4740
 	tristate "Ingenic JZ47xx PWM support"
-	depends on MIPS
+	depends on MIPS || COMPILE_TEST
 	depends on COMMON_CLK
 	select MFD_SYSCON
 	help
-- 
2.30.2


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

* [PATCH 11/47] pwm: keembay: Improve compile coverage by allowing to enable on !ARM64
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (9 preceding siblings ...)
  2021-07-07 16:27 ` [PATCH 10/47] pwm: jz4740: Improve compile coverage by allowing to enable on !MIPS Uwe Kleine-König
@ 2021-07-07 16:27 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 12/47] pwm: ab8500: Simplify using devm_pwmchip_add() Uwe Kleine-König
                   ` (35 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:27 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

There are no arm64 specific constructs in this driver and it compiles
just fine with ARCH=arm.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index ecbd91ee3c46..aa29841bbb79 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -284,7 +284,8 @@ config PWM_JZ4740
 
 config PWM_KEEMBAY
 	tristate "Intel Keem Bay PWM driver"
-	depends on ARCH_KEEMBAY || (ARM64 && COMPILE_TEST)
+	depends on ARCH_KEEMBAY || COMPILE_TEST
+	depends on COMMON_CLK && HAS_IOMEM
 	help
 	  The platform driver for Intel Keem Bay PWM controller.
 
-- 
2.30.2


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

* [PATCH 12/47] pwm: ab8500: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (10 preceding siblings ...)
  2021-07-07 16:27 ` [PATCH 11/47] pwm: keembay: Improve compile coverage by allowing to enable on !ARM64 Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 13/47] pwm: bcm-kona: " Uwe Kleine-König
                   ` (34 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-ab8500.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c
index 281f74a1c50b..ad37bc46f272 100644
--- a/drivers/pwm/pwm-ab8500.c
+++ b/drivers/pwm/pwm-ab8500.c
@@ -111,26 +111,11 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
 	ab8500->chip.npwm = 1;
 	ab8500->hwid = pdev->id - 1;
 
-	err = pwmchip_add(&ab8500->chip);
+	err = devm_pwmchip_add(&pdev->dev, &ab8500->chip);
 	if (err < 0)
 		return dev_err_probe(&pdev->dev, err, "Failed to add pwm chip\n");
 
 	dev_dbg(&pdev->dev, "pwm probe successful\n");
-	platform_set_drvdata(pdev, ab8500);
-
-	return 0;
-}
-
-static int ab8500_pwm_remove(struct platform_device *pdev)
-{
-	struct ab8500_pwm_chip *ab8500 = platform_get_drvdata(pdev);
-	int err;
-
-	err = pwmchip_remove(&ab8500->chip);
-	if (err < 0)
-		return err;
-
-	dev_dbg(&pdev->dev, "pwm driver removed\n");
 
 	return 0;
 }
@@ -140,7 +125,6 @@ static struct platform_driver ab8500_pwm_driver = {
 		.name = "ab8500-pwm",
 	},
 	.probe = ab8500_pwm_probe,
-	.remove = ab8500_pwm_remove,
 };
 module_platform_driver(ab8500_pwm_driver);
 
-- 
2.30.2


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

* [PATCH 13/47] pwm: bcm-kona: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (11 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 12/47] pwm: ab8500: Simplify using devm_pwmchip_add() Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 14/47] pwm: ep93xx: " Uwe Kleine-König
                   ` (33 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-bcm-kona.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pwm/pwm-bcm-kona.c b/drivers/pwm/pwm-bcm-kona.c
index 8c85c66ea5c9..64148f5f81d0 100644
--- a/drivers/pwm/pwm-bcm-kona.c
+++ b/drivers/pwm/pwm-bcm-kona.c
@@ -267,8 +267,6 @@ static int kona_pwmc_probe(struct platform_device *pdev)
 	if (kp == NULL)
 		return -ENOMEM;
 
-	platform_set_drvdata(pdev, kp);
-
 	kp->chip.dev = &pdev->dev;
 	kp->chip.ops = &kona_pwm_ops;
 	kp->chip.npwm = 6;
@@ -298,20 +296,13 @@ static int kona_pwmc_probe(struct platform_device *pdev)
 
 	clk_disable_unprepare(kp->clk);
 
-	ret = pwmchip_add(&kp->chip);
+	ret = devm_pwmchip_add(&pdev->dev, &kp->chip);
 	if (ret < 0)
 		dev_err(&pdev->dev, "failed to add PWM chip: %d\n", ret);
 
 	return ret;
 }
 
-static int kona_pwmc_remove(struct platform_device *pdev)
-{
-	struct kona_pwmc *kp = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&kp->chip);
-}
-
 static const struct of_device_id bcm_kona_pwmc_dt[] = {
 	{ .compatible = "brcm,kona-pwm" },
 	{ },
@@ -324,7 +315,6 @@ static struct platform_driver kona_pwmc_driver = {
 		.of_match_table = bcm_kona_pwmc_dt,
 	},
 	.probe = kona_pwmc_probe,
-	.remove = kona_pwmc_remove,
 };
 module_platform_driver(kona_pwmc_driver);
 
-- 
2.30.2


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

* [PATCH 14/47] pwm: ep93xx: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (12 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 13/47] pwm: bcm-kona: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 15/47] pwm: fsl-ftm: " Uwe Kleine-König
                   ` (32 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-ep93xx.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/pwm/pwm-ep93xx.c b/drivers/pwm/pwm-ep93xx.c
index 8a3d781e6514..448840045f7c 100644
--- a/drivers/pwm/pwm-ep93xx.c
+++ b/drivers/pwm/pwm-ep93xx.c
@@ -188,27 +188,18 @@ static int ep93xx_pwm_probe(struct platform_device *pdev)
 	ep93xx_pwm->chip.ops = &ep93xx_pwm_ops;
 	ep93xx_pwm->chip.npwm = 1;
 
-	ret = pwmchip_add(&ep93xx_pwm->chip);
+	ret = devm_pwmchip_add(&pdev->dev, &ep93xx_pwm->chip);
 	if (ret < 0)
 		return ret;
 
-	platform_set_drvdata(pdev, ep93xx_pwm);
 	return 0;
 }
 
-static int ep93xx_pwm_remove(struct platform_device *pdev)
-{
-	struct ep93xx_pwm *ep93xx_pwm = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&ep93xx_pwm->chip);
-}
-
 static struct platform_driver ep93xx_pwm_driver = {
 	.driver = {
 		.name = "ep93xx-pwm",
 	},
 	.probe = ep93xx_pwm_probe,
-	.remove = ep93xx_pwm_remove,
 };
 module_platform_driver(ep93xx_pwm_driver);
 
-- 
2.30.2


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

* [PATCH 15/47] pwm: fsl-ftm: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (13 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 14/47] pwm: ep93xx: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 16/47] pwm: imx27: " Uwe Kleine-König
                   ` (31 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-fsl-ftm.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/pwm/pwm-fsl-ftm.c b/drivers/pwm/pwm-fsl-ftm.c
index 96ccd772280c..0247757f9a72 100644
--- a/drivers/pwm/pwm-fsl-ftm.c
+++ b/drivers/pwm/pwm-fsl-ftm.c
@@ -453,7 +453,7 @@ static int fsl_pwm_probe(struct platform_device *pdev)
 	fpc->chip.ops = &fsl_pwm_ops;
 	fpc->chip.npwm = 8;
 
-	ret = pwmchip_add(&fpc->chip);
+	ret = devm_pwmchip_add(&pdev->dev, &fpc->chip);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to add PWM chip: %d\n", ret);
 		return ret;
@@ -464,13 +464,6 @@ static int fsl_pwm_probe(struct platform_device *pdev)
 	return fsl_pwm_init(fpc);
 }
 
-static int fsl_pwm_remove(struct platform_device *pdev)
-{
-	struct fsl_pwm_chip *fpc = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&fpc->chip);
-}
-
 #ifdef CONFIG_PM_SLEEP
 static int fsl_pwm_suspend(struct device *dev)
 {
@@ -552,7 +545,6 @@ static struct platform_driver fsl_pwm_driver = {
 		.pm = &fsl_pwm_pm_ops,
 	},
 	.probe = fsl_pwm_probe,
-	.remove = fsl_pwm_remove,
 };
 module_platform_driver(fsl_pwm_driver);
 
-- 
2.30.2


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

* [PATCH 16/47] pwm: imx27: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (14 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 15/47] pwm: fsl-ftm: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 17/47] pwm: intel-lgm: " Uwe Kleine-König
                   ` (30 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-imx27.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/pwm/pwm-imx27.c b/drivers/pwm/pwm-imx27.c
index f6588a96fbd9..ea91a2f81a9f 100644
--- a/drivers/pwm/pwm-imx27.c
+++ b/drivers/pwm/pwm-imx27.c
@@ -313,8 +313,6 @@ static int pwm_imx27_probe(struct platform_device *pdev)
 	if (imx == NULL)
 		return -ENOMEM;
 
-	platform_set_drvdata(pdev, imx);
-
 	imx->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
 	if (IS_ERR(imx->clk_ipg))
 		return dev_err_probe(&pdev->dev, PTR_ERR(imx->clk_ipg),
@@ -342,16 +340,7 @@ static int pwm_imx27_probe(struct platform_device *pdev)
 	if (!(pwmcr & MX3_PWMCR_EN))
 		pwm_imx27_clk_disable_unprepare(imx);
 
-	return pwmchip_add(&imx->chip);
-}
-
-static int pwm_imx27_remove(struct platform_device *pdev)
-{
-	struct pwm_imx27_chip *imx;
-
-	imx = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&imx->chip);
+	return devm_pwmchip_add(&pdev->dev, &imx->chip);
 }
 
 static struct platform_driver imx_pwm_driver = {
@@ -360,7 +349,6 @@ static struct platform_driver imx_pwm_driver = {
 		.of_match_table = pwm_imx27_dt_ids,
 	},
 	.probe = pwm_imx27_probe,
-	.remove = pwm_imx27_remove,
 };
 module_platform_driver(imx_pwm_driver);
 
-- 
2.30.2


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

* [PATCH 17/47] pwm: intel-lgm: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (15 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 16/47] pwm: imx27: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 18/47] pwm: iqs620a: " Uwe Kleine-König
                   ` (29 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-intel-lgm.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pwm/pwm-intel-lgm.c b/drivers/pwm/pwm-intel-lgm.c
index 015f5eba09a1..b66c35074087 100644
--- a/drivers/pwm/pwm-intel-lgm.c
+++ b/drivers/pwm/pwm-intel-lgm.c
@@ -176,8 +176,6 @@ static int lgm_pwm_probe(struct platform_device *pdev)
 	if (!pc)
 		return -ENOMEM;
 
-	platform_set_drvdata(pdev, pc);
-
 	io_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(io_base))
 		return PTR_ERR(io_base);
@@ -210,20 +208,13 @@ static int lgm_pwm_probe(struct platform_device *pdev)
 
 	lgm_pwm_init(pc);
 
-	ret = pwmchip_add(&pc->chip);
+	ret = devm_pwmchip_add(dev, &pc->chip);
 	if (ret < 0)
 		return dev_err_probe(dev, ret, "failed to add PWM chip\n");
 
 	return 0;
 }
 
-static int lgm_pwm_remove(struct platform_device *pdev)
-{
-	struct lgm_pwm_chip *pc = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&pc->chip);
-}
-
 static const struct of_device_id lgm_pwm_of_match[] = {
 	{ .compatible = "intel,lgm-pwm" },
 	{ }
@@ -236,7 +227,6 @@ static struct platform_driver lgm_pwm_driver = {
 		.of_match_table = lgm_pwm_of_match,
 	},
 	.probe = lgm_pwm_probe,
-	.remove = lgm_pwm_remove,
 };
 module_platform_driver(lgm_pwm_driver);
 
-- 
2.30.2


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

* [PATCH 18/47] pwm: iqs620a: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (16 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 17/47] pwm: intel-lgm: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 19/47] pwm: jz4740: " Uwe Kleine-König
                   ` (28 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-iqs620a.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/drivers/pwm/pwm-iqs620a.c b/drivers/pwm/pwm-iqs620a.c
index 6c6e26d18329..54bd95a5cab0 100644
--- a/drivers/pwm/pwm-iqs620a.c
+++ b/drivers/pwm/pwm-iqs620a.c
@@ -189,7 +189,6 @@ static int iqs620_pwm_probe(struct platform_device *pdev)
 	if (!iqs620_pwm)
 		return -ENOMEM;
 
-	platform_set_drvdata(pdev, iqs620_pwm);
 	iqs620_pwm->iqs62x = iqs62x;
 
 	ret = regmap_read(iqs62x->regmap, IQS620_PWR_SETTINGS, &val);
@@ -224,31 +223,18 @@ static int iqs620_pwm_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	ret = pwmchip_add(&iqs620_pwm->chip);
+	ret = devm_pwmchip_add(&pdev->dev, &iqs620_pwm->chip);
 	if (ret)
 		dev_err(&pdev->dev, "Failed to add device: %d\n", ret);
 
 	return ret;
 }
 
-static int iqs620_pwm_remove(struct platform_device *pdev)
-{
-	struct iqs620_pwm_private *iqs620_pwm = platform_get_drvdata(pdev);
-	int ret;
-
-	ret = pwmchip_remove(&iqs620_pwm->chip);
-	if (ret)
-		dev_err(&pdev->dev, "Failed to remove device: %d\n", ret);
-
-	return ret;
-}
-
 static struct platform_driver iqs620_pwm_platform_driver = {
 	.driver = {
 		.name = "iqs620a-pwm",
 	},
 	.probe = iqs620_pwm_probe,
-	.remove = iqs620_pwm_remove,
 };
 module_platform_driver(iqs620_pwm_platform_driver);
 
-- 
2.30.2


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

* [PATCH 19/47] pwm: jz4740: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (17 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 18/47] pwm: iqs620a: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 20/47] pwm: keembay: " Uwe Kleine-König
                   ` (27 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-jz4740.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pwm/pwm-jz4740.c b/drivers/pwm/pwm-jz4740.c
index 990e7904c7f1..23dc1fb770e2 100644
--- a/drivers/pwm/pwm-jz4740.c
+++ b/drivers/pwm/pwm-jz4740.c
@@ -245,16 +245,7 @@ static int jz4740_pwm_probe(struct platform_device *pdev)
 	jz4740->chip.ops = &jz4740_pwm_ops;
 	jz4740->chip.npwm = info->num_pwms;
 
-	platform_set_drvdata(pdev, jz4740);
-
-	return pwmchip_add(&jz4740->chip);
-}
-
-static int jz4740_pwm_remove(struct platform_device *pdev)
-{
-	struct jz4740_pwm_chip *jz4740 = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&jz4740->chip);
+	return devm_pwmchip_add(dev, &jz4740->chip);
 }
 
 static const struct soc_info __maybe_unused jz4740_soc_info = {
@@ -280,7 +271,6 @@ static struct platform_driver jz4740_pwm_driver = {
 		.of_match_table = of_match_ptr(jz4740_pwm_dt_ids),
 	},
 	.probe = jz4740_pwm_probe,
-	.remove = jz4740_pwm_remove,
 };
 module_platform_driver(jz4740_pwm_driver);
 
-- 
2.30.2


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

* [PATCH 20/47] pwm: keembay: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (18 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 19/47] pwm: jz4740: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 21/47] pwm: lp3943: " Uwe Kleine-König
                   ` (26 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-keembay.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pwm/pwm-keembay.c b/drivers/pwm/pwm-keembay.c
index 521a825c8ba0..733811b05721 100644
--- a/drivers/pwm/pwm-keembay.c
+++ b/drivers/pwm/pwm-keembay.c
@@ -207,22 +207,13 @@ static int keembay_pwm_probe(struct platform_device *pdev)
 	priv->chip.ops = &keembay_pwm_ops;
 	priv->chip.npwm = KMB_TOTAL_PWM_CHANNELS;
 
-	ret = pwmchip_add(&priv->chip);
+	ret = devm_pwmchip_add(dev, &priv->chip);
 	if (ret)
 		return dev_err_probe(dev, ret, "Failed to add PWM chip\n");
 
-	platform_set_drvdata(pdev, priv);
-
 	return 0;
 }
 
-static int keembay_pwm_remove(struct platform_device *pdev)
-{
-	struct keembay_pwm *priv = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&priv->chip);
-}
-
 static const struct of_device_id keembay_pwm_of_match[] = {
 	{ .compatible = "intel,keembay-pwm" },
 	{ }
@@ -231,7 +222,6 @@ MODULE_DEVICE_TABLE(of, keembay_pwm_of_match);
 
 static struct platform_driver keembay_pwm_driver = {
 	.probe	= keembay_pwm_probe,
-	.remove	= keembay_pwm_remove,
 	.driver	= {
 		.name = "pwm-keembay",
 		.of_match_table = keembay_pwm_of_match,
-- 
2.30.2


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

* [PATCH 21/47] pwm: lp3943: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (19 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 20/47] pwm: keembay: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 22/47] pwm: lpc32xx: " Uwe Kleine-König
                   ` (25 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-lp3943.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pwm/pwm-lp3943.c b/drivers/pwm/pwm-lp3943.c
index 7551253ada32..ea17d446a627 100644
--- a/drivers/pwm/pwm-lp3943.c
+++ b/drivers/pwm/pwm-lp3943.c
@@ -276,16 +276,7 @@ static int lp3943_pwm_probe(struct platform_device *pdev)
 	lp3943_pwm->chip.ops = &lp3943_pwm_ops;
 	lp3943_pwm->chip.npwm = LP3943_NUM_PWMS;
 
-	platform_set_drvdata(pdev, lp3943_pwm);
-
-	return pwmchip_add(&lp3943_pwm->chip);
-}
-
-static int lp3943_pwm_remove(struct platform_device *pdev)
-{
-	struct lp3943_pwm *lp3943_pwm = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&lp3943_pwm->chip);
+	return devm_pwmchip_add(&pdev->dev, &lp3943_pwm->chip);
 }
 
 #ifdef CONFIG_OF
@@ -298,7 +289,6 @@ MODULE_DEVICE_TABLE(of, lp3943_pwm_of_match);
 
 static struct platform_driver lp3943_pwm_driver = {
 	.probe = lp3943_pwm_probe,
-	.remove = lp3943_pwm_remove,
 	.driver = {
 		.name = "lp3943-pwm",
 		.of_match_table = of_match_ptr(lp3943_pwm_of_match),
-- 
2.30.2


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

* [PATCH 22/47] pwm: lpc32xx: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (20 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 21/47] pwm: lp3943: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 23/47] pwm: mediatek: " Uwe Kleine-König
                   ` (24 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-lpc32xx.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pwm/pwm-lpc32xx.c b/drivers/pwm/pwm-lpc32xx.c
index 719e8e913656..ddeab5687cb8 100644
--- a/drivers/pwm/pwm-lpc32xx.c
+++ b/drivers/pwm/pwm-lpc32xx.c
@@ -122,24 +122,15 @@ static int lpc32xx_pwm_probe(struct platform_device *pdev)
 	val &= ~PWM_PIN_LEVEL;
 	writel(val, lpc32xx->base + (lpc32xx->chip.pwms[0].hwpwm << 2));
 
-	ret = pwmchip_add(&lpc32xx->chip);
+	ret = devm_pwmchip_add(&pdev->dev, &lpc32xx->chip);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to add PWM chip, error %d\n", ret);
 		return ret;
 	}
 
-	platform_set_drvdata(pdev, lpc32xx);
-
 	return 0;
 }
 
-static int lpc32xx_pwm_remove(struct platform_device *pdev)
-{
-	struct lpc32xx_pwm_chip *lpc32xx = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&lpc32xx->chip);
-}
-
 static const struct of_device_id lpc32xx_pwm_dt_ids[] = {
 	{ .compatible = "nxp,lpc3220-pwm", },
 	{ /* sentinel */ }
@@ -152,7 +143,6 @@ static struct platform_driver lpc32xx_pwm_driver = {
 		.of_match_table = lpc32xx_pwm_dt_ids,
 	},
 	.probe = lpc32xx_pwm_probe,
-	.remove = lpc32xx_pwm_remove,
 };
 module_platform_driver(lpc32xx_pwm_driver);
 
-- 
2.30.2


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

* [PATCH 23/47] pwm: mediatek: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (21 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 22/47] pwm: lpc32xx: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 24/47] pwm: mxs: " Uwe Kleine-König
                   ` (23 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-mediatek.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c
index b4a31060bcd7..0d4dd80e9f07 100644
--- a/drivers/pwm/pwm-mediatek.c
+++ b/drivers/pwm/pwm-mediatek.c
@@ -253,13 +253,11 @@ static int pwm_mediatek_probe(struct platform_device *pdev)
 		}
 	}
 
-	platform_set_drvdata(pdev, pc);
-
 	pc->chip.dev = &pdev->dev;
 	pc->chip.ops = &pwm_mediatek_ops;
 	pc->chip.npwm = pc->soc->num_pwms;
 
-	ret = pwmchip_add(&pc->chip);
+	ret = devm_pwmchip_add(&pdev->dev, &pc->chip);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
 		return ret;
@@ -268,13 +266,6 @@ static int pwm_mediatek_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int pwm_mediatek_remove(struct platform_device *pdev)
-{
-	struct pwm_mediatek_chip *pc = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&pc->chip);
-}
-
 static const struct pwm_mediatek_of_data mt2712_pwm_data = {
 	.num_pwms = 8,
 	.pwm45_fixup = false,
@@ -335,7 +326,6 @@ static struct platform_driver pwm_mediatek_driver = {
 		.of_match_table = pwm_mediatek_of_match,
 	},
 	.probe = pwm_mediatek_probe,
-	.remove = pwm_mediatek_remove,
 };
 module_platform_driver(pwm_mediatek_driver);
 
-- 
2.30.2


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

* [PATCH 24/47] pwm: mxs: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (22 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 23/47] pwm: mediatek: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 25/47] pwm: ntxec: " Uwe Kleine-König
                   ` (22 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-mxs.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c
index 558dc1de8f5d..766dbc58dad8 100644
--- a/drivers/pwm/pwm-mxs.c
+++ b/drivers/pwm/pwm-mxs.c
@@ -150,24 +150,15 @@ static int mxs_pwm_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(&pdev->dev, ret, "failed to reset PWM\n");
 
-	ret = pwmchip_add(&mxs->chip);
+	ret = devm_pwmchip_add(&pdev->dev, &mxs->chip);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to add pwm chip %d\n", ret);
 		return ret;
 	}
 
-	platform_set_drvdata(pdev, mxs);
-
 	return 0;
 }
 
-static int mxs_pwm_remove(struct platform_device *pdev)
-{
-	struct mxs_pwm_chip *mxs = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&mxs->chip);
-}
-
 static const struct of_device_id mxs_pwm_dt_ids[] = {
 	{ .compatible = "fsl,imx23-pwm", },
 	{ /* sentinel */ }
@@ -180,7 +171,6 @@ static struct platform_driver mxs_pwm_driver = {
 		.of_match_table = mxs_pwm_dt_ids,
 	},
 	.probe = mxs_pwm_probe,
-	.remove = mxs_pwm_remove,
 };
 module_platform_driver(mxs_pwm_driver);
 
-- 
2.30.2


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

* [PATCH 25/47] pwm: ntxec: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (23 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 24/47] pwm: mxs: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 26/47] pwm: pxa: " Uwe Kleine-König
                   ` (21 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-ntxec.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/pwm/pwm-ntxec.c b/drivers/pwm/pwm-ntxec.c
index 29a463b7d63a..ab63b081df53 100644
--- a/drivers/pwm/pwm-ntxec.c
+++ b/drivers/pwm/pwm-ntxec.c
@@ -150,22 +150,12 @@ static int ntxec_pwm_probe(struct platform_device *pdev)
 	priv->ec = ec;
 	priv->dev = &pdev->dev;
 
-	platform_set_drvdata(pdev, priv);
-
 	chip = &priv->chip;
 	chip->dev = &pdev->dev;
 	chip->ops = &ntxec_pwm_ops;
 	chip->npwm = 1;
 
-	return pwmchip_add(chip);
-}
-
-static int ntxec_pwm_remove(struct platform_device *pdev)
-{
-	struct ntxec_pwm *priv = platform_get_drvdata(pdev);
-	struct pwm_chip *chip = &priv->chip;
-
-	return pwmchip_remove(chip);
+	return devm_pwmchip_add(&pdev->dev, chip);
 }
 
 static struct platform_driver ntxec_pwm_driver = {
@@ -173,7 +163,6 @@ static struct platform_driver ntxec_pwm_driver = {
 		.name = "ntxec-pwm",
 	},
 	.probe = ntxec_pwm_probe,
-	.remove = ntxec_pwm_remove,
 };
 module_platform_driver(ntxec_pwm_driver);
 
-- 
2.30.2


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

* [PATCH 26/47] pwm: pxa: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (24 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 25/47] pwm: ntxec: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 27/47] pwm: raspberrypi-poe: " Uwe Kleine-König
                   ` (20 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-pxa.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
index e091a528e33c..a9efdcf839ae 100644
--- a/drivers/pwm/pwm-pxa.c
+++ b/drivers/pwm/pwm-pxa.c
@@ -195,32 +195,21 @@ static int pwm_probe(struct platform_device *pdev)
 	if (IS_ERR(pc->mmio_base))
 		return PTR_ERR(pc->mmio_base);
 
-	ret = pwmchip_add(&pc->chip);
+	ret = devm_pwmchip_add(&pdev->dev, &pc->chip);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
 		return ret;
 	}
 
-	platform_set_drvdata(pdev, pc);
 	return 0;
 }
 
-static int pwm_remove(struct platform_device *pdev)
-{
-	struct pxa_pwm_chip *pc;
-
-	pc = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&pc->chip);
-}
-
 static struct platform_driver pwm_driver = {
 	.driver		= {
 		.name	= "pxa25x-pwm",
 		.of_match_table = pwm_of_match,
 	},
 	.probe		= pwm_probe,
-	.remove		= pwm_remove,
 	.id_table	= pwm_id_table,
 };
 
-- 
2.30.2


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

* [PATCH 27/47] pwm: raspberrypi-poe: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (25 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 26/47] pwm: pxa: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 28/47] pwm: sl28cpld: " Uwe Kleine-König
                   ` (19 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-raspberrypi-poe.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pwm/pwm-raspberrypi-poe.c b/drivers/pwm/pwm-raspberrypi-poe.c
index 043fc32e8be8..579a15240e0a 100644
--- a/drivers/pwm/pwm-raspberrypi-poe.c
+++ b/drivers/pwm/pwm-raspberrypi-poe.c
@@ -166,8 +166,6 @@ static int raspberrypi_pwm_probe(struct platform_device *pdev)
 	rpipwm->chip.base = -1;
 	rpipwm->chip.npwm = RASPBERRYPI_FIRMWARE_PWM_NUM;
 
-	platform_set_drvdata(pdev, rpipwm);
-
 	ret = raspberrypi_pwm_get_property(rpipwm->firmware, RPI_PWM_CUR_DUTY_REG,
 					   &rpipwm->duty_cycle);
 	if (ret) {
@@ -175,14 +173,7 @@ static int raspberrypi_pwm_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	return pwmchip_add(&rpipwm->chip);
-}
-
-static int raspberrypi_pwm_remove(struct platform_device *pdev)
-{
-	struct raspberrypi_pwm *rpipwm = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&rpipwm->chip);
+	return devm_pwmchip_add(dev, &rpipwm->chip);
 }
 
 static const struct of_device_id raspberrypi_pwm_of_match[] = {
@@ -197,7 +188,6 @@ static struct platform_driver raspberrypi_pwm_driver = {
 		.of_match_table = raspberrypi_pwm_of_match,
 	},
 	.probe = raspberrypi_pwm_probe,
-	.remove = raspberrypi_pwm_remove,
 };
 module_platform_driver(raspberrypi_pwm_driver);
 
-- 
2.30.2


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

* [PATCH 28/47] pwm: sl28cpld: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (26 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 27/47] pwm: raspberrypi-poe: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 29/47] pwm: stm32-lp: " Uwe Kleine-König
                   ` (18 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-sl28cpld.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pwm/pwm-sl28cpld.c b/drivers/pwm/pwm-sl28cpld.c
index 7a69c1a0c060..589aeaaa6ac8 100644
--- a/drivers/pwm/pwm-sl28cpld.c
+++ b/drivers/pwm/pwm-sl28cpld.c
@@ -231,9 +231,7 @@ static int sl28cpld_pwm_probe(struct platform_device *pdev)
 	chip->ops = &sl28cpld_pwm_ops;
 	chip->npwm = 1;
 
-	platform_set_drvdata(pdev, priv);
-
-	ret = pwmchip_add(&priv->pwm_chip);
+	ret = devm_pwmchip_add(&pdev->dev, &priv->pwm_chip);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to add PWM chip (%pe)",
 			ERR_PTR(ret));
@@ -243,13 +241,6 @@ static int sl28cpld_pwm_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int sl28cpld_pwm_remove(struct platform_device *pdev)
-{
-	struct sl28cpld_pwm *priv = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&priv->pwm_chip);
-}
-
 static const struct of_device_id sl28cpld_pwm_of_match[] = {
 	{ .compatible = "kontron,sl28cpld-pwm" },
 	{}
@@ -258,7 +249,6 @@ MODULE_DEVICE_TABLE(of, sl28cpld_pwm_of_match);
 
 static struct platform_driver sl28cpld_pwm_driver = {
 	.probe = sl28cpld_pwm_probe,
-	.remove	= sl28cpld_pwm_remove,
 	.driver = {
 		.name = "sl28cpld-pwm",
 		.of_match_table = sl28cpld_pwm_of_match,
-- 
2.30.2


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

* [PATCH 29/47] pwm: stm32-lp: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (27 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 28/47] pwm: sl28cpld: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 30/47] pwm: tiecap: " Uwe Kleine-König
                   ` (17 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-stm32-lp.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c
index e4a10aac354d..3115abb3f52a 100644
--- a/drivers/pwm/pwm-stm32-lp.c
+++ b/drivers/pwm/pwm-stm32-lp.c
@@ -209,7 +209,7 @@ static int stm32_pwm_lp_probe(struct platform_device *pdev)
 	priv->chip.ops = &stm32_pwm_lp_ops;
 	priv->chip.npwm = 1;
 
-	ret = pwmchip_add(&priv->chip);
+	ret = devm_pwmchip_add(&pdev->dev, &priv->chip);
 	if (ret < 0)
 		return ret;
 
@@ -218,13 +218,6 @@ static int stm32_pwm_lp_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int stm32_pwm_lp_remove(struct platform_device *pdev)
-{
-	struct stm32_pwm_lp *priv = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&priv->chip);
-}
-
 static int __maybe_unused stm32_pwm_lp_suspend(struct device *dev)
 {
 	struct stm32_pwm_lp *priv = dev_get_drvdata(dev);
@@ -256,7 +249,6 @@ MODULE_DEVICE_TABLE(of, stm32_pwm_lp_of_match);
 
 static struct platform_driver stm32_pwm_lp_driver = {
 	.probe	= stm32_pwm_lp_probe,
-	.remove	= stm32_pwm_lp_remove,
 	.driver	= {
 		.name = "stm32-pwm-lp",
 		.of_match_table = of_match_ptr(stm32_pwm_lp_of_match),
-- 
2.30.2


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

* [PATCH 30/47] pwm: tiecap: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (28 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 29/47] pwm: stm32-lp: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 31/47] pwm: twl-led: " Uwe Kleine-König
                   ` (16 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

With devm_pwmchip_add() there is no need to explicitly call
pwmchip_remove(), so this call can be dropped from the remove callback.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-tiecap.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
index dec3f1fb150c..85e3db2bff18 100644
--- a/drivers/pwm/pwm-tiecap.c
+++ b/drivers/pwm/pwm-tiecap.c
@@ -256,7 +256,7 @@ static int ecap_pwm_probe(struct platform_device *pdev)
 	if (IS_ERR(pc->mmio_base))
 		return PTR_ERR(pc->mmio_base);
 
-	ret = pwmchip_add(&pc->chip);
+	ret = devm_pwmchip_add(&pdev->dev, &pc->chip);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
 		return ret;
@@ -270,11 +270,9 @@ static int ecap_pwm_probe(struct platform_device *pdev)
 
 static int ecap_pwm_remove(struct platform_device *pdev)
 {
-	struct ecap_pwm_chip *pc = platform_get_drvdata(pdev);
-
 	pm_runtime_disable(&pdev->dev);
 
-	return pwmchip_remove(&pc->chip);
+	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
-- 
2.30.2


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

* [PATCH 31/47] pwm: twl-led: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (29 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 30/47] pwm: tiecap: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 32/47] pwm: twl: " Uwe Kleine-König
                   ` (15 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-twl-led.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/pwm/pwm-twl-led.c b/drivers/pwm/pwm-twl-led.c
index 6c8df5f4e87d..49d9f7a78012 100644
--- a/drivers/pwm/pwm-twl-led.c
+++ b/drivers/pwm/pwm-twl-led.c
@@ -276,7 +276,6 @@ static const struct pwm_ops twl6030_pwmled_ops = {
 static int twl_pwmled_probe(struct platform_device *pdev)
 {
 	struct twl_pwmled_chip *twl;
-	int ret;
 
 	twl = devm_kzalloc(&pdev->dev, sizeof(*twl), GFP_KERNEL);
 	if (!twl)
@@ -294,20 +293,7 @@ static int twl_pwmled_probe(struct platform_device *pdev)
 
 	mutex_init(&twl->mutex);
 
-	ret = pwmchip_add(&twl->chip);
-	if (ret < 0)
-		return ret;
-
-	platform_set_drvdata(pdev, twl);
-
-	return 0;
-}
-
-static int twl_pwmled_remove(struct platform_device *pdev)
-{
-	struct twl_pwmled_chip *twl = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&twl->chip);
+	return devm_pwmchip_add(&pdev->dev, &twl->chip);
 }
 
 #ifdef CONFIG_OF
@@ -325,7 +311,6 @@ static struct platform_driver twl_pwmled_driver = {
 		.of_match_table = of_match_ptr(twl_pwmled_of_match),
 	},
 	.probe = twl_pwmled_probe,
-	.remove = twl_pwmled_remove,
 };
 module_platform_driver(twl_pwmled_driver);
 
-- 
2.30.2


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

* [PATCH 32/47] pwm: twl: Simplify using devm_pwmchip_add()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (30 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 31/47] pwm: twl-led: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 33/47] pwm: atmel-hlcdc: Don't check the return code of pwmchip_remove() Uwe Kleine-König
                   ` (14 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

This allows to drop the platform_driver's remove function. This is the
only user of driver data so this can go away, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-twl.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c
index e83a826bf621..203194f2c92e 100644
--- a/drivers/pwm/pwm-twl.c
+++ b/drivers/pwm/pwm-twl.c
@@ -298,7 +298,6 @@ static const struct pwm_ops twl6030_pwm_ops = {
 static int twl_pwm_probe(struct platform_device *pdev)
 {
 	struct twl_pwm_chip *twl;
-	int ret;
 
 	twl = devm_kzalloc(&pdev->dev, sizeof(*twl), GFP_KERNEL);
 	if (!twl)
@@ -314,20 +313,7 @@ static int twl_pwm_probe(struct platform_device *pdev)
 
 	mutex_init(&twl->mutex);
 
-	ret = pwmchip_add(&twl->chip);
-	if (ret < 0)
-		return ret;
-
-	platform_set_drvdata(pdev, twl);
-
-	return 0;
-}
-
-static int twl_pwm_remove(struct platform_device *pdev)
-{
-	struct twl_pwm_chip *twl = platform_get_drvdata(pdev);
-
-	return pwmchip_remove(&twl->chip);
+	return devm_pwmchip_add(&pdev->dev, &twl->chip);
 }
 
 #ifdef CONFIG_OF
@@ -345,7 +331,6 @@ static struct platform_driver twl_pwm_driver = {
 		.of_match_table = of_match_ptr(twl_pwm_of_match),
 	},
 	.probe = twl_pwm_probe,
-	.remove = twl_pwm_remove,
 };
 module_platform_driver(twl_pwm_driver);
 
-- 
2.30.2


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

* [PATCH 33/47] pwm: atmel-hlcdc: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (31 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 32/47] pwm: twl: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 34/47] pwm: atmel-tcb: " Uwe Kleine-König
                   ` (13 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of atmel_hlcdc_pwm_remove()
and considers the device removed anyhow.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-atmel-hlcdc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/pwm/pwm-atmel-hlcdc.c b/drivers/pwm/pwm-atmel-hlcdc.c
index 4459325d3650..a43b2babc809 100644
--- a/drivers/pwm/pwm-atmel-hlcdc.c
+++ b/drivers/pwm/pwm-atmel-hlcdc.c
@@ -281,11 +281,8 @@ static int atmel_hlcdc_pwm_probe(struct platform_device *pdev)
 static int atmel_hlcdc_pwm_remove(struct platform_device *pdev)
 {
 	struct atmel_hlcdc_pwm *chip = platform_get_drvdata(pdev);
-	int ret;
 
-	ret = pwmchip_remove(&chip->chip);
-	if (ret)
-		return ret;
+	pwmchip_remove(&chip->chip);
 
 	clk_disable_unprepare(chip->hlcdc->periph_clk);
 
-- 
2.30.2


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

* [PATCH 34/47] pwm: atmel-tcb: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (32 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 33/47] pwm: atmel-hlcdc: Don't check the return code of pwmchip_remove() Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 35/47] pwm: brcmstb: " Uwe Kleine-König
                   ` (12 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of atmel_tcb_pwm_remove()
and considers the device removed anyhow. So returning early results in a
resource leak.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-atmel-tcb.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/pwm/pwm-atmel-tcb.c b/drivers/pwm/pwm-atmel-tcb.c
index bf398f21484d..36f7ea381838 100644
--- a/drivers/pwm/pwm-atmel-tcb.c
+++ b/drivers/pwm/pwm-atmel-tcb.c
@@ -503,11 +503,8 @@ static int atmel_tcb_pwm_probe(struct platform_device *pdev)
 static int atmel_tcb_pwm_remove(struct platform_device *pdev)
 {
 	struct atmel_tcb_pwm_chip *tcbpwm = platform_get_drvdata(pdev);
-	int err;
 
-	err = pwmchip_remove(&tcbpwm->chip);
-	if (err < 0)
-		return err;
+	pwmchip_remove(&tcbpwm->chip);
 
 	clk_disable_unprepare(tcbpwm->slow_clk);
 	clk_put(tcbpwm->slow_clk);
-- 
2.30.2


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

* [PATCH 35/47] pwm: brcmstb: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (33 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 34/47] pwm: atmel-tcb: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 36/47] pwm: cros-ec: " Uwe Kleine-König
                   ` (11 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of brcmstb_pwm_remove().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-brcmstb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/pwm/pwm-brcmstb.c b/drivers/pwm/pwm-brcmstb.c
index 8b1d1e7aa856..3b529f82b97c 100644
--- a/drivers/pwm/pwm-brcmstb.c
+++ b/drivers/pwm/pwm-brcmstb.c
@@ -282,12 +282,11 @@ static int brcmstb_pwm_probe(struct platform_device *pdev)
 static int brcmstb_pwm_remove(struct platform_device *pdev)
 {
 	struct brcmstb_pwm *p = platform_get_drvdata(pdev);
-	int ret;
 
-	ret = pwmchip_remove(&p->chip);
+	pwmchip_remove(&p->chip);
 	clk_disable_unprepare(p->clk);
 
-	return ret;
+	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
-- 
2.30.2


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

* [PATCH 36/47] pwm: cros-ec: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (34 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 35/47] pwm: brcmstb: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 37/47] pwm: img: " Uwe Kleine-König
                   ` (10 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of cros_ec_pwm_remove().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-cros-ec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c
index 9fffb566af5f..5e29d9c682c3 100644
--- a/drivers/pwm/pwm-cros-ec.c
+++ b/drivers/pwm/pwm-cros-ec.c
@@ -280,7 +280,9 @@ static int cros_ec_pwm_remove(struct platform_device *dev)
 	struct cros_ec_pwm_device *ec_pwm = platform_get_drvdata(dev);
 	struct pwm_chip *chip = &ec_pwm->chip;
 
-	return pwmchip_remove(chip);
+	pwmchip_remove(chip);
+
+	return 0;
 }
 
 #ifdef CONFIG_OF
-- 
2.30.2


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

* [PATCH 37/47] pwm: img: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (35 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 36/47] pwm: cros-ec: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 38/47] pwm: imx-tpm: " Uwe Kleine-König
                   ` (9 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of pwm_imx_tpm_remove().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-img.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-img.c b/drivers/pwm/pwm-img.c
index 18d8e34d0d08..f97f82548293 100644
--- a/drivers/pwm/pwm-img.c
+++ b/drivers/pwm/pwm-img.c
@@ -331,7 +331,9 @@ static int img_pwm_remove(struct platform_device *pdev)
 	if (!pm_runtime_status_suspended(&pdev->dev))
 		img_pwm_runtime_suspend(&pdev->dev);
 
-	return pwmchip_remove(&pwm_chip->chip);
+	pwmchip_remove(&pwm_chip->chip);
+
+	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
-- 
2.30.2


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

* [PATCH 38/47] pwm: imx-tpm: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (36 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 37/47] pwm: img: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 39/47] pwm: mtk-disp: " Uwe Kleine-König
                   ` (8 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of pwm_imx_tpm_remove().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-imx-tpm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/pwm/pwm-imx-tpm.c b/drivers/pwm/pwm-imx-tpm.c
index dbb50493abdd..e5e7b7c339a8 100644
--- a/drivers/pwm/pwm-imx-tpm.c
+++ b/drivers/pwm/pwm-imx-tpm.c
@@ -382,11 +382,12 @@ static int pwm_imx_tpm_probe(struct platform_device *pdev)
 static int pwm_imx_tpm_remove(struct platform_device *pdev)
 {
 	struct imx_tpm_pwm_chip *tpm = platform_get_drvdata(pdev);
-	int ret = pwmchip_remove(&tpm->chip);
+
+	pwmchip_remove(&tpm->chip);
 
 	clk_disable_unprepare(tpm->clk);
 
-	return ret;
+	return 0;
 }
 
 static int __maybe_unused pwm_imx_tpm_suspend(struct device *dev)
-- 
2.30.2


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

* [PATCH 39/47] pwm: mtk-disp: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (37 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 38/47] pwm: imx-tpm: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 40/47] pwm: omap-dmtimer: " Uwe Kleine-König
                   ` (7 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of mtk_disp_pwm_remove().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-mtk-disp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c
index 9b3ba401a3db..7b4a2b8c2aeb 100644
--- a/drivers/pwm/pwm-mtk-disp.c
+++ b/drivers/pwm/pwm-mtk-disp.c
@@ -237,13 +237,12 @@ static int mtk_disp_pwm_probe(struct platform_device *pdev)
 static int mtk_disp_pwm_remove(struct platform_device *pdev)
 {
 	struct mtk_disp_pwm *mdp = platform_get_drvdata(pdev);
-	int ret;
 
-	ret = pwmchip_remove(&mdp->chip);
+	pwmchip_remove(&mdp->chip);
 	clk_unprepare(mdp->clk_mm);
 	clk_unprepare(mdp->clk_main);
 
-	return ret;
+	return 0;
 }
 
 static const struct mtk_pwm_data mt2701_pwm_data = {
-- 
2.30.2


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

* [PATCH 40/47] pwm: omap-dmtimer: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (38 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 39/47] pwm: mtk-disp: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 41/47] pwm: pca9685: " Uwe Kleine-König
                   ` (6 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of pwm_omap_dmtimer_remove()
and considers the device removed anyhow. So returning early results
in a resource leak.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-omap-dmtimer.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c
index 507a2d945b90..fa800fcf31d4 100644
--- a/drivers/pwm/pwm-omap-dmtimer.c
+++ b/drivers/pwm/pwm-omap-dmtimer.c
@@ -444,11 +444,8 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
 static int pwm_omap_dmtimer_remove(struct platform_device *pdev)
 {
 	struct pwm_omap_dmtimer_chip *omap = platform_get_drvdata(pdev);
-	int ret;
 
-	ret = pwmchip_remove(&omap->chip);
-	if (ret)
-		return ret;
+	pwmchip_remove(&omap->chip);
 
 	if (pm_runtime_active(&omap->dm_timer_pdev->dev))
 		omap->pdata->stop(omap->dm_timer);
-- 
2.30.2


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

* [PATCH 41/47] pwm: pca9685: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (39 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 40/47] pwm: omap-dmtimer: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 42/47] pwm: rcar: " Uwe Kleine-König
                   ` (5 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of pca9685_pwm_remove()
and considers the device removed anyhow. So returning early results
in a resource leak.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-pca9685.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c
index 42ed770b432c..c56001a790d0 100644
--- a/drivers/pwm/pwm-pca9685.c
+++ b/drivers/pwm/pwm-pca9685.c
@@ -601,11 +601,8 @@ static int pca9685_pwm_probe(struct i2c_client *client,
 static int pca9685_pwm_remove(struct i2c_client *client)
 {
 	struct pca9685 *pca = i2c_get_clientdata(client);
-	int ret;
 
-	ret = pwmchip_remove(&pca->chip);
-	if (ret)
-		return ret;
+	pwmchip_remove(&pca->chip);
 
 	if (!pm_runtime_enabled(&client->dev)) {
 		/* Put chip in sleep state if runtime PM is disabled */
-- 
2.30.2


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

* [PATCH 42/47] pwm: rcar: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (40 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 41/47] pwm: pca9685: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 43/47] pwm: renesas-tpu: " Uwe Kleine-König
                   ` (4 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of rcar_pwm_remove().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-rcar.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/pwm/pwm-rcar.c b/drivers/pwm/pwm-rcar.c
index 9daca0c772c7..b437192380e2 100644
--- a/drivers/pwm/pwm-rcar.c
+++ b/drivers/pwm/pwm-rcar.c
@@ -241,13 +241,12 @@ static int rcar_pwm_probe(struct platform_device *pdev)
 static int rcar_pwm_remove(struct platform_device *pdev)
 {
 	struct rcar_pwm_chip *rcar_pwm = platform_get_drvdata(pdev);
-	int ret;
 
-	ret = pwmchip_remove(&rcar_pwm->chip);
+	pwmchip_remove(&rcar_pwm->chip);
 
 	pm_runtime_disable(&pdev->dev);
 
-	return ret;
+	return 0;
 }
 
 static const struct of_device_id rcar_pwm_of_table[] = {
-- 
2.30.2


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

* [PATCH 43/47] pwm: renesas-tpu: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (41 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 42/47] pwm: rcar: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 44/47] pwm: samsung: " Uwe Kleine-König
                   ` (3 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of tpu_remove().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-renesas-tpu.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
index b853e7942605..4381df90a527 100644
--- a/drivers/pwm/pwm-renesas-tpu.c
+++ b/drivers/pwm/pwm-renesas-tpu.c
@@ -425,13 +425,12 @@ static int tpu_probe(struct platform_device *pdev)
 static int tpu_remove(struct platform_device *pdev)
 {
 	struct tpu_device *tpu = platform_get_drvdata(pdev);
-	int ret;
 
-	ret = pwmchip_remove(&tpu->chip);
+	pwmchip_remove(&tpu->chip);
 
 	pm_runtime_disable(&pdev->dev);
 
-	return ret;
+	return 0;
 }
 
 #ifdef CONFIG_OF
-- 
2.30.2


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

* [PATCH 44/47] pwm: samsung: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (42 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 43/47] pwm: renesas-tpu: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 45/47] pwm: sifive: " Uwe Kleine-König
                   ` (2 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of pwm_samsung_remove()
and considers the device removed anyhow. So returning early results
in a resource leak.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-samsung.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c
index f6c528f02d43..dd94c4312a0c 100644
--- a/drivers/pwm/pwm-samsung.c
+++ b/drivers/pwm/pwm-samsung.c
@@ -580,11 +580,8 @@ static int pwm_samsung_probe(struct platform_device *pdev)
 static int pwm_samsung_remove(struct platform_device *pdev)
 {
 	struct samsung_pwm_chip *chip = platform_get_drvdata(pdev);
-	int ret;
 
-	ret = pwmchip_remove(&chip->chip);
-	if (ret < 0)
-		return ret;
+	pwmchip_remove(&chip->chip);
 
 	clk_disable_unprepare(chip->base_clk);
 
-- 
2.30.2


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

* [PATCH 45/47] pwm: sifive: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (43 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 44/47] pwm: samsung: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 46/47] pwm: sun4i: " Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 47/47] pwm: Make pwmchip_remove() return void Uwe Kleine-König
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of pwm_sifive_remove().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-sifive.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c
index 420edc4aa94a..253c4a17d255 100644
--- a/drivers/pwm/pwm-sifive.c
+++ b/drivers/pwm/pwm-sifive.c
@@ -291,7 +291,7 @@ static int pwm_sifive_remove(struct platform_device *dev)
 	struct pwm_sifive_ddata *ddata = platform_get_drvdata(dev);
 	bool is_enabled = false;
 	struct pwm_device *pwm;
-	int ret, ch;
+	int ch;
 
 	for (ch = 0; ch < ddata->chip.npwm; ch++) {
 		pwm = &ddata->chip.pwms[ch];
@@ -304,10 +304,10 @@ static int pwm_sifive_remove(struct platform_device *dev)
 		clk_disable(ddata->clk);
 
 	clk_disable_unprepare(ddata->clk);
-	ret = pwmchip_remove(&ddata->chip);
+	pwmchip_remove(&ddata->chip);
 	clk_notifier_unregister(ddata->clk, &ddata->notifier);
 
-	return ret;
+	return 0;
 }
 
 static const struct of_device_id pwm_sifive_of_match[] = {
-- 
2.30.2


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

* [PATCH 46/47] pwm: sun4i: Don't check the return code of pwmchip_remove()
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (44 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 45/47] pwm: sifive: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  2021-07-07 16:28 ` [PATCH 47/47] pwm: Make pwmchip_remove() return void Uwe Kleine-König
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of sun4i_pwm_remove()
and considers the device removed anyhow. So returning early results
in a resource leak.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-sun4i.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
index c952604e91f3..91ca67651abd 100644
--- a/drivers/pwm/pwm-sun4i.c
+++ b/drivers/pwm/pwm-sun4i.c
@@ -484,11 +484,8 @@ static int sun4i_pwm_probe(struct platform_device *pdev)
 static int sun4i_pwm_remove(struct platform_device *pdev)
 {
 	struct sun4i_pwm_chip *pwm = platform_get_drvdata(pdev);
-	int ret;
 
-	ret = pwmchip_remove(&pwm->chip);
-	if (ret)
-		return ret;
+	pwmchip_remove(&pwm->chip);
 
 	clk_disable_unprepare(pwm->bus_clk);
 	reset_control_assert(pwm->rst);
-- 
2.30.2


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

* [PATCH 47/47] pwm: Make pwmchip_remove() return void
  2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
                   ` (45 preceding siblings ...)
  2021-07-07 16:28 ` [PATCH 46/47] pwm: sun4i: " Uwe Kleine-König
@ 2021-07-07 16:28 ` Uwe Kleine-König
  46 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2021-07-07 16:28 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, kernel

Since some time pwmchip_remove() always returns 0 so the return value
isn't usefull. Now that all callers are converted to ignore its value
the function can be changed to return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/core.c  | 4 +---
 include/linux/pwm.h | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index a28c8639af5b..cb08ebb39051 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -304,7 +304,7 @@ EXPORT_SYMBOL_GPL(pwmchip_add);
  *
  * Returns: 0 on success or a negative error code on failure.
  */
-int pwmchip_remove(struct pwm_chip *chip)
+void pwmchip_remove(struct pwm_chip *chip)
 {
 	pwmchip_sysfs_unexport(chip);
 
@@ -318,8 +318,6 @@ int pwmchip_remove(struct pwm_chip *chip)
 	free_pwms(chip);
 
 	mutex_unlock(&pwm_lock);
-
-	return 0;
 }
 EXPORT_SYMBOL_GPL(pwmchip_remove);
 
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index a0b7e43049d5..725c9b784e60 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -404,7 +404,7 @@ int pwm_set_chip_data(struct pwm_device *pwm, void *data);
 void *pwm_get_chip_data(struct pwm_device *pwm);
 
 int pwmchip_add(struct pwm_chip *chip);
-int pwmchip_remove(struct pwm_chip *chip);
+void pwmchip_remove(struct pwm_chip *chip);
 
 int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip);
 
-- 
2.30.2


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

end of thread, other threads:[~2021-07-07 17:18 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 16:27 [PATCH 00/47] pwm: Make pwmchip_remove return void Uwe Kleine-König
2021-07-07 16:27 ` [PATCH 01/47] pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered Uwe Kleine-König
2021-07-07 16:27 ` [PATCH 02/47] pwm: mxs: " Uwe Kleine-König
2021-07-07 16:27 ` [PATCH 03/47] pwm: img: Don't modify HW state in .remove() callback Uwe Kleine-König
2021-07-07 16:27 ` [PATCH 04/47] pwm: rockchip: " Uwe Kleine-König
2021-07-07 16:27 ` [PATCH 05/47] pwm: stm32-lp: " Uwe Kleine-König
2021-07-07 16:27 ` [PATCH 06/47] pwm: hibvt: Disable the clock only after the PWM was unregistered Uwe Kleine-König
2021-07-07 16:27 ` [PATCH 07/47] pwm: rockchip: Unprepare clocks " Uwe Kleine-König
2021-07-07 16:27 ` [PATCH 08/47] pwm: tiehrpwm: Unprepare clock " Uwe Kleine-König
2021-07-07 16:27 ` [PATCH 09/47] pwm: ntxec: Drop useless assignment to struct pwmchip::base Uwe Kleine-König
2021-07-07 16:27 ` [PATCH 10/47] pwm: jz4740: Improve compile coverage by allowing to enable on !MIPS Uwe Kleine-König
2021-07-07 16:27 ` [PATCH 11/47] pwm: keembay: Improve compile coverage by allowing to enable on !ARM64 Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 12/47] pwm: ab8500: Simplify using devm_pwmchip_add() Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 13/47] pwm: bcm-kona: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 14/47] pwm: ep93xx: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 15/47] pwm: fsl-ftm: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 16/47] pwm: imx27: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 17/47] pwm: intel-lgm: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 18/47] pwm: iqs620a: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 19/47] pwm: jz4740: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 20/47] pwm: keembay: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 21/47] pwm: lp3943: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 22/47] pwm: lpc32xx: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 23/47] pwm: mediatek: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 24/47] pwm: mxs: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 25/47] pwm: ntxec: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 26/47] pwm: pxa: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 27/47] pwm: raspberrypi-poe: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 28/47] pwm: sl28cpld: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 29/47] pwm: stm32-lp: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 30/47] pwm: tiecap: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 31/47] pwm: twl-led: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 32/47] pwm: twl: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 33/47] pwm: atmel-hlcdc: Don't check the return code of pwmchip_remove() Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 34/47] pwm: atmel-tcb: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 35/47] pwm: brcmstb: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 36/47] pwm: cros-ec: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 37/47] pwm: img: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 38/47] pwm: imx-tpm: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 39/47] pwm: mtk-disp: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 40/47] pwm: omap-dmtimer: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 41/47] pwm: pca9685: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 42/47] pwm: rcar: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 43/47] pwm: renesas-tpu: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 44/47] pwm: samsung: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 45/47] pwm: sifive: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 46/47] pwm: sun4i: " Uwe Kleine-König
2021-07-07 16:28 ` [PATCH 47/47] pwm: Make pwmchip_remove() return void Uwe Kleine-König

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).