From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3659DC388F9 for ; Wed, 11 Nov 2020 10:16:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4C5420795 for ; Wed, 11 Nov 2020 10:16:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="w/TRaMIC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727317AbgKKKP7 (ORCPT ); Wed, 11 Nov 2020 05:15:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:46362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727017AbgKKKP7 (ORCPT ); Wed, 11 Nov 2020 05:15:59 -0500 Received: from mail-oo1-f46.google.com (mail-oo1-f46.google.com [209.85.161.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4D2EA20825 for ; Wed, 11 Nov 2020 10:15:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605089758; bh=fj/d+uUSa66ZXaIECxvpPkifnEUL90fECrea16eIp0M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=w/TRaMICMK+LsuUIxKTT+0VMfl7UhviTUY8AbG2saPsB6F0YnX1CPDLgBHfOW7DT1 SdIKAeLjiGcBGfzZbioSFRel6QCaMQ9suSsk/fq5vdW7ZAJfnUgun9uSCSp/yYHfb2 4el+Q35N1YieGgcBmRuD7TiRFcE4FQTHYoyUsNpQ= Received: by mail-oo1-f46.google.com with SMTP id z14so298058oom.10 for ; Wed, 11 Nov 2020 02:15:58 -0800 (PST) X-Gm-Message-State: AOAM533UsIaabcOj5G23kmzaJhrFfpQaB5x2/N6Vdn6sjmq1yO7s2yXZ Hjc72Z2T8V2NCuIcixVyonReuzqLmNRwO1/qDkw= X-Google-Smtp-Source: ABdhPJwtNRXuWaEVN4XEu7vmXIZ5rZS3ocIXzp7zkmE3duoxizMeqxoGQhMBm/S09yPMpYnA+Rj7vu2Tl0Q8WWLpQF0= X-Received: by 2002:a4a:a217:: with SMTP id m23mr16529435ool.26.1605089757445; Wed, 11 Nov 2020 02:15:57 -0800 (PST) MIME-Version: 1.0 References: <20201110161338.18198-1-enric.balletbo@collabora.com> In-Reply-To: <20201110161338.18198-1-enric.balletbo@collabora.com> From: Arnd Bergmann Date: Wed, 11 Nov 2020 11:15:41 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] mfd: syscon: Add syscon_regmap_lookup_by_phandle_optional() function. To: Enric Balletbo i Serra Cc: "linux-kernel@vger.kernel.org" , Collabora Kernel ML , Nicolas Boichat , Matthias Brugger , Arnd Bergmann , Lee Jones Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 10, 2020 at 5:13 PM Enric Balletbo i Serra wrote: > > This adds syscon_regmap_lookup_by_phandle_optional() function to get an > optional regmap. > > It behaves the same as syscon_regmap_lookup_by_phandle() except where > there is no regmap phandle. In this case, instead of returning -ENODEV, > the function returns NULL. This makes error checking simpler when the > regmap phandle is optional. > > Suggested-by: Nicolas Boichat > Signed-off-by: Enric Balletbo i Serra > Reviewed-by: Matthias Brugger Reviewed-by: Arnd Bergmann