OpenCloudOS-Kernel/arch/arm/mach-omap1
Janusz Krzysztofik 5447da5d61 ARM: OMAP1: ams-delta: Fix MODEM initialization failure
Regulator drivers were modified to use asynchronous device probe.  Since
then, the board .init_late hook fails to acquire a GPIO based fixed
regulator needed by an on-board voice MODEM device, and unregisters the
MODEM.  That in turn triggers a so far not discovered bug of device
unregister function called for a device with no associated release() op.

serial8250 serial8250.1: incomplete constraints, dummy supplies not allowed
WARNING: CPU: 0 PID: 1 at drivers/base/core.c:2486 device_release+0x98/0xa8
Device 'serial8250.1' does not have a release() function, it is broken and
 must be fixed. See Documentation/core-api/kobject.rst.
...
put_device from platform_device_put+0x1c/0x24
platform_device_put from ams_delta_init_late+0x4c/0x68
ams_delta_init_late from init_machine_late+0x1c/0x94
init_machine_late from do_one_initcall+0x60/0x1d4

As a consequence, ASoC CODEC driver is no longer able to control its
device over the voice MODEM's tty interface.

cx20442-codec: ASoC: error at soc_component_write_no_lock
 on cx20442-codec for register: [0x00000000] -5
cx20442-codec: ASoC: error at snd_soc_component_update_bits_legacy
 on cx20442-codec for register: [0x00000000] -5
cx20442-codec: ASoC: error at snd_soc_component_update_bits
 on cx20442-codec for register: [0x00000000] -5

The regulator hangs of a GPIO pin controlled by basic-mmio-gpio driver.
Unlike most GPIO drivers, that driver doesn't probe for devices before
device_initcall, then GPIO pins under its control are not availabele to
majority of devices probed at that phase, including regulators.  On the
other hand, serial8250 driver used by the MODEM device neither accepts via
platform data nor handles regulators, then the board file is not able to
teach that driver to return -EPROBE_DEFER when the regulator is not ready
so the failed probe is retried after late_initcall.

Resolve the issue by extending description of the MODEM device with a
dedicated power management domain.  Acquire the regulator from the
domain's .activate hook and return -EPROBE_DEFER if the regulator is not
available.  Having that under control, add the regulator device
description to the list of platform devices initialized from .init_machine
and drop the no longer needed custom .init_late hook.

v2: Trim down the warning for prettier git log output (Tony).

