bcm27xx: switch to kernel v6.1
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.15 / 950-0612-media-i2c-ov7251-Make-the-enable-GPIO-optional.patch
1 From eece4bace6f1899fdbef6315f11e0ef9957fdc05 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Tue, 14 Dec 2021 17:18:49 +0000
4 Subject: [PATCH] media: i2c: ov7251: Make the enable GPIO optional.
5
6 Not all implementations wire up the enable GPIO and may just tie
7 it to a supply rail.
8 Make it optional.
9
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
11 ---
12 drivers/media/i2c/ov7251.c | 3 ++-
13 1 file changed, 2 insertions(+), 1 deletion(-)
14
15 --- a/drivers/media/i2c/ov7251.c
16 +++ b/drivers/media/i2c/ov7251.c
17 @@ -1334,7 +1334,8 @@ static int ov7251_probe(struct i2c_clien
18 return PTR_ERR(ov7251->analog_regulator);
19 }
20
21 - ov7251->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH);
22 + ov7251->enable_gpio = devm_gpiod_get_optional(dev, "enable",
23 + GPIOD_OUT_HIGH);
24 if (IS_ERR(ov7251->enable_gpio)) {
25 dev_err(dev, "cannot get enable gpio\n");
26 return PTR_ERR(ov7251->enable_gpio);