|
@@ -204,9 +204,9 @@ static int pca954x_probe(struct i2c_client *client,
|
|
i2c_set_clientdata(client, data);
|
|
i2c_set_clientdata(client, data);
|
|
|
|
|
|
/* Get the mux out of reset if a reset GPIO is specified. */
|
|
/* Get the mux out of reset if a reset GPIO is specified. */
|
|
- gpio = devm_gpiod_get(&client->dev, "reset");
|
|
|
|
- if (!IS_ERR(gpio))
|
|
|
|
- gpiod_direction_output(gpio, 0);
|
|
|
|
|
|
+ gpio = devm_gpiod_get_optional(&client->dev, "reset", GPIOD_OUT_LOW);
|
|
|
|
+ if (IS_ERR(gpio))
|
|
|
|
+ return PTR_ERR(gpio);
|
|
|
|
|
|
/* Write the mux register at addr to verify
|
|
/* Write the mux register at addr to verify
|
|
* that the mux is in fact present. This also
|
|
* that the mux is in fact present. This also
|