Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4207482pxv; Tue, 27 Jul 2021 01:14:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgCCjLOoFAt/0pz30iEQl8+Mr1nNzbvPPrppZ2tPMP04xiqKCrYSJy0TX3voGmgvMEEEg3 X-Received: by 2002:a05:6e02:78c:: with SMTP id q12mr16708694ils.243.1627373673526; Tue, 27 Jul 2021 01:14:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627373673; cv=none; d=google.com; s=arc-20160816; b=UZPyT7tPaaCn3shEVi3V3VZQED65G9ETllc/mvvJl1sH6KuLhA8mrXTKoBjuyQ/Pbq tZtjHgEwPP5IlZmnXw3bq8qC7kgkwcZ6NpXR+gP45d0G3i5OvFD+4EpmaIZrRkn6EIRP GSOT1sD1a6M6Wj8M+VrqUoNd0jsNLzZP4Q++c7qgb9iKFJruRRdl6dXbqSGyi2kW/ePx BgXqfx730CA3wiycKUgg0GxPblb7Inikgzs+fz4LCxEA9nhUMu6/LwLVIBSNzn8KlEYD vJjVVSGH/5fRE5moln+61O+7dk2d2nzaTnNV5m0lOKm1dkweA9T0sNQLgPQc4S/UX2bu FpYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=im8VEvRmhGOsa5ehDmVbpziSSyhYB5sV293w81CanaU=; b=ngzerDcCmj/zOtKHxz3uKFDnfXLLe4aSWsxiX4HBxPPgsHjxnu+aUWN61VHq48KMX6 pYn16B8TZ/ci/7Axes4SlTne5ZKE9Rt+HCnSlnODVmMchgUpk0ndUFMlk72GqQjbXxN7 nXOWXlXOQC1LYFB/7H2IJnaV7pgbBogqUKanOCdSiVjwhNGcBo+hA1t3LWe6PO0Qm5eV dYlBBh1aBjm1pgEcdeEG5v5k5u/gtqT9DEOqYNEMJVdyfRzLq2H1U9mHEHFYXxBXmzXu 5Ovt5c+ZQTkXHPBNcXuKLMebvWjDXsGQf/RiEUoT/fnxO0znQUS8C5RTjlcbLfmpR7OR yZFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x1si2475742iow.49.2021.07.27.01.14.21; Tue, 27 Jul 2021 01:14:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235919AbhG0INg convert rfc822-to-8bit (ORCPT + 99 others); Tue, 27 Jul 2021 04:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235885AbhG0INf (ORCPT ); Tue, 27 Jul 2021 04:13:35 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28207C061757 for ; Tue, 27 Jul 2021 01:13:36 -0700 (PDT) Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8IDP-0007jS-2I; Tue, 27 Jul 2021 10:13:27 +0200 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1m8IDO-0007JH-02; Tue, 27 Jul 2021 10:13:26 +0200 Message-ID: <145309b88353d4127c659dfabd374252cb2afc48.camel@pengutronix.de> Subject: Re: [PATCH v3 2/3] iio: adc: Add driver for Renesas RZ/G2L A/D converter From: Philipp Zabel To: "Lad, Prabhakar" Cc: Lad Prabhakar , Geert Uytterhoeven , Rob Herring , Jonathan Cameron , Lars-Peter Clausen , Magnus Damm , Alexandru Ardelean , linux-iio , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-Renesas , LKML , Biju Das Date: Tue, 27 Jul 2021 10:13:25 +0200 In-Reply-To: References: <20210726182850.14328-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20210726182850.14328-3-prabhakar.mahadev-lad.rj@bp.renesas.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-07-27 at 09:02 +0100, Lad, Prabhakar wrote: [...] > > > + ret = devm_add_action_or_reset(&pdev->dev, > > > + rzg2l_adc_reset_assert, adc->adrstn); > > > + if (ret) { > > > + dev_err(&pdev->dev, "failed to register adrstn assert devm action, %d\n", > > > + ret); > > > + return ret; > > > + } > > > > This is the wrong way around. Installing devres actions should be done > > after the thing they are supposed to revert in case of error. You should > > move this down below the reset_control_deassert(adc->adrstn). > > > Ouch my understanding was, there won't be any harm in asserting the > reset line. Agree with will move this below > reset_control_deassert(adc->adrstn). You are probably right, but it's still better do it correctly. Just imagine one of the reset lines turns out to be shared later, or somebody else will look at this driver for inspiration. regards Philipp