[PATCH v3 1/2] soc: imx8m: Probe the SoC driver as platform driver

Marek Vasut marex at denx.de
Sun Sep 29 11:47:36 PDT 2024


On 9/28/24 12:27 AM, Saravana Kannan wrote:

[...]

>>> I'm glad it's working for you, but I think there might still be a race
>>> that you are just lucky enough to not hit. I think you still need to
>>> fix up drivers/base/soc.c to return -EPROBE_DEFER when
>>> soc_device_match() is called but soc_bus_type has no devices
>>> registered. That way any drivers that try to use that API will defer
>>> probe until this device gets to probe.
>>
>> soc_device_match() returns a pointer to soc_device_attribute or NULL, do
>> you have some other function in mind ?
> 
> No, I'm talking about the same function. I'm asking to change it to
> return ERR_PTR(-EPROBE_DEFER) instead
> of NULL if no soc device has been registered yet.
> 
> And you'll also go change all the drivers that use that API and are on
> the IMX boards supported by this soc driver, to handle the
> -EPROBE_DEFER correctly.
> 
> And this error will only get returned for boards that do async probing
> and using a platform device to register the soc device. So it's
> not going to break everyone if you do this change.
It seems the imx8m has no users of this, so I created a local patch, but 
I'll send a V4 of this series first.



More information about the linux-arm-kernel mailing list