aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-09-30 08:30:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-09-30 08:30:10 -0700
commit89e10b860cbf8015dd77aaa90839fb0ef65e0619 (patch)
treef91e2478387f6f852161a0c5e595d9cfe6bd470c
parent5a77386984b513ebfb2700e70dac44509fc81aa9 (diff)
parent4335417da2b8d6d9b2d4411b5f9e248e5bb2d380 (diff)
downloadlinux-sgx-89e10b860cbf8015dd77aaa90839fb0ef65e0619.tar.gz
Merge tag 'gpio-fixes-for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski: "One more fix for the upcoming release: - fix the check for pwm support on non-A8K platforms in gpio-mvebu" * tag 'gpio-fixes-for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: mvebu: Fix check for pwm support on non-A8K platforms
-rw-r--r--drivers/gpio/gpio-mvebu.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index aa126ab80f0ccc..1bb317b8dcceac 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -790,8 +790,12 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
u32 offset;
u32 set;
- if (of_device_is_compatible(mvchip->chip.of_node,
- "marvell,armada-370-gpio")) {
+ if (mvchip->soc_variant == MVEBU_GPIO_SOC_VARIANT_A8K) {
+ int ret = of_property_read_u32(dev->of_node,
+ "marvell,pwm-offset", &offset);
+ if (ret < 0)
+ return 0;
+ } else {
/*
* There are only two sets of PWM configuration registers for
* all the GPIO lines on those SoCs which this driver reserves
@@ -801,13 +805,6 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
if (!platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwm"))
return 0;
offset = 0;
- } else if (mvchip->soc_variant == MVEBU_GPIO_SOC_VARIANT_A8K) {
- int ret = of_property_read_u32(dev->of_node,
- "marvell,pwm-offset", &offset);
- if (ret < 0)
- return 0;
- } else {
- return 0;
}
if (IS_ERR(mvchip->clk))