diff options
| author | Konrad Dybcio <[email protected]> | 2024-07-29 08:42:58 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-07-31 08:39:34 +0000 |
| commit | e885f5f1f2b43575aa8e4e31404132d77d6663d1 (patch) | |
| tree | 3fdfed7c465241a43e5edd65ec1bea6d821ff1df /scripts/gcc-plugins/randomize_layout_plugin.c | |
| parent | usb: gadget: core: Check for unset descriptor (diff) | |
| download | kernel-e885f5f1f2b43575aa8e4e31404132d77d6663d1.tar.gz kernel-e885f5f1f2b43575aa8e4e31404132d77d6663d1.zip | |
usb: typec: fsa4480: Check if the chip is really there
Currently, the driver will happily register the switch/mux devices, and
so long as the i2c master doesn't complain, the user would never know
there's something wrong.
Add a device id check (based on [1]) and return -ENODEV if the read
fails or returns nonsense.
Checking the value on a Qualcomm SM6115P-based Lenovo Tab P11 tablet,
the ID mentioned in the datasheet does indeed show up:
fsa4480 1-0042: Found FSA4480 v1.1 (Vendor ID = 0)
[1] https://www.onsemi.com/pdf/datasheet/fsa4480-d.pdf
Fixes: 1dc246320c6b ("usb: typec: mux: Add On Semi fsa4480 driver")
Cc: stable <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Konrad Dybcio <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions
