From nobody Wed Dec 21 11:29:00 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NcWRc4NRmz1GM4B; Wed, 21 Dec 2022 11:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NcWRc2lwYz3sGc; Wed, 21 Dec 2022 11:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671622140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pt7DSehXHxM6VSm5QhxDEapbsNO7PqEJFi6Zc5Plllc=; b=gXNutt1AqXQeZXEGA2YQ6koMyMXG/Rjdf1JTql8YuUN6vJnN1FGF75kv/QpB9K2sy5oqNx 6/Zs4Qzta7reqGG/d6TfBO6yZrngiI44JP3UrkVclYUs7BFem7U9UbMwrnvL4HuFZtXbWA Okg3pxWWaLou8bsdB0BhctaiPdj1+aa5iyFjna5jx3WWC9wJDO1FfZVAxf19TriTG5MQwj LLncteiDrPC8COdy9SeS+YjL2xaNLN4J9QM79KsX+UbXzbGythrsqeuF+26q2AnELJ8K7E xLKinndmrCCHdH/osCbI0KftYbo6nPKMQcZ41r1wZzVfunGidyfbDdrzmL0zlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671622140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pt7DSehXHxM6VSm5QhxDEapbsNO7PqEJFi6Zc5Plllc=; b=wryJao1kggdkEqmOWPxx+xu9LnrH2Ww/dHijb45S3Xd+XtK4m3px7ZPxi8CSEYJ+vrrxtT MOwT+l5iVz61ZCf1V0MfVYL7IRxiZHXgJqfwLwXWu67AWS6PFVERiHAwq2YzqeDcCGwzxx IGiCW9kwQ1nOOUYmzDLJ4ScY51xgIra+n4x47pKYHvr0UQ56aJD5NmELubMhLh7dFqhHt1 tcWw9MRTexBvZvBjPgi79NISjmdyDZwrNbRc+Is8V6QwrqVgghAXA1qVqgVU//BTGPaB/9 /hdum37KBsVDP+x20XmrwFPLkjppuu9KgrHusUfAZ/A5hV0KfunPGH4PTT86Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671622140; a=rsa-sha256; cv=none; b=bR6IwjmHN1Yo6HS8m/n41CHZlBuBx1yhsGdhb40wpzXNGg3V1MXDbFCI6Y+gZwX4IqhPWh LmS5xEzEIRjKR+8rv0D0hupqdYJJmApf2mHoYjAWVbIMbLFCzF4j7nmRlrPVnhlQZznafw mu2leDu0sAfAEyvDMrSxFpOsl7nIbo2Oj8DYqi3+YKo+nsTJgMbhqJFP8qfXWkRAGj1MHa MQSXUnau85aLUGI+pK5B8LQYadmEpXjY6fZ6nsPEhlS1sv1KKiNyoX11PcK7/q25XpRJJO +evdGyycU/DwMNPK1EY3SbD6V/Xlrzpty13fbYwLudtorokrUIgmYYy0fWzGNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NcWRc1YJRz1CV4; Wed, 21 Dec 2022 11:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BLBT0nm055545; Wed, 21 Dec 2022 11:29:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BLBT08B055544; Wed, 21 Dec 2022 11:29:00 GMT (envelope-from git) Date: Wed, 21 Dec 2022 11:29:00 GMT Message-Id: <202212211129.2BLBT08B055544@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 7ebc4c9bf76d - main - Use hwreset_array in the Rockchip tsadc driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ebc4c9bf76d1ea62e2ccd3020ff8e6e293b499c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=7ebc4c9bf76d1ea62e2ccd3020ff8e6e293b499c commit 7ebc4c9bf76d1ea62e2ccd3020ff8e6e293b499c Author: Andrew Turner AuthorDate: 2022-11-11 08:58:34 +0000 Commit: Andrew Turner CommitDate: 2022-12-21 11:25:27 +0000 Use hwreset_array in the Rockchip tsadc driver The order of asserting/deasserting the resets doesn't matter so use the new hwreset_array to manage them all. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37358 --- sys/arm64/rockchip/rk_tsadc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/arm64/rockchip/rk_tsadc.c b/sys/arm64/rockchip/rk_tsadc.c index 2fdf13a87d79..ca8af204343d 100644 --- a/sys/arm64/rockchip/rk_tsadc.c +++ b/sys/arm64/rockchip/rk_tsadc.c @@ -139,7 +139,7 @@ struct tsadc_softc { clk_t tsadc_clk; clk_t apb_pclk_clk; - hwreset_t hwreset; + hwreset_array_t hwreset; struct syscon *grf; struct tsadc_conf *conf; @@ -736,9 +736,9 @@ tsadc_attach(device_t dev) } /* FDT resources */ - rv = hwreset_get_by_ofw_name(dev, 0, "tsadc-apb", &sc->hwreset); + rv = hwreset_array_get_ofw(dev, 0, &sc->hwreset); if (rv != 0) { - device_printf(dev, "Cannot get 'tsadc-apb' reset\n"); + device_printf(dev, "Cannot get resets\n"); goto fail; } rv = clk_get_by_ofw_name(dev, 0, "tsadc", &sc->tsadc_clk); @@ -775,7 +775,7 @@ tsadc_attach(device_t dev) sc->shutdown_pol = sc->conf->shutdown_pol; /* Wakeup controller */ - rv = hwreset_assert(sc->hwreset); + rv = hwreset_array_assert(sc->hwreset); if (rv != 0) { device_printf(dev, "Cannot assert reset\n"); goto fail; @@ -798,7 +798,7 @@ tsadc_attach(device_t dev) device_printf(dev, "Cannot enable 'apb_pclk' clock: %d\n", rv); goto fail; } - rv = hwreset_deassert(sc->hwreset); + rv = hwreset_array_deassert(sc->hwreset); if (rv != 0) { device_printf(dev, "Cannot deassert reset\n"); goto fail; @@ -832,7 +832,7 @@ fail: if (sc->apb_pclk_clk != NULL) clk_release(sc->apb_pclk_clk); if (sc->hwreset != NULL) - hwreset_release(sc->hwreset); + hwreset_array_release(sc->hwreset); if (sc->irq_res != NULL) bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); if (sc->mem_res != NULL) @@ -855,7 +855,7 @@ tsadc_detach(device_t dev) if (sc->apb_pclk_clk != NULL) clk_release(sc->apb_pclk_clk); if (sc->hwreset != NULL) - hwreset_release(sc->hwreset); + hwreset_array_release(sc->hwreset); if (sc->irq_res != NULL) bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); if (sc->mem_res != NULL)