[PATCH 2/2] extcon: ptn5150: Make CON_DET configurable

From: Marek Vasut

Date: Sun Nov 29 2026 - 12:19:58 EST


Handle boolean property "nxp,con-det-enable", which selects whether the
CON_DET signal is output on Pin 5 of the chip. Chip default is disabled,
which is also the behavior when the property is not present.

Signed-off-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxxxx>
---
Cc: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>
Cc: Conor Dooley <conor+dt@xxxxxxxxxx>
Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Cc: MyungJoo Ham <myungjoo.ham@xxxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
drivers/extcon/extcon-ptn5150.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c
index 0b96b58b42124..f15c585f817ab 100644
--- a/drivers/extcon/extcon-ptn5150.c
+++ b/drivers/extcon/extcon-ptn5150.c
@@ -45,6 +45,7 @@
#define PTN5150_REG_CC_PORT_ATTACHMENT GENMASK(4, 2)
#define PTN5150_REG_CC_POLARITY GENMASK(1, 0)
#define PTN5150_REG_CC_VBUS_DETECTION BIT(7)
+#define PTN5150_REG_CON_DET_DIS BIT(0)
#define PTN5150_REG_INT_CABLE_ATTACH_MASK BIT(0)
#define PTN5150_REG_INT_CABLE_DETACH_MASK BIT(1)

@@ -362,6 +363,11 @@ static int ptn5150_i2c_probe(struct i2c_client *i2c)
if (ret)
return ret;

+ if (device_property_present(&i2c->dev, "nxp,con-det-enable")) {
+ regmap_clear_bits(info->regmap, PTN5150_REG_CON_DET,
+ PTN5150_REG_CON_DET_DIS);
+ }
+
/*
* Update current extcon state if for example OTG connection was there
* before the probe
--
2.53.0