Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: typec: tcpm: Add vid and chip info for Etek ET7304

Move VID field to chip info to accommodate different VIDs.
Add chip info for Etek Micro ET7304. ET7304 is functionally
identical to the Richtek RT1715, with the only difference
being the VID.

Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260220-et7304-v3-2-ede2d9634957@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Yuanshen Cao and committed by
Greg Kroah-Hartman
ec53fe37 cd763789

+15 -1
+15 -1
drivers/usb/typec/tcpm/tcpci_rt1711h.c
··· 19 19 #include <linux/regulator/consumer.h> 20 20 21 21 #define RT1711H_VID 0x29CF 22 + #define ET7304_VID 0x6DCF 22 23 #define RT1711H_PID 0x1711 23 24 #define RT1711H_DID 0x2171 24 25 #define RT1715_DID 0x2173 26 + #define ET7304_DID 0x2173 25 27 26 28 #define RT1711H_PHYCTRL1 0x80 27 29 #define RT1711H_PHYCTRL2 0x81 ··· 57 55 58 56 struct rt1711h_chip_info { 59 57 u32 rxdz_sel; 58 + u16 vid; 60 59 u16 did; 61 60 bool enable_pd30_extended_message; 62 61 }; ··· 311 308 ret = i2c_smbus_read_word_data(i2c, TCPC_VENDOR_ID); 312 309 if (ret < 0) 313 310 return ret; 314 - if (ret != RT1711H_VID) { 311 + if (ret != chip->info->vid) { 315 312 dev_err(&i2c->dev, "vid is not correct, 0x%04x\n", ret); 316 313 return -ENODEV; 317 314 } ··· 408 405 tcpci_unregister_port(chip->tcpci); 409 406 } 410 407 408 + static const struct rt1711h_chip_info et7304 = { 409 + .rxdz_sel = RT1711H_BMCIO_RXDZSEL, 410 + .vid = ET7304_VID, 411 + .did = ET7304_DID, 412 + .enable_pd30_extended_message = true, 413 + }; 414 + 411 415 static const struct rt1711h_chip_info rt1711h = { 416 + .vid = RT1711H_VID, 412 417 .did = RT1711H_DID, 413 418 }; 414 419 415 420 static const struct rt1711h_chip_info rt1715 = { 416 421 .rxdz_sel = RT1711H_BMCIO_RXDZSEL, 422 + .vid = RT1711H_VID, 417 423 .did = RT1715_DID, 418 424 .enable_pd30_extended_message = true, 419 425 }; 420 426 421 427 static const struct i2c_device_id rt1711h_id[] = { 428 + { "et7304", (kernel_ulong_t)&et7304 }, 422 429 { "rt1711h", (kernel_ulong_t)&rt1711h }, 423 430 { "rt1715", (kernel_ulong_t)&rt1715 }, 424 431 {} ··· 436 423 MODULE_DEVICE_TABLE(i2c, rt1711h_id); 437 424 438 425 static const struct of_device_id rt1711h_of_match[] = { 426 + { .compatible = "etekmicro,et7304", .data = &et7304 }, 439 427 { .compatible = "richtek,rt1711h", .data = &rt1711h }, 440 428 { .compatible = "richtek,rt1715", .data = &rt1715 }, 441 429 {}