Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4228900pxv; Tue, 27 Jul 2021 01:58:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEWZRJIU7uUNoU8cVTtGSyO7XMpoLi8wL0IkssP0HN2l/nAH3cOonYxqcYuRXZIj61HGFH X-Received: by 2002:a05:6402:280e:: with SMTP id h14mr27429487ede.357.1627376337911; Tue, 27 Jul 2021 01:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627376337; cv=none; d=google.com; s=arc-20160816; b=R+laif9vnZtxT4g1Sr0j1ZKLtl+OYkCKuPAyiXQtN+AYLQaF2OXXcWE5dY8T1ab/6G 2FqtmasqwxXRpN20ZKa4N3Lm8fu5ukrJiZgYV0Gvrekc9wVik/fVrj94wsCqRYts8TFd zZv+zQcT3XTeN/HtXJoDp44EwCNa+tnvG8GWp3vPrUOA3rdbaz68DXcZZhry3ZdIauSV GBU3aG0DvPXhspqBJWvPSVbdTLGLia8FaAnf1IDr7LLXJAN7wKqYMPyzYEW7H6mHH4iZ fkku0klh0sFDFdBtfwZoBm1GS5EFnBRj1BVFSNCDcJbzrcEUwD6Ofqd/vZOiZP/A525X bvUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZUQsqjQOSepeZI4ZBxOYmEEPPFT7ZXJ+tIn1Wmev4CE=; b=vwoKh7HEcytkp1boJLD+1sejXHE5jdWDa6ZH3m36R7bRWTJ+qXUiR+a34PBseAeSpV EX6XlPn8Gn+SFo3bL21VKQRlkuLQPnLVlk67FZtS1H/hbA/u6Rx/ptXmcc5I8/PkUaKZ FUn8h3zHmxKmIAUKUHtH0uBLdFEBs1EpSzRdwegaQTITN5uOrXFW/e3R2AOdtzXyurwW 1ghqMrg4g0O3IY7JYTdQ3iz/5vPuO/4vjiGnSSlT6cf5S6ImO1PHQ/O5TcT+fLSV7NAQ jXEwW0YbnOnBPGlAFCznNMHAbW0gEEncOT5ZNF4NWY0/Wr4Zg6WDV/2gTGQg+YbNGkTz ycqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BPucyRw+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si2263376ejn.748.2021.07.27.01.58.34; Tue, 27 Jul 2021 01:58:57 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BPucyRw+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236046AbhG0Iyv (ORCPT + 99 others); Tue, 27 Jul 2021 04:54:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236027AbhG0Iyr (ORCPT ); Tue, 27 Jul 2021 04:54:47 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06662C061760; Tue, 27 Jul 2021 01:54:47 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id z18so19500540ybg.8; Tue, 27 Jul 2021 01:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZUQsqjQOSepeZI4ZBxOYmEEPPFT7ZXJ+tIn1Wmev4CE=; b=BPucyRw+x8i0a+bI6F04Knx1fvWTMQdoZUjVuknizS0lbZ8s7JatONrR/kerk3gRFB PUP+oz+Q0TNgd63S5RnTmcXqAgGUmth+4QEhdUraCg7s4lV3xKpAjRpdNUUamIyvENCk 4A+5mI0BN5NKum0tXazNG6Wko4rhD3t4Yzztb1l7MWXs7ZPJIoSMwO/74dyyTh0sy7U4 Qhi5+htCA1GMc8f4XdlrPM6MQeL1Y+mfKs7YHNTJ6IY7N2Ec6M7oHXekJn0+TIie2cax d5HaGkFoQH3iL5bbg28FFKuHiLfz+9UwqJgMZnl4LuT5gWab7sIEDNwQ/i3QWjMF17sw L/Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZUQsqjQOSepeZI4ZBxOYmEEPPFT7ZXJ+tIn1Wmev4CE=; b=dGNVgYSwg9Lr8mlyQnXF8xkPq+6wQ+HOIVKeslXbviBNZnjVZW7ZwUPkyFTF09ANBA DNqTr2piuZwKxvasGpjcsJc0lVTV58E4CJ3To1GJzLWbYOQuGFXirm2aRyZBm+xCa6vp 3D1T1flsbOxoTNe5wtUn5kyQtsthlPqCialeawFw5ZobBwgFbUZ3I/rgK66C2WSTkbG6 Vtfz5ZQODuRKX+n43BVqZSUP8Nd5nV9I0LVfbis95LdtwpTfLLCucICpMNllxHQggTbI ebnix/n2xK/MV6TPe52R/xjajRBIuWdzeoSBd4sh+X4HvPaekF7fWJxWLYl9SH3+MBuk k4Ag== X-Gm-Message-State: AOAM531GtRTlq61iCuBLo0L+OuF57DsvSn4CXudK/e+5hDIjjwvCZNy8 TBO0o8t7A2lR1dFb+p8g956u3IbZNpEIZXob0hE= X-Received: by 2002:a25:ba44:: with SMTP id z4mr9378257ybj.476.1627376086310; Tue, 27 Jul 2021 01:54:46 -0700 (PDT) MIME-Version: 1.0 References: <20210726182850.14328-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20210726182850.14328-3-prabhakar.mahadev-lad.rj@bp.renesas.com> <145309b88353d4127c659dfabd374252cb2afc48.camel@pengutronix.de> In-Reply-To: <145309b88353d4127c659dfabd374252cb2afc48.camel@pengutronix.de> From: "Lad, Prabhakar" Date: Tue, 27 Jul 2021 09:54:20 +0100 Message-ID: Subject: Re: [PATCH v3 2/3] iio: adc: Add driver for Renesas RZ/G2L A/D converter To: Philipp Zabel 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Philipp, On Tue, Jul 27, 2021 at 9:13 AM Philipp Zabel wrote: > > 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. > Agreed, will do it the right way! Cheers, Prabhakar