Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp23342imm; Tue, 3 Jul 2018 13:08:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpciVFDzW3n/EXyrGVhzWwEr1AFoKI5m3hjubp7KIA42VdwgJ06nB2k/RzwzoMJ5A9MoqVj2 X-Received: by 2002:a62:f52:: with SMTP id x79-v6mr2919967pfi.123.1530648535013; Tue, 03 Jul 2018 13:08:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530648534; cv=none; d=google.com; s=arc-20160816; b=YYrmaFfZgcIRiQya5DZpqYJo3JGH1rutxJDj12fq3yGg4KKxHsqRbhl8EENk8znwK0 DtBEppq+rsj3lAFg3gAK+57bNOmxRiFVp14n+UmMyH4eov49MxTUK/Pvqs2Xu7ti3E82 +dP1tlixTpnaoik260VR4azammvRR+AzmVKMO5PT1A6YabUxXturreiRCG6Bq5E8dcFI jrcStDBgM/lfgzIAX0noAcEscJ3uoXznvfzO8VK1RJK2LEg4T9juoeRkoT3ukmTTiedB 3ev8RRt8M4Wzlm/JhLTMSXgZrcI1IO0SIeZu1M9S70YAsO0nc8aQKrYSUd5/sV2nVpSM qi7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=oBd4iTVDmb2L0ztAc3qSgr15NkccT6o2hOCxKUuXgis=; b=Bm3M0lG4YxS8fmzo7/PSMl5Cj/g4f/MPP/mVhBuT6gpByjyoHMtiFR1Ip5rKKbRtUJ ZjpS8eVFKE/+ETB1tKX61yUWepPe4VG9q5gzdzUYbQs8Kkf7cjFgFKODUknDDHt/E18h 8A6anxxGbETjVVzisugl50hLvRKogjJrmCxw3zFbfOKMTwjY78QGVWNeA5k+YGixPuZE AvQ6/FIkE2/hzkIruAXf3Z5cBqByddVz9N9jhHv+64RSt02qC13WWIn/n8AcIOzwinkD Bf+mTkEuVVNnVl9QnoV7ajc6s4ovtAeuKPMfLTax7b8usNJDTpWWmdgmxrsIDNVISJvw jBgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D340NmQu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1-v6si1642619pge.610.2018.07.03.13.08.38; Tue, 03 Jul 2018 13:08:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D340NmQu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753105AbeGCUHi (ORCPT + 99 others); Tue, 3 Jul 2018 16:07:38 -0400 Received: from mail-vk0-f66.google.com ([209.85.213.66]:46945 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752326AbeGCUGM (ORCPT ); Tue, 3 Jul 2018 16:06:12 -0400 Received: by mail-vk0-f66.google.com with SMTP id b14-v6so1818690vke.13; Tue, 03 Jul 2018 13:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oBd4iTVDmb2L0ztAc3qSgr15NkccT6o2hOCxKUuXgis=; b=D340NmQuAMq1MWXNBUJpXI32kz/tp+uMrkL88/dAqziOEpcdaO1VwE0mjwgIChnebp xNFq9H7bJPSXaApWSdgcfU11BjQEfC3zjXOsul95KaWk1ZLFWJIAbrgThLfOnIjymwkz TE14SuI8x8xCvQ8LclfDW4LsYVTW2if7wkTJk6bANvDjFnFLmk1JO3+Pw0R3mkkOlQou 9nWjx6SC8T07Rsbygyhdyndq/d6PzZecEo7F6NraaWDUp4p4+b/kQ509KDqJEP+kQj1f TBk008cJ1hAoQg4hM/h0SltBN8FKd77+kYbyLD0OBKBvOk77TV642cvP+6boYmM4X78e KzPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oBd4iTVDmb2L0ztAc3qSgr15NkccT6o2hOCxKUuXgis=; b=epxQliy/XK+7aY+RqnSpwO5jQZrYkE9MYVyZO0lsAQta5SpF/2mEiu0CQKsTrM027M 2tkvlU0iSNueU7Iy/zg3aURLPdTyDOYOjptjxyf3fr14dGyB4xRrUdxDiiLyiG3ogOOa 3/RHfOFBvziXJfAGVaW0naTMGB9k+Hzw/6+oBHN+iuTiuPkwr5KR6kgUGB4THih4tb/g /B/g2NfnBpTd7PbKc+sEkHqTVtwJOs8+osIx9ZYj4GEDHF2tR8yohkUnokPZ2Rmurtnx XpLObDFkdZtDPTLytWGviyDdunKQZoC5fvbleLOMbpRLQ49S72sxNliAUjfXdjO5PhD3 KAFw== X-Gm-Message-State: APt69E011mqq73JvwaNTr/eMCzqbLb+/si49quvSq9z9lorJlpQz3+0C thY8RFST1W0OpBboF/r8SR7pAuMZTVa0scuo76Y= X-Received: by 2002:a1f:8e0f:: with SMTP id q15-v6mr19438719vkd.161.1530648371789; Tue, 03 Jul 2018 13:06:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Tue, 3 Jul 2018 13:06:11 -0700 (PDT) In-Reply-To: <20180703172635.32508-1-jmkrzyszt@gmail.com> References: <20180703172635.32508-1-jmkrzyszt@gmail.com> From: Andy Shevchenko Date: Tue, 3 Jul 2018 23:06:11 +0300 Message-ID: Subject: Re: [PATCH] gpiolib: Defer on non-DT find_chip_by_name() failure To: Janusz Krzysztofik Cc: Linus Walleij , Boris Brezillon , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 3, 2018 at 8:26 PM, Janusz Krzysztofik 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