ASoC: Intel: bytcr_wm5102: Fix GPIO related probe-ordering problem
authorHans de Goede <hdegoede@redhat.com>
Sun, 12 Jun 2022 15:56:52 +0000 (17:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:38 +0000 (21:24 +0200)
commitbc90670626006f172e1ca0ee241c5d9b0a06d051
treeb56ba51963f2ee10cc53b6a6e3957f19cd04869a
parentdd70da2a5816821ab4bd22313ad8d22cfa16aeba
ASoC: Intel: bytcr_wm5102: Fix GPIO related probe-ordering problem

[ Upstream commit 4e07479eab8a044cc9542414ccb4aeb8eb033bde ]

The "wlf,spkvdd-ena" GPIO needed by the bytcr_wm5102 driver
is made available through a gpio-lookup table.

This gpio-lookup table is registered by drivers/mfd/arizona-spi.c, which
may get probed after the bytcr_wm5102 driver.

If the gpio-lookup table has not registered yet then the gpiod_get()
will return -ENOENT. Treat -ENOENT as -EPROBE_DEFER to still keep
things working in this case.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220612155652.107310-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/intel/boards/bytcr_wm5102.c