mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
media: i2c: ov7251: Make the enable GPIO optional.
Not all implementations wire up the enable GPIO and may just tie it to a supply rail. Make it optional. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
committed by
Dom Cobley
parent
dad09959f7
commit
6a3dc31d29
@@ -1682,7 +1682,7 @@ static int ov7251_probe(struct i2c_client *client)
|
|||||||
return PTR_ERR(ov7251->analog_regulator);
|
return PTR_ERR(ov7251->analog_regulator);
|
||||||
}
|
}
|
||||||
|
|
||||||
ov7251->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
|
ov7251->enable_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
|
||||||
if (IS_ERR(ov7251->enable_gpio)) {
|
if (IS_ERR(ov7251->enable_gpio)) {
|
||||||
dev_err(dev, "cannot get enable gpio\n");
|
dev_err(dev, "cannot get enable gpio\n");
|
||||||
return PTR_ERR(ov7251->enable_gpio);
|
return PTR_ERR(ov7251->enable_gpio);
|
||||||
|
|||||||
Reference in New Issue
Block a user