bus: fsl-mc: return -EPROBE_DEFER when a device is not yet discovered
authorIoana Ciornei <ioana.ciornei@nxp.com>
Fri, 8 Jan 2021 09:07:24 +0000 (11:07 +0200)
committerIoana Ciornei <ciorneiioana@gmail.com>
Mon, 26 Apr 2021 09:22:46 +0000 (12:22 +0300)
commit55466b60c3ea64f8dddd2d92b520f1a118258b4d
treec41982ba4f74bb6b8054d0f56e5f2e835555d714
parentcd210ea553c75d07b68d23ab97fdc5aebcdebd71
bus: fsl-mc: return -EPROBE_DEFER when a device is not yet discovered

The fsl_mc_get_endpoint() should return a pointer to the connected
fsl_mc device, if there is one. By interrogating the MC firmware, we
know if there is an endpoint or not so when the endpoint device is
actually searched on the fsl-mc bus and not found we are hitting the
case in which the device has not been yet discovered by the bus.

Return -EPROBE_DEFER so that callers can differentiate this case.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/bus/fsl-mc/fsl-mc-bus.c