The device's hardware reset pin is only required if the platform must be able to update the device's firmware on the fly. As such, demote the reset GPIO to optional in support of devices that ship with pre-programmed firmware and don't route the reset pin back to the SOC. If user space attempts to push updated firmware which would rely upon the reset pin to wake the bootloader, attempts to reach the bootloader are simply NAK'd and the device resumes normally. Signed-off-by: Jeff LaBundy <jeff@xxxxxxxxxxx> --- drivers/input/touchscreen/iqs5xx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/iqs5xx.c b/drivers/input/touchscreen/iqs5xx.c index babd1f1..dac132b 100644 --- a/drivers/input/touchscreen/iqs5xx.c +++ b/drivers/input/touchscreen/iqs5xx.c @@ -242,6 +242,9 @@ static void iqs5xx_reset(struct i2c_client *client) { struct iqs5xx_private *iqs5xx = i2c_get_clientdata(client); + if (!iqs5xx->reset_gpio) + return; + gpiod_set_value_cansleep(iqs5xx->reset_gpio, 1); usleep_range(200, 300); @@ -1045,8 +1048,8 @@ static int iqs5xx_probe(struct i2c_client *client, i2c_set_clientdata(client, iqs5xx); iqs5xx->client = client; - iqs5xx->reset_gpio = devm_gpiod_get(&client->dev, - "reset", GPIOD_OUT_LOW); + iqs5xx->reset_gpio = devm_gpiod_get_optional(&client->dev, + "reset", GPIOD_OUT_LOW); if (IS_ERR(iqs5xx->reset_gpio)) { error = PTR_ERR(iqs5xx->reset_gpio); dev_err(&client->dev, "Failed to request GPIO: %d\n", error); -- 2.7.4