d1: add new target
[openwrt/staging/mans0n.git] / target / linux / d1 / patches-6.1 / 0061-squash-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-dr.patch
1 From 2f452dd6047126c42a0ad32ef0f10145c6047d66 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Sun, 6 Jun 2021 11:05:20 -0500
4 Subject: [PATCH 061/117] squash? pwm: sunxi: Add Allwinner SoC PWM controller
5 driver
6
7 ---
8 drivers/pwm/Kconfig | 4 ++--
9 drivers/pwm/pwm-sun8i-v536.c | 6 +-----
10 2 files changed, 3 insertions(+), 7 deletions(-)
11
12 --- a/drivers/pwm/Kconfig
13 +++ b/drivers/pwm/Kconfig
14 @@ -583,11 +583,11 @@ config PWM_SUN4I
15 will be called pwm-sun4i.
16
17 config PWM_SUN8I_V536
18 - tristate "Allwinner SUN8I_V536 PWM support"
19 + tristate "Allwinner SUN8I V536 enhanced PWM support"
20 depends on ARCH_SUNXI || COMPILE_TEST
21 depends on HAS_IOMEM && COMMON_CLK
22 help
23 - Enhanced PWM framework driver for Allwinner R818, A133, R329,
24 + Enhanced PWM framework driver for Allwinner A133, D1, R329, R818,
25 V536 and V833 SoCs.
26
27 To compile this driver as a module, choose M here: the module
28 --- a/drivers/pwm/pwm-sun8i-v536.c
29 +++ b/drivers/pwm/pwm-sun8i-v536.c
30 @@ -373,12 +373,8 @@ err_clk:
31 static int sun8i_pwm_remove(struct platform_device *pdev)
32 {
33 struct sun8i_pwm_chip *pc = platform_get_drvdata(pdev);
34 - int ret;
35 -
36 - ret = pwmchip_remove(&pc->chip);
37 - if (ret)
38 - return ret;
39
40 + pwmchip_remove(&pc->chip);
41 clk_disable_unprepare(pc->clk);
42 reset_control_assert(pc->rst_clk);
43