From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06A93212F98 for ; Sun, 23 Nov 2025 15:53:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763913192; cv=none; b=jAREmsQfAOTG4hdqIewQ6D26X8PAfY7tQEYxvIjAfpDADtfmrjdYvliiJHpnJZlweGlB/SfkFS3+Db34IVF/H3oMQ9oBB1U01ASWsnRZOwaLA07eJnFtjYYmJvxVWjHWs27xbT46do1JU+YvuK4koSNnGp/n6o+vDYeLVrFdWVo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763913192; c=relaxed/simple; bh=eekvmhLPGMiQCNN5LNIlAaQEL5PlOSYRccfJ3NIpmAc=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=UotcuW471afOWyVbRzoI96AnqBwIkM0h9XJDN84cMXWc6ByT7tNzXnroHZhw0xnh2uIzqw82K8ASqE46NU3BvP76wZ8ZmpONPO/VqtsRbaXrH98Uy2iyqk3x9HRZ898OQqCtYKApAr6yJma63/luP8cknIJewWeMRpeJGO9GDrY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SWGi6zH6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SWGi6zH6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 611F8C113D0; Sun, 23 Nov 2025 15:53:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763913191; bh=eekvmhLPGMiQCNN5LNIlAaQEL5PlOSYRccfJ3NIpmAc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=SWGi6zH63HP6X3oNurK8DY+rKcyYwAS+f6gfGR+pl3xbwSOCKwh6AzWIcpM1wXUCP 5DyWRlMgr8D3WkHqWwQfu6EYPBjJC4+5lDNWcQQ/xGSsJQWHC7SuWsRajipsGkvCho rZImAq8yrrqIhM7cq/WPpF5B8QGqEHj5rBYODOnlsRsggHqNO+NTqMr9iWflMxfJrA +h2lfoLGlnk7/DiWNNk7wXQ6eXKW7tXlWUQIyevSx4UOd5DY7mRVhVUa57KBFAxfCJ dVywWSJeSB7v/QAPj9TE05UqLpWxl61HDhvx9jWae62KI9QllirU9X1hILGX9yAvcw q5I7aUZTOgoxQ== Message-ID: <00ea1f56-335f-4c87-87c6-a92fd258769c@kernel.org> Date: Mon, 24 Nov 2025 00:53:08 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] extcon: usbc-tusb320: Make typec-power-opmode optional To: Yannis Bolliger , MyungJoo Ham , Chanwoo Choi , linux-kernel@vger.kernel.org References: From: Chanwoo Choi Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 25. 10. 18. 04:30에 Yannis Bolliger 이(가) 쓴 글: > The driver returned an error in the probe function when a usb c > connector is configured in the DT without a "typec-power-opmode" > property. This property is used to initialize the CURRENT_MODE_ADVERTISE > register of the TUSB320, which is unused when operating as a UFP. > Requiring this property causes unnecessary configuration overhead and > inconsistency with the USB connector DT bindings, which do not specify > it as required. > > This change makes typec-power-opmode optional. When the property is not > present, the driver will skip programming the CURRENT_MODE_ADVERTISE > register and rely on the hardware default. > > Signed-off-by: Yannis Bolliger > --- > drivers/extcon/extcon-usbc-tusb320.c | 25 +++++++++++-------------- > 1 file changed, 11 insertions(+), 14 deletions(-) > > diff --git a/drivers/extcon/extcon-usbc-tusb320.c b/drivers/extcon/extcon-usbc-tusb320.c > index 2eab341de6b7..b8ff91010e63 100644 > --- a/drivers/extcon/extcon-usbc-tusb320.c > +++ b/drivers/extcon/extcon-usbc-tusb320.c > @@ -454,20 +454,17 @@ static int tusb320_typec_probe(struct i2c_client *client, > priv->port_type = priv->cap.type; > > /* This goes into register 0x8 field CURRENT_MODE_ADVERTISE */ > - ret = fwnode_property_read_string(connector, "typec-power-opmode", &cap_str); > - if (ret) > - goto err_put; > - > - ret = typec_find_pwr_opmode(cap_str); > - if (ret < 0) > - goto err_put; > - > - priv->pwr_opmode = ret; > - > - /* Initialize the hardware with the devicetree settings. */ > - ret = tusb320_set_adv_pwr_mode(priv); > - if (ret) > - goto err_put; > + if (!fwnode_property_read_string(connector, "typec-power-opmode", > + &cap_str)) { > + ret = typec_find_pwr_opmode(cap_str); > + if (ret < 0) > + goto err_put; > + priv->pwr_opmode = ret; > + /* Initialize the hardware with the devicetree settings. */ > + ret = tusb320_set_adv_pwr_mode(priv); > + if (ret) > + goto err_put; > + } > > priv->cap.revision = USB_TYPEC_REV_1_1; > priv->cap.accessory[0] = TYPEC_ACCESSORY_AUDIO; Applied it. Thanks. -- Best Regards, Samsung Electronics Chanwoo Choi