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=-12.2 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 E5FA8C433DB for ; Tue, 19 Jan 2021 18:31:11 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E319322CAD for ; Tue, 19 Jan 2021 18:31:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E319322CAD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BFFE918C6; Tue, 19 Jan 2021 18:34:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BFFE918C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1611077730; bh=H/THdVmSdhA3Cl0SXsGlx/ZUHg2eqhfs/DWMqOqSu/I=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=n398KmrkQMNhBxM+FkEsUt6zD5hR+ep17dpcP8FGEqwbQ/YrfTu/M65kwsCLDEZ8s 3MyKw0n5/ogqggwfq37OfxsuN5k3+/VYw3nxb10ZTetTmQQgz+JkwRzI/upIYYyvpo 8wccIFyGYRlgrNY6lGT1XSYQ9aY3BJz/zCBaQLRk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2384AF80255; Tue, 19 Jan 2021 18:34:40 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0031AF80257; Tue, 19 Jan 2021 18:34:38 +0100 (CET) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6C50AF800FE for ; Tue, 19 Jan 2021 18:34:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6C50AF800FE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UURw0+UW" Received: by mail-qk1-x733.google.com with SMTP id k193so1517860qke.6 for ; Tue, 19 Jan 2021 09:34:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=p8tNnzd4y2KJS/reGqJBwxz1GlmlM3VOZcIG7Ld49os=; b=UURw0+UWpe4aBZNtUILUdnwTTMO1z8WUJzSWZTGPjiftc+oGCvSwte9YNL490jXhJF ZMnFHWbUZvKenzQacEy16CV4FbJg46GhIqUCnIO0yYn9wMYUJGFlVcXLubVyORs4HKsP mLqAhRyj5m8cezm5qBLezA//8tM/X71+wPf+pPCQpUBxJMijzB/j9uhLLPT79r0c1QTS Gt3nRfyb3gZvePzLJUZYU1ZIDIsP1+lCmEYFlB69v48s30WDoXChwvgMl2R1vd22NIIy v7UVbFSGJenO3HurJUww+WAwho2Q23TYuIC2HUknAjJdreqZSa91bxJgEBzKIZcMgk6R 2eOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=p8tNnzd4y2KJS/reGqJBwxz1GlmlM3VOZcIG7Ld49os=; b=CL04gv5JaoVGh6HYCAGdSTfSuF/PBRVEAep+nzCvfh7+PthuUQRKeHeTx3Ck1oOLW8 yj//le45cXFmkN1HgUzy5ZKjFfg5DB7pYjRGNFnZBnRXvGPwEmHjjzDDW1ClZlsM8DqY dDHzY6lbEm5OqTCF1suhcupGsfYey6YkcLoeL0PWMpUyFiwXN3j/j8LDs1axO4nMAiJK SJPx26BRdG2Apde7Y500mOnIYACEk4RVCJhj1Jn2sVdfSSQ2QUFElCAozXmumrwlqKlv zxv/YrOaueveeRHBkcqPyjWSxq7e3Q9l/rQZcb7DSqF+84KS9O82NotUgSMoPMWLo/7f 7Ggw== X-Gm-Message-State: AOAM533+KiCgORrqBepk4roLcYoikE7XgY5SKdms92HJJ2joXn2lfdVO 0bZsTv1PA9KZHCX3PcCOqGc= X-Google-Smtp-Source: ABdhPJxnBhaCimzZgQX62uN2ZXLlnTeBj4V52zrzuS8102pthkDV0hPys/7gF47J3dljrPwAm+Gz6Q== X-Received: by 2002:a37:a110:: with SMTP id k16mr5462338qke.320.1611077673854; Tue, 19 Jan 2021 09:34:33 -0800 (PST) Received: from localhost ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id k141sm13376514qke.38.2021.01.19.09.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 09:34:32 -0800 (PST) Date: Tue, 19 Jan 2021 18:34:30 +0100 From: Thierry Reding To: Dmitry Osipenko Subject: Re: [PATCH v1 5/5] ASoC: tegra: ahub: Reset hardware properly Message-ID: References: <20210112125834.21545-1-digetx@gmail.com> <20210112125834.21545-6-digetx@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gssaDyI1tNRHdKsC" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.4 (26f41dd1) (2020-12-30) Cc: alsa-devel@alsa-project.org, Nicolas Chauvet , linux-kernel@vger.kernel.org, Sameer Pujar , Takashi Iwai , Peter Geis , linux-tegra@vger.kernel.org, Jonathan Hunter X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" --gssaDyI1tNRHdKsC Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 18, 2021 at 03:02:38AM +0300, Dmitry Osipenko wrote: > 15.01.2021 18:44, Thierry Reding =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > On Tue, Jan 12, 2021 at 03:58:34PM +0300, Dmitry Osipenko wrote: > >> Assert hardware reset before clocks are enabled and then de-assert it > >> after clocks are enabled. This brings hardware into a predictable state > >> and removes relying on implicit de-assertion of resets which is done by > >> the clk driver. > >> > >> Tested-by: Peter Geis > >> Tested-by: Nicolas Chauvet > >> Signed-off-by: Dmitry Osipenko > >> --- > >> sound/soc/tegra/tegra30_ahub.c | 33 ++++++++++++++++----------------- > >> sound/soc/tegra/tegra30_ahub.h | 1 + > >> 2 files changed, 17 insertions(+), 17 deletions(-) > >> > >> diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_= ahub.c > >> index 4dbb58f7ea36..246cf6a373a1 100644 > >> --- a/sound/soc/tegra/tegra30_ahub.c > >> +++ b/sound/soc/tegra/tegra30_ahub.c > >> @@ -65,10 +65,20 @@ static int tegra30_ahub_runtime_resume(struct devi= ce *dev) > >> { > >> int ret; > >> =20 > >> + ret =3D reset_control_assert(ahub->reset); > >> + if (ret) > >> + return ret; > >> + > >> ret =3D clk_bulk_prepare_enable(ahub->nclocks, ahub->clocks); > >> if (ret) > >> return ret; > >> =20 > >> + ret =3D reset_control_reset(ahub->reset); > >> + if (ret) { > >> + clk_bulk_disable_unprepare(ahub->nclocks, ahub->clocks); > >> + return ret; > >> + } > >> + > >> regcache_cache_only(ahub->regmap_apbif, false); > >> regcache_cache_only(ahub->regmap_ahub, false); > >> =20 > >> @@ -462,7 +472,6 @@ static int tegra30_ahub_probe(struct platform_devi= ce *pdev) > >> { > >> const struct of_device_id *match; > >> const struct tegra30_ahub_soc_data *soc_data; > >> - struct reset_control *rst; > >> struct resource *res0; > >> void __iomem *regs_apbif, *regs_ahub; > >> int ret =3D 0; > >> @@ -475,22 +484,6 @@ static int tegra30_ahub_probe(struct platform_dev= ice *pdev) > >> return -EINVAL; > >> soc_data =3D match->data; > >> =20 > >> - /* > >> - * The AHUB hosts a register bus: the "configlink". For this to > >> - * operate correctly, all devices on this bus must be out of reset. > >> - * Ensure that here. > >> - */ > >> - rst =3D of_reset_control_array_get_exclusive(pdev->dev.of_node); > >> - if (IS_ERR(rst)) { > >> - dev_err(&pdev->dev, "Can't get reset: %p\n", rst); > >> - return PTR_ERR(rst); > >> - } > >> - > >> - ret =3D reset_control_deassert(rst); > >> - reset_control_put(rst); > >> - if (ret) > >> - return ret; > >> - > >> ahub =3D devm_kzalloc(&pdev->dev, sizeof(struct tegra30_ahub), > >> GFP_KERNEL); > >> if (!ahub) > >> @@ -507,6 +500,12 @@ static int tegra30_ahub_probe(struct platform_dev= ice *pdev) > >> if (ret) > >> return ret; > >> =20 > >> + ahub->reset =3D devm_reset_control_array_get_exclusive(&pdev->dev); > >> + if (IS_ERR(ahub->reset)) { > >> + dev_err(&pdev->dev, "Can't get reset: %p\n", ahub->reset); > >=20 > > I didn't notice that the prior patch already introduced this, but I'd > > prefer for this to either be %pe so that the symbolic error name is > > printed, or %ld with PTR_ERR(ahub->reset) to format this in a more > > standard way that can be more easily grepped for and parsed. >=20 > This is already fixed in v2. Good catch anyways, thanks. >=20 > > It also seems like the prior patch that converts this to use > > of_reset_control_array_get_exclusive() is a bit pointless now. Why not > > just move to this directly instead? >=20 > These are two independent changes. The previous patch fixed the missing > resets, this patch changes the hardware initialization logic. But moving to devm_reset_control_array_get_exclusive() isn't really part of the hardware initialization logic change, right? So it's not strictly related to the rest of this patch. Anyway, I don't feel strongly about it being part of this patch, so feel free to keep it here. Thierry --gssaDyI1tNRHdKsC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmAHGCYACgkQ3SOs138+ s6E2pw//fpPwc7rRFuwtI+fpGYhR9bkSJGAsW8c13WeGUXpmIBG24DNPTMa5Dwjr dunxgN+tl4MRPvegW2vqWIDy/Gasxcp1eCryiYSal2W3UsDSb3B8DO/6zo4l0jUF XjLRslsDLVlXPvtiKLTeIAV6xbWmvjXvYLv0kZ6KrPj61PmSdejglDq+WqhG+mZu qYodRgqRCByrfjVhR1pvTtARbSZl+iQLsb9RhomzsB/bJUITiIu6+/ZVi+r/i6aR xj7mUu9YKkTmpVVi4Wv480Tuq2+u5sZc569FA6utPWAEelPdiFpDJrEjz6eq9Ouj ImjgMqZwFsERkJaAb35BU1eXn+VlylLjn8L+pzfGj2zW3TLrQ++Be7UY3iftlhrD qYssfr1rQmElNd1UuCWDDF5fyp1T423mxupboWmrai4iIAe+aUmgXlZZfHQaaI60 5I4niaNihm9R4ZzBlkGvS7p93/dmSHY5MMAyTDMLrGXzt076MGcWezBk6P/jAW+m /hwWBXaRnf1E1v0BYX89P8pHUIr07LhmeYTu8IJGTna0IiLexmDrzh1U7gnw/MUk SbRFMYKCm4x5P3DSk9AnKo7R4yWavYohy9GMFVCQA48HLKAukKWLiDc1ayalNPf/ Cb7exez/22oxAeTG+OWRH26o41R727BtXkl+SCP0tLj6X9urpQw= =ejHG -----END PGP SIGNATURE----- --gssaDyI1tNRHdKsC-- 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=-14.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 2AEC5C10F04 for ; Tue, 19 Jan 2021 18:29:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA7C522AAA for ; Tue, 19 Jan 2021 18:29:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389382AbhASRfR (ORCPT ); Tue, 19 Jan 2021 12:35:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387620AbhASRfP (ORCPT ); Tue, 19 Jan 2021 12:35:15 -0500 Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 974A6C061573; Tue, 19 Jan 2021 09:34:34 -0800 (PST) Received: by mail-qk1-x730.google.com with SMTP id 143so22577739qke.10; Tue, 19 Jan 2021 09:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=p8tNnzd4y2KJS/reGqJBwxz1GlmlM3VOZcIG7Ld49os=; b=UURw0+UWpe4aBZNtUILUdnwTTMO1z8WUJzSWZTGPjiftc+oGCvSwte9YNL490jXhJF ZMnFHWbUZvKenzQacEy16CV4FbJg46GhIqUCnIO0yYn9wMYUJGFlVcXLubVyORs4HKsP mLqAhRyj5m8cezm5qBLezA//8tM/X71+wPf+pPCQpUBxJMijzB/j9uhLLPT79r0c1QTS Gt3nRfyb3gZvePzLJUZYU1ZIDIsP1+lCmEYFlB69v48s30WDoXChwvgMl2R1vd22NIIy v7UVbFSGJenO3HurJUww+WAwho2Q23TYuIC2HUknAjJdreqZSa91bxJgEBzKIZcMgk6R 2eOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=p8tNnzd4y2KJS/reGqJBwxz1GlmlM3VOZcIG7Ld49os=; b=JnTFkuA2sJU1HQSPW/RwOMn2M9J1t9TX/J8ys0aG4JFwR8kPmcMhP7Dfnf0eIUwNix EhKh+s8q5K4CR1mGw0NEE3eCKNJURM0we7u+kSJjni5x77S/yAmL0bSZV4twgZse2Npg dzANyNic6dlXffwP9QRaKzOCyd138xaKD2Gb8qxvzRvy9AyiwkIagi8yMB036WO0Siex 6Iy3IDmgxiU5GtZDx6+rRjXO0yDwBGrcP21/Ngm4K2nIbWJltDiNp3GYRQRScskIaQO1 UYBx6l2SfRNYngE46N4wx4+60YqMxUbkj8BVqVjSwCY8tmvpu+OZ9iyWsMMEstuygHWW 5CZw== X-Gm-Message-State: AOAM533fjzysptvgTjGqt5x6wxDFG65QRVIb6et0AgOybX6Hp3B/6o4h wI6FwT9xX8SnTCINO9rRZQI6iqLHw5U= X-Google-Smtp-Source: ABdhPJxnBhaCimzZgQX62uN2ZXLlnTeBj4V52zrzuS8102pthkDV0hPys/7gF47J3dljrPwAm+Gz6Q== X-Received: by 2002:a37:a110:: with SMTP id k16mr5462338qke.320.1611077673854; Tue, 19 Jan 2021 09:34:33 -0800 (PST) Received: from localhost ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id k141sm13376514qke.38.2021.01.19.09.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 09:34:32 -0800 (PST) Date: Tue, 19 Jan 2021 18:34:30 +0100 From: Thierry Reding To: Dmitry Osipenko Cc: Jonathan Hunter , Sameer Pujar , Peter Geis , Nicolas Chauvet , Takashi Iwai , Jaroslav Kysela , alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 5/5] ASoC: tegra: ahub: Reset hardware properly Message-ID: References: <20210112125834.21545-1-digetx@gmail.com> <20210112125834.21545-6-digetx@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gssaDyI1tNRHdKsC" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.4 (26f41dd1) (2020-12-30) Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org --gssaDyI1tNRHdKsC Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 18, 2021 at 03:02:38AM +0300, Dmitry Osipenko wrote: > 15.01.2021 18:44, Thierry Reding =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > On Tue, Jan 12, 2021 at 03:58:34PM +0300, Dmitry Osipenko wrote: > >> Assert hardware reset before clocks are enabled and then de-assert it > >> after clocks are enabled. This brings hardware into a predictable state > >> and removes relying on implicit de-assertion of resets which is done by > >> the clk driver. > >> > >> Tested-by: Peter Geis > >> Tested-by: Nicolas Chauvet > >> Signed-off-by: Dmitry Osipenko > >> --- > >> sound/soc/tegra/tegra30_ahub.c | 33 ++++++++++++++++----------------- > >> sound/soc/tegra/tegra30_ahub.h | 1 + > >> 2 files changed, 17 insertions(+), 17 deletions(-) > >> > >> diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_= ahub.c > >> index 4dbb58f7ea36..246cf6a373a1 100644 > >> --- a/sound/soc/tegra/tegra30_ahub.c > >> +++ b/sound/soc/tegra/tegra30_ahub.c > >> @@ -65,10 +65,20 @@ static int tegra30_ahub_runtime_resume(struct devi= ce *dev) > >> { > >> int ret; > >> =20 > >> + ret =3D reset_control_assert(ahub->reset); > >> + if (ret) > >> + return ret; > >> + > >> ret =3D clk_bulk_prepare_enable(ahub->nclocks, ahub->clocks); > >> if (ret) > >> return ret; > >> =20 > >> + ret =3D reset_control_reset(ahub->reset); > >> + if (ret) { > >> + clk_bulk_disable_unprepare(ahub->nclocks, ahub->clocks); > >> + return ret; > >> + } > >> + > >> regcache_cache_only(ahub->regmap_apbif, false); > >> regcache_cache_only(ahub->regmap_ahub, false); > >> =20 > >> @@ -462,7 +472,6 @@ static int tegra30_ahub_probe(struct platform_devi= ce *pdev) > >> { > >> const struct of_device_id *match; > >> const struct tegra30_ahub_soc_data *soc_data; > >> - struct reset_control *rst; > >> struct resource *res0; > >> void __iomem *regs_apbif, *regs_ahub; > >> int ret =3D 0; > >> @@ -475,22 +484,6 @@ static int tegra30_ahub_probe(struct platform_dev= ice *pdev) > >> return -EINVAL; > >> soc_data =3D match->data; > >> =20 > >> - /* > >> - * The AHUB hosts a register bus: the "configlink". For this to > >> - * operate correctly, all devices on this bus must be out of reset. > >> - * Ensure that here. > >> - */ > >> - rst =3D of_reset_control_array_get_exclusive(pdev->dev.of_node); > >> - if (IS_ERR(rst)) { > >> - dev_err(&pdev->dev, "Can't get reset: %p\n", rst); > >> - return PTR_ERR(rst); > >> - } > >> - > >> - ret =3D reset_control_deassert(rst); > >> - reset_control_put(rst); > >> - if (ret) > >> - return ret; > >> - > >> ahub =3D devm_kzalloc(&pdev->dev, sizeof(struct tegra30_ahub), > >> GFP_KERNEL); > >> if (!ahub) > >> @@ -507,6 +500,12 @@ static int tegra30_ahub_probe(struct platform_dev= ice *pdev) > >> if (ret) > >> return ret; > >> =20 > >> + ahub->reset =3D devm_reset_control_array_get_exclusive(&pdev->dev); > >> + if (IS_ERR(ahub->reset)) { > >> + dev_err(&pdev->dev, "Can't get reset: %p\n", ahub->reset); > >=20 > > I didn't notice that the prior patch already introduced this, but I'd > > prefer for this to either be %pe so that the symbolic error name is > > printed, or %ld with PTR_ERR(ahub->reset) to format this in a more > > standard way that can be more easily grepped for and parsed. >=20 > This is already fixed in v2. Good catch anyways, thanks. >=20 > > It also seems like the prior patch that converts this to use > > of_reset_control_array_get_exclusive() is a bit pointless now. Why not > > just move to this directly instead? >=20 > These are two independent changes. The previous patch fixed the missing > resets, this patch changes the hardware initialization logic. But moving to devm_reset_control_array_get_exclusive() isn't really part of the hardware initialization logic change, right? So it's not strictly related to the rest of this patch. Anyway, I don't feel strongly about it being part of this patch, so feel free to keep it here. Thierry --gssaDyI1tNRHdKsC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmAHGCYACgkQ3SOs138+ s6E2pw//fpPwc7rRFuwtI+fpGYhR9bkSJGAsW8c13WeGUXpmIBG24DNPTMa5Dwjr dunxgN+tl4MRPvegW2vqWIDy/Gasxcp1eCryiYSal2W3UsDSb3B8DO/6zo4l0jUF XjLRslsDLVlXPvtiKLTeIAV6xbWmvjXvYLv0kZ6KrPj61PmSdejglDq+WqhG+mZu qYodRgqRCByrfjVhR1pvTtARbSZl+iQLsb9RhomzsB/bJUITiIu6+/ZVi+r/i6aR xj7mUu9YKkTmpVVi4Wv480Tuq2+u5sZc569FA6utPWAEelPdiFpDJrEjz6eq9Ouj ImjgMqZwFsERkJaAb35BU1eXn+VlylLjn8L+pzfGj2zW3TLrQ++Be7UY3iftlhrD qYssfr1rQmElNd1UuCWDDF5fyp1T423mxupboWmrai4iIAe+aUmgXlZZfHQaaI60 5I4niaNihm9R4ZzBlkGvS7p93/dmSHY5MMAyTDMLrGXzt076MGcWezBk6P/jAW+m /hwWBXaRnf1E1v0BYX89P8pHUIr07LhmeYTu8IJGTna0IiLexmDrzh1U7gnw/MUk SbRFMYKCm4x5P3DSk9AnKo7R4yWavYohy9GMFVCQA48HLKAukKWLiDc1ayalNPf/ Cb7exez/22oxAeTG+OWRH26o41R727BtXkl+SCP0tLj6X9urpQw= =ejHG -----END PGP SIGNATURE----- --gssaDyI1tNRHdKsC--