[PATCH 4/4] usb: typec: tcpci_rt1711h: Add enable_pd30_extended_message feature bit to struct rt1711h_chip_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The RT1715 has PD30 extended message compared to RT1711H. Add a feature bit
enable_pd30_extended_message to struct rt1711h_chip_info to enable this
feature only for RT1715.

Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
---
 drivers/usb/typec/tcpm/tcpci_rt1711h.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/typec/tcpm/tcpci_rt1711h.c b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
index 1b1753895ca5..e79cbb344c14 100644
--- a/drivers/usb/typec/tcpm/tcpci_rt1711h.c
+++ b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
@@ -54,6 +54,7 @@
 struct rt1711h_chip_info {
 	u16 did;
 	u32 rxdz_sel;
+	unsigned enable_pd30_extended_message:1;
 };
 
 struct rt1711h_chip {
@@ -110,7 +111,7 @@ static int rt1711h_init(struct tcpci *tcpci, struct tcpci_data *tdata)
 		return ret;
 
 	/* Enable PD30 extended message for RT1715 */
-	if (chip->info->did == RT1715_DID) {
+	if (chip->info->enable_pd30_extended_message) {
 		ret = regmap_update_bits(regmap, RT1711H_RTCTRL8,
 					 RT1711H_ENEXTMSG, RT1711H_ENEXTMSG);
 		if (ret < 0)
@@ -401,6 +402,7 @@ static const struct rt1711h_chip_info rt1711h = {
 static const struct rt1711h_chip_info rt1715 = {
 	.did = RT1715_DID,
 	.rxdz_sel = RT1711H_BMCIO_RXDZSEL,
+	.enable_pd30_extended_message = 1,
 };
 
 static const struct i2c_device_id rt1711h_id[] = {
-- 
2.25.1




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux