All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: david@ixit.cz
Cc: Alexey Minnekhanov <alexeymin@minlexx.ru>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Lee Jones <lee@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	phone-devel@vger.kernel.org, mfd@lists.linux.dev
Subject: Re: [PATCH RFC 01/12] usb: typec: tcpm: qcom: Release the connector fwnode reference
Date: Mon, 28 Sep 2026 15:48:49 +0200	[thread overview]
Message-ID: <arpwQaOfCXHrp4m3@black.igk.intel.com> (raw)
In-Reply-To: <20260926-typec-v1-1-31adc19f32c6@ixit.cz>

Hi David,

On Sat, Sep 26, 2026 at 02:40:20PM +0200, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
> 
> device_get_named_child_node() returns the connector node with its
> reference count incremented, but the port probe never drops it. The node
> is only needed for the VBUS regulator lookup, so release it right after.
> 
> Assisted-by: LLM
> Fixes: 506927b6bf29 ("usb: typec: tcpm: qcom: prefer VBUS supply from the connector node")
> Signed-off-by: David Heidelberg <david@ixit.cz>

I think this should be send separately. Cc stable?

Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

Thanks,

> ---
>  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
> index bf985efe1cd6b..f8308d66b9d67 100644
> --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
> +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
> @@ -5,16 +5,17 @@
>  
>  #include <linux/delay.h>
>  #include <linux/err.h>
>  #include <linux/interrupt.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
> +#include <linux/property.h>
>  #include <linux/regmap.h>
>  #include <linux/regulator/consumer.h>
>  #include <linux/slab.h>
>  #include <linux/string_choices.h>
>  #include <linux/usb/tcpm.h>
>  #include <linux/usb/typec_mux.h>
>  #include <linux/workqueue.h>
>  
> @@ -723,16 +724,17 @@ int qcom_pmic_typec_port_probe(struct platform_device *pdev,
>  
>  	connector = device_get_named_child_node(dev, "connector");
>  	if (!connector)
>  		return -EINVAL;
>  
>  	pmic_typec_port->vdd_vbus = devm_of_regulator_get_optional(dev,
>  								   to_of_node(connector),
>  								   "vbus");
> +	fwnode_handle_put(connector);
>  	if (pmic_typec_port->vdd_vbus == ERR_PTR(-ENODEV))
>  		pmic_typec_port->vdd_vbus = devm_regulator_get(dev, "vdd-vbus");
>  	if (IS_ERR(pmic_typec_port->vdd_vbus))
>  		return PTR_ERR(pmic_typec_port->vdd_vbus);
>  
>  	pmic_typec_port->dev = dev;
>  	pmic_typec_port->base = base;
>  	pmic_typec_port->regmap = regmap;
> 
> -- 
> 2.55.0
> 

-- 
heikki

  parent reply	other threads:[~2026-09-28 13:48 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-26 12:40 [PATCH RFC 00/12] Qualcomm Type-C support for 1st generation David Heidelberg via B4 Relay
2026-09-26 12:40 ` David Heidelberg
2026-09-26 12:40 ` [PATCH RFC 01/12] usb: typec: tcpm: qcom: Release the connector fwnode reference David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:45   ` sashiko-bot
2026-09-28 13:48   ` Heikki Krogerus [this message]
2026-09-26 12:40 ` [PATCH RFC 02/12] dt-bindings: usb: qcom,pmic-typec: Update example with vbus-supply David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:45   ` sashiko-bot
2026-09-26 13:34   ` Bryan O'Donoghue
2026-09-26 12:40 ` [PATCH RFC 03/12] dt-bindings: usb: Add Qualcomm 1st-gen PMIC Type-C David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:44   ` sashiko-bot
2026-09-26 12:40 ` [PATCH RFC 04/12] usb: typec: qcom: Make PMIC port probe selectable David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:45   ` sashiko-bot
2026-09-26 13:39   ` Bryan O'Donoghue
2026-09-26 12:40 ` [PATCH RFC 05/12] usb: typec: qcom: Make typec_port accept also different structure David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:48   ` sashiko-bot
2026-09-26 13:40   ` Bryan O'Donoghue
2026-09-26 12:40 ` [PATCH RFC 06/12] usb: typec: qcom: Add gen1 Type-C port support David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:53   ` sashiko-bot
2026-09-26 14:22   ` Bryan O'Donoghue
2026-09-26 14:32     ` David Heidelberg
2026-09-26 14:41       ` Bryan O'Donoghue
2026-09-26 14:45         ` David Heidelberg
2026-09-26 12:40 ` [PATCH RFC 07/12] arm64: dts: qcom: pm660: Add USB Type-C port controller node David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:45   ` sashiko-bot
2026-09-26 14:25   ` Bryan O'Donoghue
2026-09-26 12:40 ` [PATCH RFC 08/12] arm64: dts: qcom: pmi8998: " David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:45   ` sashiko-bot
2026-09-26 14:28   ` Bryan O'Donoghue
2026-09-26 12:40 ` [PATCH RFC 09/12] arm64: dts: qcom: sdm670-google-common: Enable USB Type-C port controller David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:45   ` sashiko-bot
2026-09-26 12:40 ` [PATCH RFC 10/12] arm64: dts: qcom: sdm845-google-common: " David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:46   ` sashiko-bot
2026-09-26 12:40 ` [PATCH RFC 11/12] arm64: dts: qcom: sdm845-oneplus-common: " David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:49   ` sashiko-bot
2026-09-26 12:40 ` [PATCH RFC 12/12] arm64: dts: qcom: sdm845-shift-axolotl: " David Heidelberg via B4 Relay
2026-09-26 12:40   ` David Heidelberg
2026-09-26 12:49   ` sashiko-bot
2026-09-27 13:05 ` [PATCH RFC 00/12] Qualcomm Type-C support for 1st generation Dmitry Baryshkov
2026-09-27 15:16   ` David Heidelberg
2026-09-27 16:33     ` Dmitry Baryshkov
2026-09-28 15:54       ` Bryan O'Donoghue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=arpwQaOfCXHrp4m3@black.igk.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=alexeymin@minlexx.ru \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=david@ixit.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.