lkml.org 
[lkml]   [2015]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/8] input: goodix: reset device at init
Hi Irina,

On Mon, Jun 08, 2015 at 05:37:49PM +0300, Irina Tirdea wrote:
> +static int goodix_get_gpio_config(struct goodix_ts_data *ts)
> +{
> + struct device *dev;
> + struct gpio_desc *gpiod;
> + int ret;
> +
> + if (!ts->client)
> + return -EINVAL;
> + dev = &ts->client->dev;
> +
> + /* Get interrupt GPIO pin number */
> + gpiod = devm_gpiod_get(dev, GOODIX_GPIO_INT_NAME, GPIOD_IN);
> + if (IS_ERR(gpiod)) {
> + ret = PTR_ERR(gpiod);
> + dev_err(dev, "Failed to get %s GPIO: %d\n",
> + GOODIX_GPIO_INT_NAME, ret);

You need to handle -EPROBE_DEFER (suppress error) and especially -ENOENT error
codes, otherwise, as Bastien mentioned, you will break existing DTS.

Thanks.

--
Dmitry


\
 
 \ /
  Last update: 2015-06-09 20:21    [W:0.132 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site