linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support
@ 2020-08-18  6:57 Ramuthevar,Vadivel MuruganX
  2020-08-18  6:57 ` [PATCH v1 1/9] extcon: extcon-ptn5150: Switch to GENMASK() for vendor and device ID's Ramuthevar,Vadivel MuruganX
                   ` (9 more replies)
  0 siblings, 10 replies; 26+ messages in thread
From: Ramuthevar,Vadivel MuruganX @ 2020-08-18  6:57 UTC (permalink / raw)
  To: linux-kernel, myungjoo.ham, cw00.choi
  Cc: andriy.shevchenko, thomas.langer, cheol.yong.kim, qi-ming.wu,
	yin1.li, Ramuthevar,Vadivel MuruganX

USB external connector chip PTN5150 used on the Intel LGM SoC
boards to detect the USB type and connection.
---
v1:
  - Initial version

Ramuthevar Vadivel Murugan (9):
  extcon: extcon-ptn5150: Switch to GENMASK() for vendor and device ID's
  extcon: extcon-ptn5150: Switch to GENMASK() for VBUS detection macro
  extcon: extcon-ptn5150: Switch to BIT() macro for cable attach
  extcon: extcon-ptn5150: Switch to BIT() for cable detach macro
  extcon: extcon-ptn5150: Switch to GENMASK() for port attachment macro
  extcon: extcon-ptn5150: Set and get the VBUS and POLARITY property
    state
  extcon: extcon-ptn5150: Add USB debug accessory support
  extcon: extcon-ptn5150: Add USB analog audio accessory support
  extcon: extcon-ptn5150: Remove unused variable and extra space

 drivers/extcon/extcon-ptn5150.c | 135 ++++++++++++++++++++++++----------------
 1 file changed, 82 insertions(+), 53 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v1 1/9] extcon: extcon-ptn5150: Switch to GENMASK() for vendor and device ID's
  2020-08-18  6:57 [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Ramuthevar,Vadivel MuruganX
@ 2020-08-18  6:57 ` Ramuthevar,Vadivel MuruganX
  2020-08-26  6:57   ` Krzysztof Kozlowski
  2020-08-18  6:57 ` [PATCH v1 2/9] extcon: extcon-ptn5150: Switch to GENMASK() for VBUS detection macro Ramuthevar,Vadivel MuruganX
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Ramuthevar,Vadivel MuruganX @ 2020-08-18  6:57 UTC (permalink / raw)
  To: linux-kernel, myungjoo.ham, cw00.choi
  Cc: andriy.shevchenko, thomas.langer, cheol.yong.kim, qi-ming.wu,
	yin1.li, Ramuthevar Vadivel Murugan

From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>

Switch to GENMASK() for vendor_id and device_id macros.

Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
---
 drivers/extcon/extcon-ptn5150.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
index d1c997599390..5d9a8767646b 100644
--- a/drivers/extcon/extcon-ptn5150.c
+++ b/drivers/extcon/extcon-ptn5150.c
@@ -6,6 +6,7 @@
 // Copyright (c) 2018-2019 by Vijai Kumar K
 // Author: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
 
+#include <linux/bitfield.h>
 #include <linux/err.h>
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
@@ -34,13 +35,8 @@ enum ptn5150_reg {
 #define PTN5150_UFP_ATTACHED			0x2
 
 /* Define PTN5150 MASK/SHIFT constant */
-#define PTN5150_REG_DEVICE_ID_VENDOR_SHIFT	0
-#define PTN5150_REG_DEVICE_ID_VENDOR_MASK	\
-	(0x3 << PTN5150_REG_DEVICE_ID_VENDOR_SHIFT)
-
-#define PTN5150_REG_DEVICE_ID_VERSION_SHIFT	3
-#define PTN5150_REG_DEVICE_ID_VERSION_MASK	\
-	(0x1f << PTN5150_REG_DEVICE_ID_VERSION_SHIFT)
+#define PTN5150_REG_DEVICE_ID_VERSION		GENMASK(7, 3)
+#define PTN5150_REG_DEVICE_ID_VENDOR		GENMASK(2, 0)
 
 #define PTN5150_REG_CC_PORT_ATTACHMENT_SHIFT	2
 #define PTN5150_REG_CC_PORT_ATTACHMENT_MASK	\
@@ -194,10 +190,8 @@ static int ptn5150_init_dev_type(struct ptn5150_info *info)
 		return -EINVAL;
 	}
 
-	vendor_id = ((reg_data & PTN5150_REG_DEVICE_ID_VENDOR_MASK) >>
-				PTN5150_REG_DEVICE_ID_VENDOR_SHIFT);
-	version_id = ((reg_data & PTN5150_REG_DEVICE_ID_VERSION_MASK) >>
-				PTN5150_REG_DEVICE_ID_VERSION_SHIFT);
+	vendor_id = FIELD_GET(PTN5150_REG_DEVICE_ID_VENDOR, reg_data);
+	version_id = FIELD_GET(PTN5150_REG_DEVICE_ID_VERSION, reg_data);
 
 	dev_info(info->dev, "Device type: version: 0x%x, vendor: 0x%x\n",
 			    version_id, vendor_id);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 2/9] extcon: extcon-ptn5150: Switch to GENMASK() for VBUS detection macro
  2020-08-18  6:57 [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Ramuthevar,Vadivel MuruganX
  2020-08-18  6:57 ` [PATCH v1 1/9] extcon: extcon-ptn5150: Switch to GENMASK() for vendor and device ID's Ramuthevar,Vadivel MuruganX
@ 2020-08-18  6:57 ` Ramuthevar,Vadivel MuruganX
  2020-08-26  6:59   ` Krzysztof Kozlowski
  2020-08-18  6:57 ` [PATCH v1 3/9] extcon: extcon-ptn5150: Switch to BIT() macro for cable attach Ramuthevar,Vadivel MuruganX
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Ramuthevar,Vadivel MuruganX @ 2020-08-18  6:57 UTC (permalink / raw)
  To: linux-kernel, myungjoo.ham, cw00.choi
  Cc: andriy.shevchenko, thomas.langer, cheol.yong.kim, qi-ming.wu,
	yin1.li, Ramuthevar Vadivel Murugan

From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>

Switch to GENMASK() for VBUS detection macro.

Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
---
 drivers/extcon/extcon-ptn5150.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
index 5d9a8767646b..c816a6c1e05c 100644
--- a/drivers/extcon/extcon-ptn5150.c
+++ b/drivers/extcon/extcon-ptn5150.c
@@ -42,9 +42,7 @@ enum ptn5150_reg {
 #define PTN5150_REG_CC_PORT_ATTACHMENT_MASK	\
 	(0x7 << PTN5150_REG_CC_PORT_ATTACHMENT_SHIFT)
 
-#define PTN5150_REG_CC_VBUS_DETECTION_SHIFT	7
-#define PTN5150_REG_CC_VBUS_DETECTION_MASK	\
-	(0x1 << PTN5150_REG_CC_VBUS_DETECTION_SHIFT)
+#define PTN5150_REG_CC_VBUS_DETECTION		BIT(7)
 
 #define PTN5150_REG_INT_CABLE_ATTACH_SHIFT	0
 #define PTN5150_REG_INT_CABLE_ATTACH_MASK	\
@@ -130,9 +128,8 @@ static void ptn5150_irq_work(struct work_struct *work)
 			case PTN5150_UFP_ATTACHED:
 				extcon_set_state_sync(info->edev, EXTCON_USB,
 						false);
-				vbus = ((reg_data &
-					PTN5150_REG_CC_VBUS_DETECTION_MASK) >>
-					PTN5150_REG_CC_VBUS_DETECTION_SHIFT);
+				vbus = FIELD_GET(PTN5150_REG_CC_VBUS_DETECTION,
+						 reg_data);
 				if (vbus)
 					gpiod_set_value(info->vbus_gpiod, 0);
 				else
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 3/9] extcon: extcon-ptn5150: Switch to BIT() macro for cable attach
  2020-08-18  6:57 [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Ramuthevar,Vadivel MuruganX
  2020-08-18  6:57 ` [PATCH v1 1/9] extcon: extcon-ptn5150: Switch to GENMASK() for vendor and device ID's Ramuthevar,Vadivel MuruganX
  2020-08-18  6:57 ` [PATCH v1 2/9] extcon: extcon-ptn5150: Switch to GENMASK() for VBUS detection macro Ramuthevar,Vadivel MuruganX
@ 2020-08-18  6:57 ` Ramuthevar,Vadivel MuruganX
  2020-08-26  6:59   ` Krzysztof Kozlowski
  2020-08-18  6:57 ` [PATCH v1 4/9] extcon: extcon-ptn5150: Switch to BIT() for cable detach macro Ramuthevar,Vadivel MuruganX
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Ramuthevar,Vadivel MuruganX @ 2020-08-18  6:57 UTC (permalink / raw)
  To: linux-kernel, myungjoo.ham, cw00.choi
  Cc: andriy.shevchenko, thomas.langer, cheol.yong.kim, qi-ming.wu,
	yin1.li, Ramuthevar Vadivel Murugan

From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>

Switch to BIT() macro for the cable attach.

Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
---
 drivers/extcon/extcon-ptn5150.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
index c816a6c1e05c..fab862d9aad8 100644
--- a/drivers/extcon/extcon-ptn5150.c
+++ b/drivers/extcon/extcon-ptn5150.c
@@ -44,9 +44,7 @@ enum ptn5150_reg {
 
 #define PTN5150_REG_CC_VBUS_DETECTION		BIT(7)
 
-#define PTN5150_REG_INT_CABLE_ATTACH_SHIFT	0
-#define PTN5150_REG_INT_CABLE_ATTACH_MASK	\
-	(0x1 << PTN5150_REG_INT_CABLE_ATTACH_SHIFT)
+#define PTN5150_REG_INT_CABLE_ATTACH_MASK	BIT(0)
 
 #define PTN5150_REG_INT_CABLE_DETACH_SHIFT	1
 #define PTN5150_REG_INT_CABLE_DETACH_MASK	\
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 4/9] extcon: extcon-ptn5150: Switch to BIT() for cable detach macro
  2020-08-18  6:57 [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Ramuthevar,Vadivel MuruganX
                   ` (2 preceding siblings ...)
  2020-08-18  6:57 ` [PATCH v1 3/9] extcon: extcon-ptn5150: Switch to BIT() macro for cable attach Ramuthevar,Vadivel MuruganX
@ 2020-08-18  6:57 ` Ramuthevar,Vadivel MuruganX
  2020-08-26  7:00   ` Krzysztof Kozlowski
  2020-08-18  6:57 ` [PATCH v1 5/9] extcon: extcon-ptn5150: Switch to GENMASK() for port attachment macro Ramuthevar,Vadivel MuruganX
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Ramuthevar,Vadivel MuruganX @ 2020-08-18  6:57 UTC (permalink / raw)
  To: linux-kernel, myungjoo.ham, cw00.choi
  Cc: andriy.shevchenko, thomas.langer, cheol.yong.kim, qi-ming.wu,
	yin1.li, Ramuthevar Vadivel Murugan

From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>

Switch to BIT() macro for the cable detach.

Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
---
 drivers/extcon/extcon-ptn5150.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
index fab862d9aad8..50fff148b772 100644
--- a/drivers/extcon/extcon-ptn5150.c
+++ b/drivers/extcon/extcon-ptn5150.c
@@ -45,10 +45,7 @@ enum ptn5150_reg {
 #define PTN5150_REG_CC_VBUS_DETECTION		BIT(7)
 
 #define PTN5150_REG_INT_CABLE_ATTACH_MASK	BIT(0)
-
-#define PTN5150_REG_INT_CABLE_DETACH_SHIFT	1
-#define PTN5150_REG_INT_CABLE_DETACH_MASK	\
-	(0x1 << PTN5150_REG_CC_CABLE_DETACH_SHIFT)
+#define PTN5150_REG_INT_CABLE_DETACH_MASK	BIT(1)
 
 struct ptn5150_info {
 	struct device *dev;
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 5/9] extcon: extcon-ptn5150: Switch to GENMASK() for port attachment macro
  2020-08-18  6:57 [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Ramuthevar,Vadivel MuruganX
                   ` (3 preceding siblings ...)
  2020-08-18  6:57 ` [PATCH v1 4/9] extcon: extcon-ptn5150: Switch to BIT() for cable detach macro Ramuthevar,Vadivel MuruganX
@ 2020-08-18  6:57 ` Ramuthevar,Vadivel MuruganX
  2020-08-26  7:00   ` Krzysztof Kozlowski
  2020-08-18  6:57 ` [PATCH v1 6/9] extcon: extcon-ptn5150: Set and get the VBUS and POLARITY property state Ramuthevar,Vadivel MuruganX
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Ramuthevar,Vadivel MuruganX @ 2020-08-18  6:57 UTC (permalink / raw)
  To: linux-kernel, myungjoo.ham, cw00.choi
  Cc: andriy.shevchenko, thomas.langer, cheol.yong.kim, qi-ming.wu,
	yin1.li, Ramuthevar Vadivel Murugan

From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>

Switch to GENMASK() macro for the port attachment.

Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
---
 drivers/extcon/extcon-ptn5150.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
index 50fff148b772..31b7cbf1551d 100644
--- a/drivers/extcon/extcon-ptn5150.c
+++ b/drivers/extcon/extcon-ptn5150.c
@@ -38,9 +38,7 @@ enum ptn5150_reg {
 #define PTN5150_REG_DEVICE_ID_VERSION		GENMASK(7, 3)
 #define PTN5150_REG_DEVICE_ID_VENDOR		GENMASK(2, 0)
 
-#define PTN5150_REG_CC_PORT_ATTACHMENT_SHIFT	2
-#define PTN5150_REG_CC_PORT_ATTACHMENT_MASK	\
-	(0x7 << PTN5150_REG_CC_PORT_ATTACHMENT_SHIFT)
+#define PTN5150_REG_CC_PORT_ATTACHMENT		GENMASK(4, 2)
 
 #define PTN5150_REG_CC_VBUS_DETECTION		BIT(7)
 
@@ -108,9 +106,8 @@ static void ptn5150_irq_work(struct work_struct *work)
 			unsigned int port_status;
 			unsigned int vbus;
 
-			port_status = ((reg_data &
-					PTN5150_REG_CC_PORT_ATTACHMENT_MASK) >>
-					PTN5150_REG_CC_PORT_ATTACHMENT_SHIFT);
+			port_status = FIELD_GET(PTN5150_REG_CC_PORT_ATTACHMENT,
+						reg_data);
 
 			switch (port_status) {
 			case PTN5150_DFP_ATTACHED:
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 6/9] extcon: extcon-ptn5150: Set and get the VBUS and POLARITY property state
  2020-08-18  6:57 [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Ramuthevar,Vadivel MuruganX
                   ` (4 preceding siblings ...)
  2020-08-18  6:57 ` [PATCH v1 5/9] extcon: extcon-ptn5150: Switch to GENMASK() for port attachment macro Ramuthevar,Vadivel MuruganX
@ 2020-08-18  6:57 ` Ramuthevar,Vadivel MuruganX
  2020-08-18  6:57 ` [PATCH v1 7/9] extcon: extcon-ptn5150: Add USB debug accessory support Ramuthevar,Vadivel MuruganX
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: Ramuthevar,Vadivel MuruganX @ 2020-08-18  6:57 UTC (permalink / raw)
  To: linux-kernel, myungjoo.ham, cw00.choi
  Cc: andriy.shevchenko, thomas.langer, cheol.yong.kim, qi-ming.wu,
	yin1.li, Ramuthevar Vadivel Murugan

From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>

Set and get the VBUS and POLARITY property state.

Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
---
 drivers/extcon/extcon-ptn5150.c | 75 ++++++++++++++++++++++++++++++-----------
 1 file changed, 55 insertions(+), 20 deletions(-)

diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
index 31b7cbf1551d..5612dc0ef2af 100644
--- a/drivers/extcon/extcon-ptn5150.c
+++ b/drivers/extcon/extcon-ptn5150.c
@@ -64,6 +64,12 @@ static const unsigned int ptn5150_extcon_cable[] = {
 	EXTCON_NONE,
 };
 
+enum {
+	POLARITY_NC,
+	POLARITY_CC1,
+	POLARITY_CC2,
+};
+
 static const struct regmap_config ptn5150_regmap_config = {
 	.reg_bits	= 8,
 	.val_bits	= 8,
@@ -74,9 +80,14 @@ static void ptn5150_irq_work(struct work_struct *work)
 {
 	struct ptn5150_info *info = container_of(work,
 			struct ptn5150_info, irq_work);
-	int ret = 0;
+	int ret = 0, x = 0;
 	unsigned int reg_data;
 	unsigned int int_status;
+	union extcon_property_value vbus_detected;
+	union extcon_property_value flipped;
+	bool host_vbus = false;
+	bool host = false;
+	bool dev = false;
 
 	if (!info->edev)
 		return;
@@ -90,6 +101,11 @@ static void ptn5150_irq_work(struct work_struct *work)
 		return;
 	}
 
+	dev_dbg(info->dev, "CC POLARITY status:%x\n", reg_data);
+	x = FIELD_GET(PTN5150_REG_INT_CABLE_ATTACH_MASK, reg_data);
+	flipped.intval = (x == POLARITY_CC2);
+	vbus_detected.intval = !!(reg_data & PTN5150_REG_CC_VBUS_DETECTION);
+
 	/* Clear interrupt. Read would clear the register */
 	ret = regmap_read(info->regmap, PTN5150_REG_INT_STATUS, &int_status);
 	if (ret) {
@@ -111,6 +127,7 @@ static void ptn5150_irq_work(struct work_struct *work)
 
 			switch (port_status) {
 			case PTN5150_DFP_ATTACHED:
+				dev = true;
 				extcon_set_state_sync(info->edev,
 						EXTCON_USB_HOST, false);
 				gpiod_set_value(info->vbus_gpiod, 0);
@@ -118,6 +135,8 @@ static void ptn5150_irq_work(struct work_struct *work)
 						true);
 				break;
 			case PTN5150_UFP_ATTACHED:
+				host_vbus = !vbus_detected.intval;
+				host = true;
 				extcon_set_state_sync(info->edev, EXTCON_USB,
 						false);
 				vbus = FIELD_GET(PTN5150_REG_CC_VBUS_DETECTION,
@@ -127,6 +146,9 @@ static void ptn5150_irq_work(struct work_struct *work)
 				else
 					gpiod_set_value(info->vbus_gpiod, 1);
 
+				extcon_set_property(info->edev, EXTCON_USB_HOST,
+						    EXTCON_PROP_USB_TYPEC_POLARITY,
+						    flipped);
 				extcon_set_state_sync(info->edev,
 						EXTCON_USB_HOST, true);
 				break;
@@ -145,6 +167,8 @@ static void ptn5150_irq_work(struct work_struct *work)
 		}
 	}
 
+	if (host_vbus)
+		gpiod_set_value(info->vbus_gpiod, host_vbus);
 	/* Clear interrupt. Read would clear the register */
 	ret = regmap_read(info->regmap, PTN5150_REG_INT_REG_STATUS,
 			&int_status);
@@ -155,6 +179,11 @@ static void ptn5150_irq_work(struct work_struct *work)
 		return;
 	}
 
+	extcon_set_property(info->edev, host ? EXTCON_USB_HOST : EXTCON_USB,
+			    EXTCON_PROP_USB_VBUS, vbus_detected);
+	extcon_set_state_sync(info->edev, EXTCON_USB_HOST, host);
+	extcon_set_state_sync(info->edev, EXTCON_USB, dev);
+
 	mutex_unlock(&info->mutex);
 }
 
@@ -227,7 +256,7 @@ static int ptn5150_i2c_probe(struct i2c_client *i2c,
 		dev_err(dev, "failed to get INT GPIO\n");
 		return PTR_ERR(info->int_gpiod);
 	}
-	info->vbus_gpiod = devm_gpiod_get(&i2c->dev, "vbus", GPIOD_IN);
+	info->vbus_gpiod = devm_gpiod_get_optional(&i2c->dev, "vbus", GPIOD_IN);
 	if (IS_ERR(info->vbus_gpiod)) {
 		dev_err(dev, "failed to get VBUS GPIO\n");
 		return PTR_ERR(info->vbus_gpiod);
@@ -250,24 +279,6 @@ static int ptn5150_i2c_probe(struct i2c_client *i2c,
 		return ret;
 	}
 
-	if (info->int_gpiod) {
-		info->irq = gpiod_to_irq(info->int_gpiod);
-		if (info->irq < 0) {
-			dev_err(dev, "failed to get INTB IRQ\n");
-			return info->irq;
-		}
-
-		ret = devm_request_threaded_irq(dev, info->irq, NULL,
-						ptn5150_irq_handler,
-						IRQF_TRIGGER_FALLING |
-						IRQF_ONESHOT,
-						i2c->name, info);
-		if (ret < 0) {
-			dev_err(dev, "failed to request handler for INTB IRQ\n");
-			return ret;
-		}
-	}
-
 	/* Allocate extcon device */
 	info->edev = devm_extcon_dev_allocate(info->dev, ptn5150_extcon_cable);
 	if (IS_ERR(info->edev)) {
@@ -282,6 +293,30 @@ static int ptn5150_i2c_probe(struct i2c_client *i2c,
 		return ret;
 	}
 
+	extcon_set_property_capability(info->edev, EXTCON_USB,
+				       EXTCON_PROP_USB_VBUS);
+	extcon_set_property_capability(info->edev, EXTCON_USB_HOST,
+				       EXTCON_PROP_USB_VBUS);
+	extcon_set_property_capability(info->edev, EXTCON_USB_HOST,
+				       EXTCON_PROP_USB_TYPEC_POLARITY);
+
+	info->irq = gpiod_to_irq(info->int_gpiod);
+	if (info->irq < 0) {
+		dev_err(dev, "failed to get INTB IRQ\n");
+		return info->irq;
+	}
+
+	ret = devm_request_threaded_irq(dev, info->irq, NULL, ptn5150_irq_handler,
+					IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
+					i2c->name, info);
+	if (ret < 0) {
+		dev_err(dev, "failed to request handler for INTB IRQ\n");
+		return ret;
+	}
+
+	/* PNT5150 interrupt is level based, read result once in case we */
+	schedule_work(&info->irq_work);
+
 	/* Initialize PTN5150 device and print vendor id and version id */
 	ret = ptn5150_init_dev_type(info);
 	if (ret)
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 7/9] extcon: extcon-ptn5150: Add USB debug accessory support
  2020-08-18  6:57 [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Ramuthevar,Vadivel MuruganX
                   ` (5 preceding siblings ...)
  2020-08-18  6:57 ` [PATCH v1 6/9] extcon: extcon-ptn5150: Set and get the VBUS and POLARITY property state Ramuthevar,Vadivel MuruganX
@ 2020-08-18  6:57 ` Ramuthevar,Vadivel MuruganX
  2020-08-18  6:57 ` [PATCH v1 8/9] extcon: extcon-ptn5150: Add USB analog audio " Ramuthevar,Vadivel MuruganX
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: Ramuthevar,Vadivel MuruganX @ 2020-08-18  6:57 UTC (permalink / raw)
  To: linux-kernel, myungjoo.ham, cw00.choi
  Cc: andriy.shevchenko, thomas.langer, cheol.yong.kim, qi-ming.wu,
	yin1.li, Ramuthevar Vadivel Murugan

From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>

Add USB debug accessory support.

Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
---
 drivers/extcon/extcon-ptn5150.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
index 5612dc0ef2af..b985a5e5c9bc 100644
--- a/drivers/extcon/extcon-ptn5150.c
+++ b/drivers/extcon/extcon-ptn5150.c
@@ -33,6 +33,7 @@ enum ptn5150_reg {
 
 #define PTN5150_DFP_ATTACHED			0x1
 #define PTN5150_UFP_ATTACHED			0x2
+#define PTN5150_DEBUG_ATTACHED			0x3
 
 /* Define PTN5150 MASK/SHIFT constant */
 #define PTN5150_REG_DEVICE_ID_VERSION		GENMASK(7, 3)
@@ -61,6 +62,7 @@ struct ptn5150_info {
 static const unsigned int ptn5150_extcon_cable[] = {
 	EXTCON_USB,
 	EXTCON_USB_HOST,
+	EXTCON_JIG,
 	EXTCON_NONE,
 };
 
@@ -86,6 +88,7 @@ static void ptn5150_irq_work(struct work_struct *work)
 	union extcon_property_value vbus_detected;
 	union extcon_property_value flipped;
 	bool host_vbus = false;
+	bool debug = false;
 	bool host = false;
 	bool dev = false;
 
@@ -152,6 +155,9 @@ static void ptn5150_irq_work(struct work_struct *work)
 				extcon_set_state_sync(info->edev,
 						EXTCON_USB_HOST, true);
 				break;
+			case PTN5150_DEBUG_ATTACHED:
+				debug = true;
+				break;
 			default:
 				dev_err(info->dev,
 					"Unknown Port status : %x\n",
@@ -182,6 +188,7 @@ static void ptn5150_irq_work(struct work_struct *work)
 	extcon_set_property(info->edev, host ? EXTCON_USB_HOST : EXTCON_USB,
 			    EXTCON_PROP_USB_VBUS, vbus_detected);
 	extcon_set_state_sync(info->edev, EXTCON_USB_HOST, host);
+	extcon_set_state_sync(info->edev, EXTCON_JIG, debug);
 	extcon_set_state_sync(info->edev, EXTCON_USB, dev);
 
 	mutex_unlock(&info->mutex);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 8/9] extcon: extcon-ptn5150: Add USB analog audio accessory support
  2020-08-18  6:57 [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Ramuthevar,Vadivel MuruganX
                   ` (6 preceding siblings ...)
  2020-08-18  6:57 ` [PATCH v1 7/9] extcon: extcon-ptn5150: Add USB debug accessory support Ramuthevar,Vadivel MuruganX
@ 2020-08-18  6:57 ` Ramuthevar,Vadivel MuruganX
  2020-08-18  6:57 ` [PATCH v1 9/9] extcon: extcon-ptn5150: Remove unused variable and extra space Ramuthevar,Vadivel MuruganX
  2020-08-18  8:40 ` [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Andy Shevchenko
  9 siblings, 0 replies; 26+ messages in thread
From: Ramuthevar,Vadivel MuruganX @ 2020-08-18  6:57 UTC (permalink / raw)
  To: linux-kernel, myungjoo.ham, cw00.choi
  Cc: andriy.shevchenko, thomas.langer, cheol.yong.kim, qi-ming.wu,
	yin1.li, Ramuthevar Vadivel Murugan

From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>

Add USB analog audio accessory attached and detection support.

Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
---
 drivers/extcon/extcon-ptn5150.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
index b985a5e5c9bc..140994ac43ed 100644
--- a/drivers/extcon/extcon-ptn5150.c
+++ b/drivers/extcon/extcon-ptn5150.c
@@ -34,6 +34,7 @@ enum ptn5150_reg {
 #define PTN5150_DFP_ATTACHED			0x1
 #define PTN5150_UFP_ATTACHED			0x2
 #define PTN5150_DEBUG_ATTACHED			0x3
+#define PTN5150_AUDIO_ATTACHED			0x4
 
 /* Define PTN5150 MASK/SHIFT constant */
 #define PTN5150_REG_DEVICE_ID_VERSION		GENMASK(7, 3)
@@ -63,6 +64,7 @@ static const unsigned int ptn5150_extcon_cable[] = {
 	EXTCON_USB,
 	EXTCON_USB_HOST,
 	EXTCON_JIG,
+	EXTCON_JACK_HEADPHONE,
 	EXTCON_NONE,
 };
 
@@ -89,6 +91,7 @@ static void ptn5150_irq_work(struct work_struct *work)
 	union extcon_property_value flipped;
 	bool host_vbus = false;
 	bool debug = false;
+	bool audio = false;
 	bool host = false;
 	bool dev = false;
 
@@ -158,6 +161,9 @@ static void ptn5150_irq_work(struct work_struct *work)
 			case PTN5150_DEBUG_ATTACHED:
 				debug = true;
 				break;
+			case PTN5150_AUDIO_ATTACHED:
+				audio = true;
+				break;
 			default:
 				dev_err(info->dev,
 					"Unknown Port status : %x\n",
@@ -189,6 +195,7 @@ static void ptn5150_irq_work(struct work_struct *work)
 			    EXTCON_PROP_USB_VBUS, vbus_detected);
 	extcon_set_state_sync(info->edev, EXTCON_USB_HOST, host);
 	extcon_set_state_sync(info->edev, EXTCON_JIG, debug);
+	extcon_set_state_sync(info->edev, EXTCON_JACK_HEADPHONE, audio);
 	extcon_set_state_sync(info->edev, EXTCON_USB, dev);
 
 	mutex_unlock(&info->mutex);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v1 9/9] extcon: extcon-ptn5150: Remove unused variable and extra space
  2020-08-18  6:57 [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Ramuthevar,Vadivel MuruganX
                   ` (7 preceding siblings ...)
  2020-08-18  6:57 ` [PATCH v1 8/9] extcon: extcon-ptn5150: Add USB analog audio " Ramuthevar,Vadivel MuruganX
@ 2020-08-18  6:57 ` Ramuthevar,Vadivel MuruganX
  2020-08-18  8:40 ` [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Andy Shevchenko
  9 siblings, 0 replies; 26+ messages in thread
From: Ramuthevar,Vadivel MuruganX @ 2020-08-18  6:57 UTC (permalink / raw)
  To: linux-kernel, myungjoo.ham, cw00.choi
  Cc: andriy.shevchenko, thomas.langer, cheol.yong.kim, qi-ming.wu,
	yin1.li, Ramuthevar Vadivel Murugan

From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>

Remove the unused variable and extra space.

Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
---
 drivers/extcon/extcon-ptn5150.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
index 140994ac43ed..a7544ab058c0 100644
--- a/drivers/extcon/extcon-ptn5150.c
+++ b/drivers/extcon/extcon-ptn5150.c
@@ -50,7 +50,6 @@ enum ptn5150_reg {
 struct ptn5150_info {
 	struct device *dev;
 	struct extcon_dev *edev;
-	struct i2c_client *i2c;
 	struct regmap *regmap;
 	struct gpio_desc *int_gpiod;
 	struct gpio_desc *vbus_gpiod;
@@ -201,7 +200,6 @@ static void ptn5150_irq_work(struct work_struct *work)
 	mutex_unlock(&info->mutex);
 }
 
-
 static irqreturn_t ptn5150_irq_handler(int irq, void *data)
 {
 	struct ptn5150_info *info = data;
@@ -264,7 +262,6 @@ static int ptn5150_i2c_probe(struct i2c_client *i2c,
 	i2c_set_clientdata(i2c, info);
 
 	info->dev = &i2c->dev;
-	info->i2c = i2c;
 	info->int_gpiod = devm_gpiod_get(&i2c->dev, "int", GPIOD_IN);
 	if (IS_ERR(info->int_gpiod)) {
 		dev_err(dev, "failed to get INT GPIO\n");
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support
  2020-08-18  6:57 [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Ramuthevar,Vadivel MuruganX
                   ` (8 preceding siblings ...)
  2020-08-18  6:57 ` [PATCH v1 9/9] extcon: extcon-ptn5150: Remove unused variable and extra space Ramuthevar,Vadivel MuruganX
@ 2020-08-18  8:40 ` Andy Shevchenko
  2020-08-19  5:35   ` Ramuthevar, Vadivel MuruganX
  9 siblings, 1 reply; 26+ messages in thread
From: Andy Shevchenko @ 2020-08-18  8:40 UTC (permalink / raw)
  To: Ramuthevar,Vadivel MuruganX
  Cc: linux-kernel, myungjoo.ham, cw00.choi, thomas.langer,
	cheol.yong.kim, qi-ming.wu, yin1.li

On Tue, Aug 18, 2020 at 02:57:18PM +0800, Ramuthevar,Vadivel MuruganX wrote:
> USB external connector chip PTN5150 used on the Intel LGM SoC
> boards to detect the USB type and connection.

Internally I meant you can send cleanups, but couple of patches here are the
features and were still under discussion... But here we are.

> ---
> v1:
>   - Initial version
> 
> Ramuthevar Vadivel Murugan (9):
>   extcon: extcon-ptn5150: Switch to GENMASK() for vendor and device ID's
>   extcon: extcon-ptn5150: Switch to GENMASK() for VBUS detection macro
>   extcon: extcon-ptn5150: Switch to BIT() macro for cable attach
>   extcon: extcon-ptn5150: Switch to BIT() for cable detach macro
>   extcon: extcon-ptn5150: Switch to GENMASK() for port attachment macro
>   extcon: extcon-ptn5150: Set and get the VBUS and POLARITY property
>     state
>   extcon: extcon-ptn5150: Add USB debug accessory support
>   extcon: extcon-ptn5150: Add USB analog audio accessory support
>   extcon: extcon-ptn5150: Remove unused variable and extra space
> 
>  drivers/extcon/extcon-ptn5150.c | 135 ++++++++++++++++++++++++----------------
>  1 file changed, 82 insertions(+), 53 deletions(-)
> 
> -- 
> 2.11.0
> 

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support
  2020-08-18  8:40 ` [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Andy Shevchenko
@ 2020-08-19  5:35   ` Ramuthevar, Vadivel MuruganX
  2020-08-19  7:55     ` Andy Shevchenko
  0 siblings, 1 reply; 26+ messages in thread
From: Ramuthevar, Vadivel MuruganX @ 2020-08-19  5:35 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, myungjoo.ham, cw00.choi, thomas.langer,
	cheol.yong.kim, qi-ming.wu, yin1.li

Hi Andy,

On 18/8/2020 4:40 pm, Andy Shevchenko wrote:
> On Tue, Aug 18, 2020 at 02:57:18PM +0800, Ramuthevar,Vadivel MuruganX wrote:
>> USB external connector chip PTN5150 used on the Intel LGM SoC
>> boards to detect the USB type and connection.
> Internally I meant you can send cleanups, but couple of patches here are the
> features and were still under discussion... But here we are.

you mean asking us to implement the Heikki suggested as below..

Heikki Krogerus: register the port and the partner attached to it with 
the USB Type-C connector class in the driver. Is my understaanding 
right? if not, please explain it. Thanks!

Regards
Vadivel

> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support
  2020-08-19  5:35   ` Ramuthevar, Vadivel MuruganX
@ 2020-08-19  7:55     ` Andy Shevchenko
  2020-08-19  8:45       ` Ramuthevar, Vadivel MuruganX
  0 siblings, 1 reply; 26+ messages in thread
From: Andy Shevchenko @ 2020-08-19  7:55 UTC (permalink / raw)
  To: Ramuthevar, Vadivel MuruganX, Krogerus, Heikki
  Cc: Andy Shevchenko, Linux Kernel Mailing List, MyungJoo Ham,
	Chanwoo Choi, thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li

On Wed, Aug 19, 2020 at 8:38 AM Ramuthevar, Vadivel MuruganX
<vadivel.muruganx.ramuthevar@linux.intel.com> wrote:
> On 18/8/2020 4:40 pm, Andy Shevchenko wrote:
> > On Tue, Aug 18, 2020 at 02:57:18PM +0800, Ramuthevar,Vadivel MuruganX wrote:
> >> USB external connector chip PTN5150 used on the Intel LGM SoC
> >> boards to detect the USB type and connection.
> > Internally I meant you can send cleanups, but couple of patches here are the
> > features and were still under discussion... But here we are.
>
> you mean asking us to implement the Heikki suggested as below..
>
> Heikki Krogerus: register the port and the partner attached to it with
> the USB Type-C connector class in the driver. Is my understaanding
> right? if not, please explain it. Thanks!

When you mention somebody, don't forget to Cc them (now done by me).

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support
  2020-08-19  7:55     ` Andy Shevchenko
@ 2020-08-19  8:45       ` Ramuthevar, Vadivel MuruganX
  2020-08-25  8:19         ` Heikki Krogerus
  0 siblings, 1 reply; 26+ messages in thread
From: Ramuthevar, Vadivel MuruganX @ 2020-08-19  8:45 UTC (permalink / raw)
  To: Andy Shevchenko, Krogerus, Heikki
  Cc: Andy Shevchenko, Linux Kernel Mailing List, MyungJoo Ham,
	Chanwoo Choi, thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li

Hi Andy,

On 19/8/2020 3:55 pm, Andy Shevchenko wrote:
> On Wed, Aug 19, 2020 at 8:38 AM Ramuthevar, Vadivel MuruganX
> <vadivel.muruganx.ramuthevar@linux.intel.com> wrote:
>> On 18/8/2020 4:40 pm, Andy Shevchenko wrote:
>>> On Tue, Aug 18, 2020 at 02:57:18PM +0800, Ramuthevar,Vadivel MuruganX wrote:
>>>> USB external connector chip PTN5150 used on the Intel LGM SoC
>>>> boards to detect the USB type and connection.
>>> Internally I meant you can send cleanups, but couple of patches here are the
>>> features and were still under discussion... But here we are.
>>
>> you mean asking us to implement the Heikki suggested as below..
>>
>> Heikki Krogerus: register the port and the partner attached to it with
>> the USB Type-C connector class in the driver. Is my understaanding
>> right? if not, please explain it. Thanks!
> 
> When you mention somebody, don't forget to Cc them (now done by me).
Sure, Thank you

Regards
Vadivel
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support
  2020-08-19  8:45       ` Ramuthevar, Vadivel MuruganX
@ 2020-08-25  8:19         ` Heikki Krogerus
  2020-08-26  2:51           ` Ramuthevar, Vadivel MuruganX
  0 siblings, 1 reply; 26+ messages in thread
From: Heikki Krogerus @ 2020-08-25  8:19 UTC (permalink / raw)
  To: Ramuthevar, Vadivel MuruganX
  Cc: Andy Shevchenko, Andy Shevchenko, Linux Kernel Mailing List,
	MyungJoo Ham, Chanwoo Choi, thomas.langer, cheol.yong.kim,
	qi-ming.wu, yin1.li

On Wed, Aug 19, 2020 at 04:45:38PM +0800, Ramuthevar, Vadivel MuruganX wrote:
> Hi Andy,
> 
> On 19/8/2020 3:55 pm, Andy Shevchenko wrote:
> > On Wed, Aug 19, 2020 at 8:38 AM Ramuthevar, Vadivel MuruganX
> > <vadivel.muruganx.ramuthevar@linux.intel.com> wrote:
> > > On 18/8/2020 4:40 pm, Andy Shevchenko wrote:
> > > > On Tue, Aug 18, 2020 at 02:57:18PM +0800, Ramuthevar,Vadivel MuruganX wrote:
> > > > > USB external connector chip PTN5150 used on the Intel LGM SoC
> > > > > boards to detect the USB type and connection.
> > > > Internally I meant you can send cleanups, but couple of patches here are the
> > > > features and were still under discussion... But here we are.
> > > 
> > > you mean asking us to implement the Heikki suggested as below..
> > > 
> > > Heikki Krogerus: register the port and the partner attached to it with
> > > the USB Type-C connector class in the driver. Is my understaanding
> > > right? if not, please explain it. Thanks!
> > 
> > When you mention somebody, don't forget to Cc them (now done by me).
> Sure, Thank you

So the patches 1-5 are fine. The rest needs to be rewritten.

thanks,

-- 
heikki

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support
  2020-08-25  8:19         ` Heikki Krogerus
@ 2020-08-26  2:51           ` Ramuthevar, Vadivel MuruganX
  2020-08-26  9:18             ` Andy Shevchenko
  0 siblings, 1 reply; 26+ messages in thread
From: Ramuthevar, Vadivel MuruganX @ 2020-08-26  2:51 UTC (permalink / raw)
  To: Heikki Krogerus
  Cc: Andy Shevchenko, Andy Shevchenko, Linux Kernel Mailing List,
	MyungJoo Ham, Chanwoo Choi, thomas.langer, cheol.yong.kim,
	qi-ming.wu, yin1.li, krzk

Hi Heikki,

  Thank you very much for the review comment...

On 25/8/2020 4:19 pm, Heikki Krogerus wrote:
> On Wed, Aug 19, 2020 at 04:45:38PM +0800, Ramuthevar, Vadivel MuruganX wrote:
>> Hi Andy,
>>
>> On 19/8/2020 3:55 pm, Andy Shevchenko wrote:
>>> On Wed, Aug 19, 2020 at 8:38 AM Ramuthevar, Vadivel MuruganX
>>> <vadivel.muruganx.ramuthevar@linux.intel.com> wrote:
>>>> On 18/8/2020 4:40 pm, Andy Shevchenko wrote:
>>>>> On Tue, Aug 18, 2020 at 02:57:18PM +0800, Ramuthevar,Vadivel MuruganX wrote:
>>>>>> USB external connector chip PTN5150 used on the Intel LGM SoC
>>>>>> boards to detect the USB type and connection.
>>>>> Internally I meant you can send cleanups, but couple of patches here are the
>>>>> features and were still under discussion... But here we are.
>>>>
>>>> you mean asking us to implement the Heikki suggested as below..
>>>>
>>>> Heikki Krogerus: register the port and the partner attached to it with
>>>> the USB Type-C connector class in the driver. Is my understaanding
>>>> right? if not, please explain it. Thanks!
>>>
>>> When you mention somebody, don't forget to Cc them (now done by me).
>> Sure, Thank you
> 
> So the patches 1-5 are fine. The rest needs to be rewritten.
Already Krzysztof submitted all the patches and got approved, so we 
started sending only one patch which support to Intel LGM SoC based 
boards, Thanks!

Regards
Vadivel
> 
> thanks,
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/9] extcon: extcon-ptn5150: Switch to GENMASK() for vendor and device ID's
  2020-08-18  6:57 ` [PATCH v1 1/9] extcon: extcon-ptn5150: Switch to GENMASK() for vendor and device ID's Ramuthevar,Vadivel MuruganX
@ 2020-08-26  6:57   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-26  6:57 UTC (permalink / raw)
  To: Ramuthevar,Vadivel MuruganX
  Cc: linux-kernel, myungjoo.ham, cw00.choi, andriy.shevchenko,
	thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li

On Tue, Aug 18, 2020 at 02:57:19PM +0800, Ramuthevar,Vadivel MuruganX wrote:
> From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
> 
> Switch to GENMASK() for vendor_id and device_id macros.
> 
> Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
> ---
>  drivers/extcon/extcon-ptn5150.c | 16 +++++-----------
>  1 file changed, 5 insertions(+), 11 deletions(-)

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 2/9] extcon: extcon-ptn5150: Switch to GENMASK() for VBUS detection macro
  2020-08-18  6:57 ` [PATCH v1 2/9] extcon: extcon-ptn5150: Switch to GENMASK() for VBUS detection macro Ramuthevar,Vadivel MuruganX
@ 2020-08-26  6:59   ` Krzysztof Kozlowski
  2020-08-26  7:33     ` Ramuthevar, Vadivel MuruganX
  0 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-26  6:59 UTC (permalink / raw)
  To: Ramuthevar,Vadivel MuruganX
  Cc: linux-kernel, myungjoo.ham, cw00.choi, andriy.shevchenko,
	thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li

On Tue, Aug 18, 2020 at 02:57:20PM +0800, Ramuthevar,Vadivel MuruganX wrote:
> From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
> 
> Switch to GENMASK() for VBUS detection macro.
> 
> Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
> ---
>  drivers/extcon/extcon-ptn5150.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)

This is too simple change, should be squashed with 1, 3, 4 and 5.

There is no point to split each change a define to use BIT or GENMASK.

Best regards,
Krzysztof

> 
> diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
> index 5d9a8767646b..c816a6c1e05c 100644
> --- a/drivers/extcon/extcon-ptn5150.c
> +++ b/drivers/extcon/extcon-ptn5150.c
> @@ -42,9 +42,7 @@ enum ptn5150_reg {
>  #define PTN5150_REG_CC_PORT_ATTACHMENT_MASK	\
>  	(0x7 << PTN5150_REG_CC_PORT_ATTACHMENT_SHIFT)
>  
> -#define PTN5150_REG_CC_VBUS_DETECTION_SHIFT	7
> -#define PTN5150_REG_CC_VBUS_DETECTION_MASK	\
> -	(0x1 << PTN5150_REG_CC_VBUS_DETECTION_SHIFT)
> +#define PTN5150_REG_CC_VBUS_DETECTION		BIT(7)
>  
>  #define PTN5150_REG_INT_CABLE_ATTACH_SHIFT	0
>  #define PTN5150_REG_INT_CABLE_ATTACH_MASK	\
> @@ -130,9 +128,8 @@ static void ptn5150_irq_work(struct work_struct *work)
>  			case PTN5150_UFP_ATTACHED:
>  				extcon_set_state_sync(info->edev, EXTCON_USB,
>  						false);
> -				vbus = ((reg_data &
> -					PTN5150_REG_CC_VBUS_DETECTION_MASK) >>
> -					PTN5150_REG_CC_VBUS_DETECTION_SHIFT);
> +				vbus = FIELD_GET(PTN5150_REG_CC_VBUS_DETECTION,
> +						 reg_data);
>  				if (vbus)
>  					gpiod_set_value(info->vbus_gpiod, 0);
>  				else
> -- 
> 2.11.0
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 3/9] extcon: extcon-ptn5150: Switch to BIT() macro for cable attach
  2020-08-18  6:57 ` [PATCH v1 3/9] extcon: extcon-ptn5150: Switch to BIT() macro for cable attach Ramuthevar,Vadivel MuruganX
@ 2020-08-26  6:59   ` Krzysztof Kozlowski
  2020-08-26  7:50     ` Ramuthevar, Vadivel MuruganX
  0 siblings, 1 reply; 26+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-26  6:59 UTC (permalink / raw)
  To: Ramuthevar,Vadivel MuruganX
  Cc: linux-kernel, myungjoo.ham, cw00.choi, andriy.shevchenko,
	thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li

On Tue, Aug 18, 2020 at 02:57:21PM +0800, Ramuthevar,Vadivel MuruganX wrote:
> From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
> 
> Switch to BIT() macro for the cable attach.

Squash it.

> 
> Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
> ---
>  drivers/extcon/extcon-ptn5150.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
> index c816a6c1e05c..fab862d9aad8 100644
> --- a/drivers/extcon/extcon-ptn5150.c
> +++ b/drivers/extcon/extcon-ptn5150.c
> @@ -44,9 +44,7 @@ enum ptn5150_reg {
>  
>  #define PTN5150_REG_CC_VBUS_DETECTION		BIT(7)
>  
> -#define PTN5150_REG_INT_CABLE_ATTACH_SHIFT	0
> -#define PTN5150_REG_INT_CABLE_ATTACH_MASK	\
> -	(0x1 << PTN5150_REG_INT_CABLE_ATTACH_SHIFT)
> +#define PTN5150_REG_INT_CABLE_ATTACH_MASK	BIT(0)
>  
>  #define PTN5150_REG_INT_CABLE_DETACH_SHIFT	1
>  #define PTN5150_REG_INT_CABLE_DETACH_MASK	\
> -- 
> 2.11.0
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 4/9] extcon: extcon-ptn5150: Switch to BIT() for cable detach macro
  2020-08-18  6:57 ` [PATCH v1 4/9] extcon: extcon-ptn5150: Switch to BIT() for cable detach macro Ramuthevar,Vadivel MuruganX
@ 2020-08-26  7:00   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-26  7:00 UTC (permalink / raw)
  To: Ramuthevar,Vadivel MuruganX
  Cc: linux-kernel, myungjoo.ham, cw00.choi, andriy.shevchenko,
	thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li

On Tue, Aug 18, 2020 at 02:57:22PM +0800, Ramuthevar,Vadivel MuruganX wrote:
> From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
> 
> Switch to BIT() macro for the cable detach.

Squash it.

Best regards,
Krzysztof

> 
> Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
> ---
>  drivers/extcon/extcon-ptn5150.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
> index fab862d9aad8..50fff148b772 100644
> --- a/drivers/extcon/extcon-ptn5150.c
> +++ b/drivers/extcon/extcon-ptn5150.c
> @@ -45,10 +45,7 @@ enum ptn5150_reg {
>  #define PTN5150_REG_CC_VBUS_DETECTION		BIT(7)
>  
>  #define PTN5150_REG_INT_CABLE_ATTACH_MASK	BIT(0)
> -
> -#define PTN5150_REG_INT_CABLE_DETACH_SHIFT	1
> -#define PTN5150_REG_INT_CABLE_DETACH_MASK	\
> -	(0x1 << PTN5150_REG_CC_CABLE_DETACH_SHIFT)
> +#define PTN5150_REG_INT_CABLE_DETACH_MASK	BIT(1)
>  
>  struct ptn5150_info {
>  	struct device *dev;
> -- 
> 2.11.0
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 5/9] extcon: extcon-ptn5150: Switch to GENMASK() for port attachment macro
  2020-08-18  6:57 ` [PATCH v1 5/9] extcon: extcon-ptn5150: Switch to GENMASK() for port attachment macro Ramuthevar,Vadivel MuruganX
@ 2020-08-26  7:00   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-26  7:00 UTC (permalink / raw)
  To: Ramuthevar,Vadivel MuruganX
  Cc: linux-kernel, myungjoo.ham, cw00.choi, andriy.shevchenko,
	thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li

On Tue, Aug 18, 2020 at 02:57:23PM +0800, Ramuthevar,Vadivel MuruganX wrote:
> From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
> 
> Switch to GENMASK() macro for the port attachment.

Squash it.

Best regards,
Krzysztof

> 
> Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
> ---
>  drivers/extcon/extcon-ptn5150.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
> index 50fff148b772..31b7cbf1551d 100644
> --- a/drivers/extcon/extcon-ptn5150.c
> +++ b/drivers/extcon/extcon-ptn5150.c
> @@ -38,9 +38,7 @@ enum ptn5150_reg {
>  #define PTN5150_REG_DEVICE_ID_VERSION		GENMASK(7, 3)
>  #define PTN5150_REG_DEVICE_ID_VENDOR		GENMASK(2, 0)
>  
> -#define PTN5150_REG_CC_PORT_ATTACHMENT_SHIFT	2
> -#define PTN5150_REG_CC_PORT_ATTACHMENT_MASK	\
> -	(0x7 << PTN5150_REG_CC_PORT_ATTACHMENT_SHIFT)
> +#define PTN5150_REG_CC_PORT_ATTACHMENT		GENMASK(4, 2)
>  
>  #define PTN5150_REG_CC_VBUS_DETECTION		BIT(7)
>  
> @@ -108,9 +106,8 @@ static void ptn5150_irq_work(struct work_struct *work)
>  			unsigned int port_status;
>  			unsigned int vbus;
>  
> -			port_status = ((reg_data &
> -					PTN5150_REG_CC_PORT_ATTACHMENT_MASK) >>
> -					PTN5150_REG_CC_PORT_ATTACHMENT_SHIFT);
> +			port_status = FIELD_GET(PTN5150_REG_CC_PORT_ATTACHMENT,
> +						reg_data);
>  
>  			switch (port_status) {
>  			case PTN5150_DFP_ATTACHED:
> -- 
> 2.11.0
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 2/9] extcon: extcon-ptn5150: Switch to GENMASK() for VBUS detection macro
  2020-08-26  6:59   ` Krzysztof Kozlowski
@ 2020-08-26  7:33     ` Ramuthevar, Vadivel MuruganX
  0 siblings, 0 replies; 26+ messages in thread
From: Ramuthevar, Vadivel MuruganX @ 2020-08-26  7:33 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-kernel, myungjoo.ham, cw00.choi, andriy.shevchenko,
	thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li,
	Heikki Krogerus

Hi,

On 26/8/2020 2:59 pm, Krzysztof Kozlowski wrote:
> On Tue, Aug 18, 2020 at 02:57:20PM +0800, Ramuthevar,Vadivel MuruganX wrote:
>> From: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
>>
>> Switch to GENMASK() for VBUS detection macro.
>>
>> Signed-off-by: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
>> ---
>>   drivers/extcon/extcon-ptn5150.c | 9 +++------
>>   1 file changed, 3 insertions(+), 6 deletions(-)
> 
> This is too simple change, should be squashed with 1, 3, 4 and 5.
> 
> There is no point to split each change a define to use BIT or GENMASK.
Thank you for the review comments and suggestions.
Sure, I will squash it as mentioned patches mentioned above.

Best Regards
Vadivel
> 
> Best regards,
> Krzysztof
> 
>>
>> diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
>> index 5d9a8767646b..c816a6c1e05c 100644
>> --- a/drivers/extcon/extcon-ptn5150.c
>> +++ b/drivers/extcon/extcon-ptn5150.c
>> @@ -42,9 +42,7 @@ enum ptn5150_reg {
>>   #define PTN5150_REG_CC_PORT_ATTACHMENT_MASK	\
>>   	(0x7 << PTN5150_REG_CC_PORT_ATTACHMENT_SHIFT)
>>   
>> -#define PTN5150_REG_CC_VBUS_DETECTION_SHIFT	7
>> -#define PTN5150_REG_CC_VBUS_DETECTION_MASK	\
>> -	(0x1 << PTN5150_REG_CC_VBUS_DETECTION_SHIFT)
>> +#define PTN5150_REG_CC_VBUS_DETECTION		BIT(7)
>>   
>>   #define PTN5150_REG_INT_CABLE_ATTACH_SHIFT	0
>>   #define PTN5150_REG_INT_CABLE_ATTACH_MASK	\
>> @@ -130,9 +128,8 @@ static void ptn5150_irq_work(struct work_struct *work)
>>   			case PTN5150_UFP_ATTACHED:
>>   				extcon_set_state_sync(info->edev, EXTCON_USB,
>>   						false);
>> -				vbus = ((reg_data &
>> -					PTN5150_REG_CC_VBUS_DETECTION_MASK) >>
>> -					PTN5150_REG_CC_VBUS_DETECTION_SHIFT);
>> +				vbus = FIELD_GET(PTN5150_REG_CC_VBUS_DETECTION,
>> +						 reg_data);
>>   				if (vbus)
>>   					gpiod_set_value(info->vbus_gpiod, 0);
>>   				else
>> -- 
>> 2.11.0
>>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 3/9] extcon: extcon-ptn5150: Switch to BIT() macro for cable attach
  2020-08-26  6:59   ` Krzysztof Kozlowski
@ 2020-08-26  7:50     ` Ramuthevar, Vadivel MuruganX
  0 siblings, 0 replies; 26+ messages in thread
From: Ramuthevar, Vadivel MuruganX @ 2020-08-26  7:50 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-kernel, myungjoo.ham, cw00.choi, andriy.shevchenko,
	thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li

Hi,

On 26/8/2020 2:59 pm, Krzysztof Kozlowski wrote:
> On Tue, Aug 18, 2020 at 02:57:21PM +0800, Ramuthevar,Vadivel MuruganX wrote:
>> From: Ramuthevar Vadivel Murugan<vadivel.muruganx.ramuthevar@linux.intel.com>
>>
>> Switch to BIT() macro for the cable attach.
> Squash it.
Sure, will squash it and rebase over your patches then send it, thanks!

Best Regards
Vadivel
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support
  2020-08-26  2:51           ` Ramuthevar, Vadivel MuruganX
@ 2020-08-26  9:18             ` Andy Shevchenko
  2020-08-26  9:43               ` Ramuthevar, Vadivel MuruganX
  2020-08-26  9:50               ` Krzysztof Kozlowski
  0 siblings, 2 replies; 26+ messages in thread
From: Andy Shevchenko @ 2020-08-26  9:18 UTC (permalink / raw)
  To: Ramuthevar, Vadivel MuruganX
  Cc: Heikki Krogerus, Linux Kernel Mailing List, MyungJoo Ham,
	Chanwoo Choi, thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li,
	krzk

On Wed, Aug 26, 2020 at 10:51:37AM +0800, Ramuthevar, Vadivel MuruganX wrote:
> On 25/8/2020 4:19 pm, Heikki Krogerus wrote:
> > On Wed, Aug 19, 2020 at 04:45:38PM +0800, Ramuthevar, Vadivel MuruganX wrote:
> > > On 19/8/2020 3:55 pm, Andy Shevchenko wrote:
> > > > On Wed, Aug 19, 2020 at 8:38 AM Ramuthevar, Vadivel MuruganX
> > > > <vadivel.muruganx.ramuthevar@linux.intel.com> wrote:
> > > > > On 18/8/2020 4:40 pm, Andy Shevchenko wrote:
> > > > > > On Tue, Aug 18, 2020 at 02:57:18PM +0800, Ramuthevar,Vadivel MuruganX wrote:
> > > > > > > USB external connector chip PTN5150 used on the Intel LGM SoC
> > > > > > > boards to detect the USB type and connection.
> > > > > > Internally I meant you can send cleanups, but couple of patches here are the
> > > > > > features and were still under discussion... But here we are.
> > > > > 
> > > > > you mean asking us to implement the Heikki suggested as below..
> > > > > 
> > > > > Heikki Krogerus: register the port and the partner attached to it with
> > > > > the USB Type-C connector class in the driver. Is my understaanding
> > > > > right? if not, please explain it. Thanks!
> > > > 
> > > > When you mention somebody, don't forget to Cc them (now done by me).
> > > Sure, Thank you
> > 
> > So the patches 1-5 are fine. The rest needs to be rewritten.
> Already Krzysztof submitted all the patches and got approved, so we started
> sending only one patch which support to Intel LGM SoC based boards, Thanks!

I'm not sure what you meant by above.

Krzysztof suggested you to squash all first patches into 1 (or two) and he
approves it. What you have to do is follow his advise and send v2 where it will
be one (or two) patch with his tag attached.

Krzysztof, is it correct what I'm saying?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support
  2020-08-26  9:18             ` Andy Shevchenko
@ 2020-08-26  9:43               ` Ramuthevar, Vadivel MuruganX
  2020-08-26  9:50               ` Krzysztof Kozlowski
  1 sibling, 0 replies; 26+ messages in thread
From: Ramuthevar, Vadivel MuruganX @ 2020-08-26  9:43 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Heikki Krogerus, Linux Kernel Mailing List, MyungJoo Ham,
	Chanwoo Choi, thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li,
	krzk

Hi Andy,

On 26/8/2020 5:18 pm, Andy Shevchenko wrote:
> On Wed, Aug 26, 2020 at 10:51:37AM +0800, Ramuthevar, Vadivel MuruganX wrote:
>> On 25/8/2020 4:19 pm, Heikki Krogerus wrote:
>>> On Wed, Aug 19, 2020 at 04:45:38PM +0800, Ramuthevar, Vadivel MuruganX wrote:
>>>> On 19/8/2020 3:55 pm, Andy Shevchenko wrote:
>>>>> On Wed, Aug 19, 2020 at 8:38 AM Ramuthevar, Vadivel MuruganX
>>>>> <vadivel.muruganx.ramuthevar@linux.intel.com> wrote:
>>>>>> On 18/8/2020 4:40 pm, Andy Shevchenko wrote:
>>>>>>> On Tue, Aug 18, 2020 at 02:57:18PM +0800, Ramuthevar,Vadivel MuruganX wrote:
>>>>>>>> USB external connector chip PTN5150 used on the Intel LGM SoC
>>>>>>>> boards to detect the USB type and connection.
>>>>>>> Internally I meant you can send cleanups, but couple of patches here are the
>>>>>>> features and were still under discussion... But here we are.
>>>>>>
>>>>>> you mean asking us to implement the Heikki suggested as below..
>>>>>>
>>>>>> Heikki Krogerus: register the port and the partner attached to it with
>>>>>> the USB Type-C connector class in the driver. Is my understaanding
>>>>>> right? if not, please explain it. Thanks!
>>>>>
>>>>> When you mention somebody, don't forget to Cc them (now done by me).
>>>> Sure, Thank you
>>>
>>> So the patches 1-5 are fine. The rest needs to be rewritten.
>> Already Krzysztof submitted all the patches and got approved, so we started
>> sending only one patch which support to Intel LGM SoC based boards, Thanks!
> 
> I'm not sure what you meant by above.
> 
> Krzysztof suggested you to squash all first patches into 1 (or two) and he
> approves it. What you have to do is follow his advise and send v2 where it will
> be one (or two) patch with his tag attached.
Yes, you're right, the above discussion was before Krzysztof reviewed my 
patches, sure will follow his advise, thanks!

Regards
Vadivel
> 
> Krzysztof, is it correct what I'm saying?
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support
  2020-08-26  9:18             ` Andy Shevchenko
  2020-08-26  9:43               ` Ramuthevar, Vadivel MuruganX
@ 2020-08-26  9:50               ` Krzysztof Kozlowski
  1 sibling, 0 replies; 26+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-26  9:50 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Ramuthevar, Vadivel MuruganX, Heikki Krogerus,
	Linux Kernel Mailing List, MyungJoo Ham, Chanwoo Choi,
	thomas.langer, cheol.yong.kim, qi-ming.wu, yin1.li

On Wed, Aug 26, 2020 at 12:18:04PM +0300, Andy Shevchenko wrote:
> On Wed, Aug 26, 2020 at 10:51:37AM +0800, Ramuthevar, Vadivel MuruganX wrote:
> > On 25/8/2020 4:19 pm, Heikki Krogerus wrote:
> > > On Wed, Aug 19, 2020 at 04:45:38PM +0800, Ramuthevar, Vadivel MuruganX wrote:
> > > > On 19/8/2020 3:55 pm, Andy Shevchenko wrote:
> > > > > On Wed, Aug 19, 2020 at 8:38 AM Ramuthevar, Vadivel MuruganX
> > > > > <vadivel.muruganx.ramuthevar@linux.intel.com> wrote:
> > > > > > On 18/8/2020 4:40 pm, Andy Shevchenko wrote:
> > > > > > > On Tue, Aug 18, 2020 at 02:57:18PM +0800, Ramuthevar,Vadivel MuruganX wrote:
> > > > > > > > USB external connector chip PTN5150 used on the Intel LGM SoC
> > > > > > > > boards to detect the USB type and connection.
> > > > > > > Internally I meant you can send cleanups, but couple of patches here are the
> > > > > > > features and were still under discussion... But here we are.
> > > > > > 
> > > > > > you mean asking us to implement the Heikki suggested as below..
> > > > > > 
> > > > > > Heikki Krogerus: register the port and the partner attached to it with
> > > > > > the USB Type-C connector class in the driver. Is my understaanding
> > > > > > right? if not, please explain it. Thanks!
> > > > > 
> > > > > When you mention somebody, don't forget to Cc them (now done by me).
> > > > Sure, Thank you
> > > 
> > > So the patches 1-5 are fine. The rest needs to be rewritten.
> > Already Krzysztof submitted all the patches and got approved, so we started
> > sending only one patch which support to Intel LGM SoC based boards, Thanks!
> 
> I'm not sure what you meant by above.
> 
> Krzysztof suggested you to squash all first patches into 1 (or two) and he
> approves it. What you have to do is follow his advise and send v2 where it will
> be one (or two) patch with his tag attached.
> 
> Krzysztof, is it correct what I'm saying?

Yes, correct. I guess Vadivel mentioned my patchset which was sent some
days before and recently got applied into extcon tree.

I think there is no misunderstanding here.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2020-08-26  9:50 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-18  6:57 [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Ramuthevar,Vadivel MuruganX
2020-08-18  6:57 ` [PATCH v1 1/9] extcon: extcon-ptn5150: Switch to GENMASK() for vendor and device ID's Ramuthevar,Vadivel MuruganX
2020-08-26  6:57   ` Krzysztof Kozlowski
2020-08-18  6:57 ` [PATCH v1 2/9] extcon: extcon-ptn5150: Switch to GENMASK() for VBUS detection macro Ramuthevar,Vadivel MuruganX
2020-08-26  6:59   ` Krzysztof Kozlowski
2020-08-26  7:33     ` Ramuthevar, Vadivel MuruganX
2020-08-18  6:57 ` [PATCH v1 3/9] extcon: extcon-ptn5150: Switch to BIT() macro for cable attach Ramuthevar,Vadivel MuruganX
2020-08-26  6:59   ` Krzysztof Kozlowski
2020-08-26  7:50     ` Ramuthevar, Vadivel MuruganX
2020-08-18  6:57 ` [PATCH v1 4/9] extcon: extcon-ptn5150: Switch to BIT() for cable detach macro Ramuthevar,Vadivel MuruganX
2020-08-26  7:00   ` Krzysztof Kozlowski
2020-08-18  6:57 ` [PATCH v1 5/9] extcon: extcon-ptn5150: Switch to GENMASK() for port attachment macro Ramuthevar,Vadivel MuruganX
2020-08-26  7:00   ` Krzysztof Kozlowski
2020-08-18  6:57 ` [PATCH v1 6/9] extcon: extcon-ptn5150: Set and get the VBUS and POLARITY property state Ramuthevar,Vadivel MuruganX
2020-08-18  6:57 ` [PATCH v1 7/9] extcon: extcon-ptn5150: Add USB debug accessory support Ramuthevar,Vadivel MuruganX
2020-08-18  6:57 ` [PATCH v1 8/9] extcon: extcon-ptn5150: Add USB analog audio " Ramuthevar,Vadivel MuruganX
2020-08-18  6:57 ` [PATCH v1 9/9] extcon: extcon-ptn5150: Remove unused variable and extra space Ramuthevar,Vadivel MuruganX
2020-08-18  8:40 ` [PATCH v1 0/9] extcon: extcon-ptn5150: Add the USB external connector support Andy Shevchenko
2020-08-19  5:35   ` Ramuthevar, Vadivel MuruganX
2020-08-19  7:55     ` Andy Shevchenko
2020-08-19  8:45       ` Ramuthevar, Vadivel MuruganX
2020-08-25  8:19         ` Heikki Krogerus
2020-08-26  2:51           ` Ramuthevar, Vadivel MuruganX
2020-08-26  9:18             ` Andy Shevchenko
2020-08-26  9:43               ` Ramuthevar, Vadivel MuruganX
2020-08-26  9:50               ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).