mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marion & Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Markuss Broks <markuss.broks@gmail.com>, linux-kernel@vger.kernel.org
Cc: phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 2/2] leds: ktd2692: Make aux-gpios optional
Date: Fri, 8 Apr 2022 18:57:53 +0200	[thread overview]
Message-ID: <f0f934b8-2e97-2b9a-76de-e1cb217fc58c@wanadoo.fr> (raw)
In-Reply-To: <20220408163330.200898-3-markuss.broks@gmail.com>


Le 08/04/2022 à 18:33, Markuss Broks a écrit :
> Make the AUX pin optional, since it isn't a core part of functionality,
> and the device is designed to be operational with only one CTRL pin.
>
> Also pick up maintenance for the LED driver and the yaml bindings.
>
> Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
> ---
>   MAINTAINERS                       | 6 ++++++
>   drivers/leds/flash/leds-ktd2692.c | 7 +++----
>   2 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 2db49ea7ae55..8ef5667a1d98 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10479,6 +10479,12 @@ S:	Maintained
>   F:	Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml
>   F:	drivers/video/backlight/ktd253-backlight.c
>   
> +KTD2692 FLASH LED DRIVER
> +M:	Markuss Broks <markuss.broks@gmail.com>
> +S:	Maintained
> +F:	Documentation/devicetree/bindings/leds/backlight/kinetic,ktd2692.yaml
> +F:	drivers/leds/flash/leds-ktd2692.yaml
> +
>   KTEST
>   M:	Steven Rostedt <rostedt@goodmis.org>
>   M:	John Hawley <warthog9@eaglescrag.net>
> diff --git a/drivers/leds/flash/leds-ktd2692.c b/drivers/leds/flash/leds-ktd2692.c
> index f341da1503a4..26edf41dfa7d 100644
> --- a/drivers/leds/flash/leds-ktd2692.c
> +++ b/drivers/leds/flash/leds-ktd2692.c
> @@ -284,10 +284,9 @@ static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev,
>   		return ret;
>   	}
>   
> -	led->aux_gpio = devm_gpiod_get(dev, "aux", GPIOD_ASIS);
> -	ret = PTR_ERR_OR_ZERO(led->aux_gpio);
> -	if (ret) {
> -		dev_err(dev, "cannot get aux-gpios %d\n", ret);
> +	led->aux_gpio = devm_gpiod_get_optional(dev, "aux", GPIOD_ASIS);
> +	if (IS_ERR(led->aux_gpio)) {
> +		dev_err(dev, "cannot get aux-gpios: %d\n", ret);
>   		return ret;

Hi,

'ret' is known to be 0 at this point.
maybe adding:
    ret = PTR_ERR(led->aux_gpio);

?

CJ

>   	}
>   

      reply	other threads:[~2022-04-08 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08 16:33 [PATCH v4 0/2] Make AUX gpio pin optional for ktd2692 Markuss Broks
2022-04-08 16:33 ` [PATCH v4 1/2] dt-bindings: leds: convert ktd2692 bindings to yaml Markuss Broks
2022-04-08 16:33 ` [PATCH v4 2/2] leds: ktd2692: Make aux-gpios optional Markuss Broks
2022-04-08 16:57   ` Marion & Christophe JAILLET [this message]

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=f0f934b8-2e97-2b9a-76de-e1cb217fc58c@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=markuss.broks@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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

all inboxes | Powered by JetHome®