Fixes: 259b93b21a ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14")
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: stable@vger.kernel.org # v6.4+
Message-ID: <20231011175038.1907629-1-jmkrzyszt@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2023-10-13 10:59:48 +03:00
..
Kconfig ARM: omap1: Kconfig: Fix indentation 2023-03-27 09:54:33 +03:00
Makefile ARM: omap1: remove unused board files 2023-01-12 10:53:11 +01:00
ams-delta-fiq-handler.S ARM: omap1: move mach/*.h into mach directory 2022-04-22 11:08:55 +02:00
ams-delta-fiq.c ARM: omap1: move mach/*.h into mach directory 2022-04-22 11:08:55 +02:00
ams-delta-fiq.h ARM: omap1: move mach/*.h into mach directory 2022-04-22 11:08:55 +02:00
board-ams-delta.c ARM: OMAP1: ams-delta: Fix MODEM initialization failure 2023-10-13 10:59:48 +03:00
board-ams-delta.h ARM: OMAP1: ams-delta: Move AMS_DELTA_LATCH2_NGPIO to the board file 2018-11-29 12:05:34 -08:00
board-nokia770.c gpio updates for v6.5 2023-06-29 10:11:10 -07:00
board-osk.c gpio updates for v6.5 2023-06-29 10:11:10 -07:00
board-palmte.c gpio updates for v6.5 2023-06-29 10:11:10 -07:00
board-sx1-mmc.c ARM/mmc: Convert old mmci-omap to GPIO descriptors 2023-05-24 15:01:36 +02:00
board-sx1.c gpio updates for v6.5 2023-06-29 10:11:10 -07:00
board-sx1.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_298.RULE 2022-06-10 14:51:36 +02:00
clock.c ARM: OMAP1: clock: Convert to CCF 2022-06-03 20:48:53 +02:00
clock.h ARM: OMAP1: clock: Convert to CCF 2022-06-03 20:48:53 +02:00
clock_data.c ARM: omap1: remove dead code 2023-01-12 10:53:11 +01:00
common.h ARM: omap1: merge omap1_map_io functions 2023-01-12 10:53:11 +01:00
devices.c ARM: omap1: Exorcise the legacy GPIO header 2023-05-24 15:01:53 +02:00
dma.c ARM: omap1: remove dead code 2023-01-12 10:53:11 +01:00
fb.c ARM: omap: fix missing declaration warnings 2022-04-29 09:53:28 +02:00
flash.c ARM: omap1: move mach/*.h into mach directory 2022-04-22 11:08:55 +02:00
flash.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
gpio15xx.c ARM: omap1: Exorcise the legacy GPIO header 2023-05-24 15:01:53 +02:00
gpio16xx.c ARM: omap1: Exorcise the legacy GPIO header 2023-05-24 15:01:53 +02:00
hardware.h ARM: omap1: remove unused omapxxxx.h headers 2023-01-12 10:53:11 +01:00
i2c.c ARM: omap1: remove dead code 2023-01-12 10:53:11 +01:00
i2c.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
id.c ARM: omap1: move mach/*.h into mach directory 2022-04-22 11:08:55 +02:00
io.c ARM: omap1: merge omap1_map_io functions 2023-01-12 10:53:11 +01:00
iomap.h ARM: OMAP1: Remove relative includes 2012-10-31 15:37:14 -07:00
irq.c gpio updates for v6.5 2023-06-29 10:11:10 -07:00
irqs.h ARM: omap1: remove dead code 2023-01-12 10:53:11 +01:00
mcbsp.c ARM: omap1: remove dead code 2023-01-12 10:53:11 +01:00
mmc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mtd-xip.h ARM: omap1: remove dead code 2023-01-12 10:53:11 +01:00
mux.c ARM: omap1: remove dead code 2023-01-12 10:53:11 +01:00
mux.h ARM: omap1: move mach/*.h into mach directory 2022-04-22 11:08:55 +02:00
ocpi.c ARM: OMAP1: Prepare for conversion of OMAP1 clocks to CCF 2022-04-22 11:08:55 +02:00
omap-dma.c ARM: Convert to platform remove callback returning void 2023-03-17 16:03:57 +01:00
opp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
opp_data.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pm.c arm: omap1: replace printk() with pr_err macro 2023-05-31 08:31:43 +03:00
pm.h ARM: omap1: remove dead code 2023-01-12 10:53:11 +01:00
pm_bus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 1) 2022-06-10 14:51:35 +02:00
reset.c ARM: omap1: move mach/*.h into mach directory 2022-04-22 11:08:55 +02:00
serial.c This removes all usage of global GPIO numbers from 2023-05-26 15:53:46 +02:00
serial.h ARM: omap1: enable multiplatform 2022-06-03 20:48:53 +02:00
sleep.S ARM: omap1: remove dead code 2023-01-12 10:53:11 +01:00
soc.h ARM: omap1: move mach/*.h into mach directory 2022-04-22 11:08:55 +02:00
sram-init.c ARM: omap: Fix checkpatch issues 2023-05-31 08:30:43 +03:00
sram.S ARM: omap1: move mach/*.h into mach directory 2022-04-22 11:08:55 +02:00
sram.h ARM: omap: un-merge plat/sram.c 2022-04-22 11:08:55 +02:00
tc.h ARM: omap1: move mach/*.h into mach directory 2022-04-22 11:08:55 +02:00
time.c ARM: OMAP1: clock: Convert to CCF 2022-06-03 20:48:53 +02:00
timer.c ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init() 2023-01-19 11:57:57 +02:00
timer32k.c ARM: OMAP: timer32K: fix all kernel-doc warnings 2023-10-07 10:43:13 +03:00
usb.c ARM: omap1: remove dead code 2023-01-12 10:53:11 +01:00
usb.h ARM: omap1: move mach/usb.h to include/linux/soc 2022-04-21 15:00:59 +02:00