linux/drivers
Henning Schild 0cd7777c74 leds: simatic-ipc-leds-gpio: Make sure we have the GPIO providing driver
[ Upstream commit c64964ebee ]

If we register a "leds-gpio" platform device for GPIO pins that do not
exist we get a -EPROBE_DEFER and the probe will be tried again later.
If there is no driver to provide that pin we will poll forever and also
create a lot of log messages.

So check if that GPIO driver is configured, if so it will come up
eventually. If not, we exit our probe function early and do not even
bother registering the "leds-gpio". This method was chosen over "Kconfig
depends" since this way we can add support for more devices and GPIO
backends more easily without "depends":ing on all GPIO backends.

Fixes: a6c80bec3c ("leds: simatic-ipc-leds-gpio: Add GPIO version of Siemens driver")
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221007153323.1326-1-henning.schild@siemens.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:33:26 +01:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base regmap: apply reg_base and reg_downshift for single register ops 2023-03-10 09:33:19 +01:00
bcma
block
bluetooth
bus
cdrom
char
clk
clocksource
comedi
connector
counter
cpufreq
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fpga
fsi
gnss
gpio
gpu drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt() 2023-03-10 09:33:24 +01:00
greybus
hid hid: bigben_probe(): validate report count 2023-03-10 09:33:23 +01:00
hsi
hte
hv
hwmon hwmon: (mlxreg-fan) Return zero speed for broken fan 2023-03-10 09:33:22 +01:00
hwspinlock
hwtracing
i2c
i3c
idle
iio
infiniband
input
interconnect
iommu
ipack
irqchip
isdn
leds leds: simatic-ipc-leds-gpio: Make sure we have the GPIO providing driver 2023-03-10 09:33:26 +01:00
macintosh
mailbox
mcb
md dm: remove flush_scheduled_work() during local_exit() 2023-03-10 09:33:22 +01:00
media
memory
memstick
message
mfd
misc
mmc
most
mtd
mux
net
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
parisc
parport
pci
pcmcia
peci
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: tps65219: use generic set_bypass() 2023-03-10 09:33:19 +01:00
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi scsi: aic94xx: Add missing check for dma_map_single() 2023-03-10 09:33:20 +01:00
sh
siox
slimbus
soc
soundwire
spi spi: synquacer: Fix timeout handling in synquacer_spi_transfer_one() 2023-03-10 09:33:23 +01:00
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt
tty
ufs
uio
usb
vdpa
vfio
vhost
video
virt
virtio
vlynq
w1
watchdog
xen
zorro
Kconfig
Makefile