Skip to content

Commit 4f83cae

Browse files
lweiss-fairphonegregkh
authored andcommitted
usb: typec: fsa4480: Relax CHIP_ID check
Some FSA4480-compatible chips like the OCP96011 used on Fairphone 5 return 0x00 from the CHIP_ID register. Handle that gracefully and only fail probe when the I2C read has failed. With this the dev_dbg will print 0 but otherwise continue working. [ 0.251581] fsa4480 1-0042: Found FSA4480 v0.0 (Vendor ID = 0) Cc: [email protected] Fixes: e885f5f ("usb: typec: fsa4480: Check if the chip is really there") Signed-off-by: Luca Weiss <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 16f2a21 commit 4f83cae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/typec/mux/fsa4480.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static int fsa4480_probe(struct i2c_client *client)
274274
return dev_err_probe(dev, PTR_ERR(fsa->regmap), "failed to initialize regmap\n");
275275

276276
ret = regmap_read(fsa->regmap, FSA4480_DEVICE_ID, &val);
277-
if (ret || !val)
277+
if (ret)
278278
return dev_err_probe(dev, -ENODEV, "FSA4480 not found\n");
279279

280280
dev_dbg(dev, "Found FSA4480 v%lu.%lu (Vendor ID = %lu)\n",

0 commit comments

Comments
 (0)