aboutsummaryrefslogtreecommitdiff
path: root/target/linux/d1/patches-6.1/0061-squash-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-dr.patch
blob: 0eac89797d298d6697847c41867b5c3428c81bd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 2f452dd6047126c42a0ad32ef0f10145c6047d66 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 6 Jun 2021 11:05:20 -0500
Subject: [PATCH 061/117] squash? pwm: sunxi: Add Allwinner SoC PWM controller
 driver

---
 drivers/pwm/Kconfig          | 4 ++--
 drivers/pwm/pwm-sun8i-v536.c | 6 +-----
 2 files changed, 3 insertions(+), 7 deletions(-)

--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -583,11 +583,11 @@ config PWM_SUN4I
 	  will be called pwm-sun4i.
 
 config PWM_SUN8I_V536
-	tristate "Allwinner SUN8I_V536 PWM support"
+	tristate "Allwinner SUN8I V536 enhanced PWM support"
 	depends on ARCH_SUNXI || COMPILE_TEST
 	depends on HAS_IOMEM && COMMON_CLK
 	help
-	  Enhanced PWM framework driver for Allwinner R818, A133, R329,
+	  Enhanced PWM framework driver for Allwinner A133, D1, R329, R818,
 	  V536 and V833 SoCs.
 
 	  To compile this driver as a module, choose M here: the module
--- a/drivers/pwm/pwm-sun8i-v536.c
+++ b/drivers/pwm/pwm-sun8i-v536.c
@@ -373,12 +373,8 @@ err_clk:
 static int sun8i_pwm_remove(struct platform_device *pdev)
 {
 	struct sun8i_pwm_chip *pc = platform_get_drvdata(pdev);
-	int ret;
-
-	ret = pwmchip_remove(&pc->chip);
-	if (ret)
-		return ret;
 
+	pwmchip_remove(&pc->chip);
 	clk_disable_unprepare(pc->clk);
 	reset_control_assert(pc->rst_clk);