Input: raydium_i2c_ts - do not ignore EPROBE_DEFER from gpiod_get_optional
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 1 Jun 2016 01:15:04 +0000 (18:15 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 1 Jun 2016 18:18:59 +0000 (11:18 -0700)
commitcd467299c1153b780e8031e7490a8f8fa0a3f853
tree9da00d6b6881f8403f527431f515263248485d0b
parent48a2b783483b3ed9565348736a5148a11cfffad6
Input: raydium_i2c_ts - do not ignore EPROBE_DEFER from gpiod_get_optional

We should not be ignoring -EPROBE_DEFER reported by
devm_gpiod_get_optional(), but report it as any other error to the upper
layers. While we are at it simplify check for the presence of reset GPIO
and instead of using IS_ERR_OR_NULL just use boolean.

Also do not return -ENOMEM from suspend handler when the device in
bootloader mode as that does not make sense and switch to -EBUSY instead.

Reported-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/raydium_i2c_ts.c