OSDN Git Service

gpio: mvebu: only fail on missing clk if pwm is actually to be used
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 17 Dec 2018 08:43:13 +0000 (09:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 08:51:03 +0000 (09:51 +0100)
commitae247d60588c1e29f05d8b4861e85e59da7d6ae3
treefede43c964064a4162007c69508b1976c55abc0d
parent332fc66790d6b2c4660c17444913dedbc7ba05cd
gpio: mvebu: only fail on missing clk if pwm is actually to be used

[ Upstream commit c8da642d41a6811c21177c9994aa7dc35be67d46 ]

The gpio IP on Armada 370 at offset 0x18180 has neither a clk nor pwm
registers. So there is no need for a clk as the pwm isn't used anyhow.
So only check for the clk in the presence of the pwm registers. This fixes
a failure to probe the gpio driver for the above mentioned gpio device.

Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpio/gpio-mvebu.c