Re: [PATCH v1] platform/chrome: cros_usbpd_notify: defer probe when parent EC driver isn't ready

From: Tzung-Bi Shih
Date: Thu Oct 02 2025 - 07:32:37 EST


On Fri, Sep 26, 2025 at 08:22:34PM +0000, Jameson Thies wrote:
> @@ -15,6 +16,7 @@
> #define DRV_NAME "cros-usbpd-notify"
> #define DRV_NAME_PLAT_ACPI "cros-usbpd-notify-acpi"
> #define ACPI_DRV_NAME "GOOG0003"
> +#define CREC_DRV_NAME "GOOG0004"

What does CREC stand for?

> @@ -114,8 +117,18 @@ static int cros_usbpd_notify_probe_acpi(struct platform_device *pdev)
> /*
> * We continue even for older devices which don't have the
> * correct device heirarchy, namely, GOOG0003 is a child
> - * of GOOG0004.
> + * of GOOG0004. If GOOG0003 is a child of GOOG0004 and we
> + * can't get a pointer to the Chrome EC device, defer the
> + * probe function.
> */
> + parent_fwnode = fwnode_call_ptr_op(dev->fwnode, get_parent);

Does it make more sense to use fwnode_get_parent()?