lkml.org 
[lkml]   [2018]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpiolib: Defer on non-DT find_chip_by_name() failure
On Tue, Jul 3, 2018 at 8:26 PM, Janusz Krzysztofik <jmkrzyszt@gmail.com> wrote:
> Avoid replication of error code conversion in non-DT GPIO consumers'
> code by returning -EPROBE_DEFER from gpiod_find() in case a chip
> identified by its label in a registered lookup table is not ready.
>
> See https://lkml.org/lkml/2018/5/30/176 for example case.

> + /*
> + * As the lookup table indicates a chip with
> + * p->chip_label should exist, assume it may
> + * still appear latar and let the interested

latar -> later

> + * consumer be probed again or let the Deferred
> + * Probe infrastructure handle the error.
> + */
> + dev_warn(dev, "cannot find GPIO chip %s, deferring\n",
> + p->chip_label);
> + return ERR_PTR(-EPROBE_DEFER);
> }

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-07-03 22:08    [W:0.093 / U:1.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site