Linux Power Management development
 help / color / mirror / Atom feed
From: "Kaustabh Chakraborty" <kauschluss@disroot.org>
To: "Adil Hüsrev Tepe" <tadilhusrev@gmail.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Kaustabh Chakraborty" <kauschluss@disroot.org>
Cc: <linux-pm@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Yassine Oudjana" <y.oudjana@protonmail.com>
Subject: Re: [PATCH v2 2/3] power: supply: s2mu005-battery: make the alert interrupt optional
Date: Thu, 03 Dec 2026 20:18:09 +0530	[thread overview]
Message-ID: <DNB6HZHKN3UZ.2V8RILP5J8MIQ@disroot.org> (raw)
In-Reply-To: <20261128-s2mu106-fg-v2-2-2c3142e05aaf@gmail.com>

On 2026-11-28 01:32 +03:00, Adil Hüsrev Tepe wrote:
> The driver unconditionally requests the fuel-gauge alert interrupt and
> fails to probe if the board does not wire it. Not all boards route the
> alert line (for example the Samsung Galaxy XCover5), so only request the
> interrupt when one is present; the gauge is otherwise polled on demand.
>
> Signed-off-by: Adil Hüsrev Tepe <tadilhusrev@gmail.com>
> ---
>  drivers/power/supply/s2mu005-battery.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Reviewed-by: Kaustabh Chakraborty <kauschluss@disroot.org>

> diff --git a/drivers/power/supply/s2mu005-battery.c b/drivers/power/supply/s2mu005-battery.c
> index a76154e5a09..9798a62ffec 100644
> --- a/drivers/power/supply/s2mu005-battery.c
> +++ b/drivers/power/supply/s2mu005-battery.c
> @@ -273,11 +273,13 @@ static int s2mu005_fg_i2c_probe(struct i2c_client *client)
>  		return dev_err_probe(dev, PTR_ERR(priv->psy),
>  				     "failed to register power supply subsystem\n");
>  
> -	ret = devm_request_threaded_irq(priv->dev, client->irq, NULL,
> -					s2mu005_handle_irq, IRQF_ONESHOT,
> -					psy_desc->name, priv);
> -	if (ret)
> -		return dev_err_probe(dev, ret, "failed to request IRQ\n");
> +	if (client->irq > 0) {
> +		ret = devm_request_threaded_irq(priv->dev, client->irq, NULL,
> +						s2mu005_handle_irq, IRQF_ONESHOT,
> +						psy_desc->name, priv);
> +		if (ret)
> +			return dev_err_probe(dev, ret, "failed to request IRQ\n");
> +	}
>  
>  	return 0;
>  }


  reply	other threads:[~2026-12-03 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 22:32 [PATCH v2 0/3] power: supply: s2mu005-battery: add S2MU106 Adil Hüsrev Tepe
2026-11-27 22:32 ` [PATCH v2 1/3] dt-bindings: power: supply: samsung,s2mu005-fuel-gauge: " Adil Hüsrev Tepe
2026-12-03 14:24   ` Krzysztof Kozlowski
2026-11-27 22:32 ` [PATCH v2 2/3] power: supply: s2mu005-battery: make the alert interrupt optional Adil Hüsrev Tepe
2026-12-03 14:48   ` Kaustabh Chakraborty [this message]
2026-11-27 22:32 ` [PATCH v2 3/3] power: supply: s2mu005-battery: add S2MU106 support Adil Hüsrev Tepe
2026-12-03 14:56   ` Kaustabh Chakraborty

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=DNB6HZHKN3UZ.2V8RILP5J8MIQ@disroot.org \
    --to=kauschluss@disroot.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    --cc=tadilhusrev@gmail.com \
    --cc=y.oudjana@protonmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox