1
0
Fork 0

Input: wacom_i2c - Add support for reset control

Signed-off-by: Alistair Francis <alistair@alistair23.me>
rM2-mainline
Alistair Francis 2021-03-30 09:05:20 -04:00
parent 2d99729531
commit 42f9e302e1
1 changed files with 9 additions and 0 deletions

View File

@ -193,6 +193,7 @@ static int wacom_i2c_probe(struct i2c_client *client,
{
struct wacom_i2c *wac_i2c;
struct input_dev *input;
struct reset_control *rstc;
struct wacom_features features = { 0 };
int error;
@ -201,6 +202,14 @@ static int wacom_i2c_probe(struct i2c_client *client,
return -EIO;
}
rstc = devm_reset_control_get_optional_exclusive(&client->dev, NULL);
if (IS_ERR(rstc)) {
dev_err(&client->dev, "Failed to get reset control before init\n");
return PTR_ERR(rstc);
}
reset_control_reset(rstc);
error = wacom_query_device(client, &features);
if (error)
return error;