[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220504193439.15938-3-markuss.broks@gmail.com>
Date: Wed, 4 May 2022 22:34:36 +0300
From: Markuss Broks <markuss.broks@...il.com>
To: pavel@....cz
Cc: Markuss Broks <markuss.broks@...il.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Linus Walleij <linus.walleij@...aro.org>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v7 2/2] leds: ktd2692: Make aux-gpios optional
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.
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
Signed-off-by: Markuss Broks <markuss.broks@...il.com>
---
drivers/leds/flash/leds-ktd2692.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/leds/flash/leds-ktd2692.c b/drivers/leds/flash/leds-ktd2692.c
index ed1f20a58bf6..1736b3f6b899 100644
--- a/drivers/leds/flash/leds-ktd2692.c
+++ b/drivers/leds/flash/leds-ktd2692.c
@@ -284,9 +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) {
+ led->aux_gpio = devm_gpiod_get_optional(dev, "aux", GPIOD_ASIS);
+ if (IS_ERR(led->aux_gpio)) {
+ ret = PTR_ERR(led->aux_gpio);
dev_err(dev, "cannot get aux-gpios %d\n", ret);
return ret;
}
--
2.35.1
Powered by blists - more mailing lists