lkml.org 
[lkml]   [2022]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] platform/chrome: cros_ec_typec: deferred probe when typec count mismatch
Date
The kernel bootup is much faster with normal mode. In this case,
there is a chance that the cros-ec-typec module get the actual typec
port counts but not accurate from ec before ec is able to setup it.
It will block the HDMI mux function.
Hence, return -EPROBE_DEFER to put the device onto the deferred probe
list when the typec count mismatch between ec and node.

Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com>
---
drivers/platform/chrome/cros_ec_typec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
index 59de4ce01fab..d821501e875c 100644
--- a/drivers/platform/chrome/cros_ec_typec.c
+++ b/drivers/platform/chrome/cros_ec_typec.c
@@ -382,7 +382,7 @@ static int cros_typec_init_ports(struct cros_typec_data *typec)

if (nports > typec->num_ports) {
dev_err(dev, "More ports listed than can be supported.\n");
- return -EINVAL;
+ return -EPROBE_DEFER;
}

/* DT uses "reg" to specify port number. */
--
2.17.1
\
 
 \ /
  Last update: 2023-03-26 23:15    [W:0.165 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site