From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796313572; b=ZcJ5O4xJIG5n3CAt8c4hhWUbK5ObMhB5EaIcZ7X8y4Q/KIFmX/H/MOXSzmmbgRW2Zg1R EET/Ps8cSAJnVrbhsEY4vxX29yvo4OngbIetVqDbrTQki1zL2EZ7+RWFWsG/w3m24E51X Tmt78aSeUk6z+0hmSc5LLIzrwW12KYFhr/+BB0u1SOh1illbbflrVwc73RL1N+HEGKxIs huo2oZUnW5WhjBX5oGSgEXvBzt+D1aSpFtvifrB93N+0sdGTLFhiHI7ptNKZX0iBftZpR 8F2vwAM0vXsxBAe6lDP4IwlkrEgJMKQtkLAWXJGVOeCzuT4rn/ZMOiT+0BvBMDWzHhQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796313572; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=X5ND2Z9RCKqqYqcY5L2cqeSyy/gwVlw2L7+IxuCQg1Q=; b=ky0mRONnT2nRVjxULK5lIoAnlL7LDgyu7t1eJ8Wwxp1ytjqMjIXdAhBdRcg9/8MHj0Yx YsfyJMQeKS3dXq7FWMaz9FGKgTQBRX3f+3XqHciMiSE/ALC20SLQe/5ED5XFyC3i0UJ1e H47Sp/Zk/1B0SYeKc8r0KETHTRaflliXJmL+WWWPXaL6OVLg9HaVpby4uxsurDJIS/Bh+ 9TkumX7Bi9ptEVnkO7cqNBhKkJlkh7nxvP+8krO549DgUARxcqHm2TMOcLoArF/saQ9XD Y95QIUX92TMFmN4kmedSLS1XR2oI7WJUmg76FsXpk9RCUO1nC+Eb0/cUZK5wDecW/dA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass header.d=riscstar.com header.i=@riscstar.com header.a=rsa-sha256 header.s=google header.b=W1E7K+le; arc=none smtp.remote-ip=209.85.210.43 Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88C2C606A332 for ; Thu, 3 Dec 2026 15:59:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 88C2C606A332 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar.com header.i=@riscstar.com header.a=rsa-sha256 header.s=google header.b=W1E7K+le Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-862b090e41eso17097a34.0 for ; Thu, 03 Dec 2026 07:59:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar.com; s=google; t=1796313570; x=1796918370; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=X5ND2Z9RCKqqYqcY5L2cqeSyy/gwVlw2L7+IxuCQg1Q=; b=W1E7K+le/28plAJJOlflXHQGVLLkTfBgY0ViPvSbaqalDQBk1Evxg2SskxeQllf4ZO AyE0Pk0wtbkGZRLjvlkfQNsIWM2uyKx72gJ0tM9gy7SPimCGeuX6D5q0IkqVOCiCG+wE ASEVdS9QdyRWZatkRtGk3SBmDSiskDfcJ010XRMIVsa+MpgC4UVkCLDoiDIQ/odR9IKF 5JERv0V2+MFNtP45kIwVakaqleTdi87FUgk6rW81FuMnt2H+xdK18ZzCGeeSb5G9Xz2l j0ifYuTJm/qxzkSmHxOuibs2XaxeoU5no8VKr/mRootI1i/rVPNgM9COO0iABYSQngpp gRpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796313570; x=1796918370; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=X5ND2Z9RCKqqYqcY5L2cqeSyy/gwVlw2L7+IxuCQg1Q=; b=2MxFziBu9vqe8EnahAvl569wNLtzaEEFuj5WIcTtFaboHGEQq970iwp00rf0gR1Aqb AQfQO9Z4N6/nDZ40Pd4tsBXyjg6PaqXUt2Ju80rWJ3PDgKWekh0ipcu2cKlHXsOWBgDW nk70T/scBvw/hKS2nOqdjCuw8SX20I44k20urFHwh2wrhbeUejTMt4zZLsCcEHxoMmQE 07tYKKEzoxWYcaT6r0weSof+ffT1Zwi1WqMnEvxkMGaMrNzBxm+2MgPCRGwWs3ggTo4O kSJ5kyunIv5wsyPTufppW3JsNif/MRNwnqdR4DyHDfWJKPuyyWERALeqkCQ71V9HXfNm fipw== X-Forwarded-Encrypted: i=1; AL+hErGpeiEWyo2grOiPOzYzGSmxfB2Pn/oTiYTikImVUMMz3Z1hq1b0jCqK/Ll/Rmfa+bI8x4zoXoKrJZGlzr0=@vger.kernel.org X-Gm-Message-State: APuU4Z/s7ykV6rzk+NWSfnqQx59gaZTGZkbPg1cYmFFV+ZhKnapnJ2GJ 1Q8AQqF3pxSzyReTbwL8minFEGPBUW6A5SoqadQ5QvOLRHvAMkt9OKVXvixcW54+m1o= X-Gm-Gg: AZFdTZeLPqvvF8h906aUovMyF+Uls0NsIlp3ARLFELui3QKzjRCM/ZfdjC6NYmnCpTc Wpxe9LTSr7Y6WvlcAb4u5UbysVkHWHaOVgwwt6uOKKkjjhVoaeK1EQxdRBGjmWtMOk9zGcp1c1C QhIe/cH+iLBqUc6IrRijdQ28KGf9TvxhZNiQh9BfCXr2IBOqZn7l1m+RDe/YYIaXyP2rqRErz7+ Z0mO14XY2mTyg7BFpPjPojPOfPJO7u0g0pS0fjZBlpUpzRoikRn24K1Gog3AFS4HBkQ6b8HwL+n HXZiyW9jTeGofW+5IqhdqXrzerRZY7/PWXdMKRtvJproEF7k1LU3A/RvUZ7HvCmTO8wE3ioc8lb Fp+QFthxPMpcmHgVRq8w+VXSV36kFBM1W3iADS8jm0SiFJB3JPl9yCG5Z7J5eiTV00B7u+iLp0T 9sgTlzPsXhL46nIAnYemWVLrqSBpejH032Tzioirze3MSscwmnFHIWmWbWOLSYdO9zHhnZzcpwE uPxKXUurvjNeThqw7/MFyK6zuG/E+AdrRxdlM9x1O9LMLJ7ACiAJOMlQigYW3xLgVFBQSlQ4LlE Jl9dUJ5O45hgO/sFv0HX3RXRop37QQY= X-Received: by 2002:a05:6830:2e07:b0:862:ef64:cbe with SMTP id 46e09a7af769-86315ae393cmr63790285a34.31.1796313570464; Thu, 03 Dec 2026 07:59:30 -0800 (PST) Received: from [172.22.22.28] ([76.156.233.211]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-8639242b7eesm16687448a34.24.2026.12.03.07.59.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Dec 2026 07:59:30 -0800 (PST) Message-ID: <3c272e50-2cc2-4b75-99c7-c4efc02d8201@riscstar.com> Date: Thu, 3 Dec 2026 09:59:28 -0600 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 3/4] reset: toshiba: introduce a TC9564 reset driver To: Jerome Brunet , Philipp Zabel Cc: sboyd@kernel.org, bmasney+clk@redhat.com, jbrunet+clk@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, andersson@kernel.org, konradybcio@kernel.org, abelvesa@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, daniel@riscstar.com, mohd.anwar@oss.qualcomm.com, lorenzo.bianconi@oss.qualcomm.com, fabrice.gasnier@foss.st.com, alexandre.torgue@foss.st.com, marex@nabladev.com, changhuang.liang@starfivetech.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261201160810.2422466-1-elder@riscstar.com> <20261201160810.2422466-4-elder@riscstar.com> <177dec54772e01a5ee48feaf27fc600f7fd4708d.camel@pengutronix.de> <179630588443.3767986.11954138491151588195.b4-reply@b4> Content-Language: en-US From: Alex Elder In-Reply-To: <179630588443.3767986.11954138491151588195.b4-reply@b4> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/3/26 7:51 AM, Jerome Brunet wrote: > On 2026-12-01 18:11:39+01:00, Philipp Zabel wrote: >> On Di, 2026-12-01 at 10:08 -0600, Alex Elder wrote: >> >>> Define a new auxiliary device driver that manages resets implemented >>> by the Toshiba TC9564 SoC. The TC9564 clock driver creates the reset >>> device, which will bind to this driver. >>> >>> The reset controller uses two registers to control a set of 13 resets >>> that can be asserted or deasserted. Only a subset of the resets can >>> currently be managed. The I2C and PCIE resets treated as CRITICAL, >>> meaning their state should never change (and any attempt to do so >>> results in a warning). >>> >>> The MMIO region containing the two control registers is mapped by >>> the clock controller driver, and passed via the auxiliary device's >>> platform data. >>> >>> The reset driver should normally be present whenever the TC9564 clock >>> driver is enabled, so have the COMMON_CLK_TC9564 config option *imply* >>> the reset driver's config option, RESET_TC9564. >>> >>> Co-developed-by: Daniel Thompson >>> Signed-off-by: Daniel Thompson >>> Signed-off-by: Alex Elder >>> --- >>> v4: - This is a new patch containing a new auxiliary driver for the >>> reset device. This code was previously included in the clock >>> driver. >>> - Checking for attempts to update "critical" resets is no longer >>> done at assert/deassert time. Instead, the reset controller >>> defines a new fwnode_xlate callback to check it at "get" time. >>> - The spinlock used to wrap read/modify/write updates to the >>> reset control registers is now handled by guard(). >>> >>> MAINTAINERS | 1 + >>> drivers/clk/Kconfig | 1 + >>> drivers/reset/Kconfig | 7 ++ >>> drivers/reset/Makefile | 1 + >>> drivers/reset/reset-tc9564.c | 190 +++++++++++++++++++++++++++++++++++ >>> 5 files changed, 200 insertions(+) >>> create mode 100644 drivers/reset/reset-tc9564.c >>> >>> diff --git a/MAINTAINERS b/MAINTAINERS >>> index aa52ede9a1aa3..8fe319f72eace 100644 >>> --- a/MAINTAINERS >>> +++ b/MAINTAINERS >>> @@ -28744,6 +28744,7 @@ M: Lorenzo Bianconi >>> M: Alex Elder >>> M: Daniel Thompson >>> S: Maintained >>> +F: drivers/reset/reset-tc9564.c >>> F: include/dt-bindings/reset/toshiba,tc9564.h >>> >>> TOSHIBA WMI HOTKEYS DRIVER >>> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig >>> index a3d89c55f17a5..c78c5a817adec 100644 >>> --- a/drivers/clk/Kconfig >>> +++ b/drivers/clk/Kconfig >>> @@ -187,6 +187,7 @@ config COMMON_CLK_CDCE706 >>> >>> config COMMON_CLK_TC9564 >>> tristate "Toshiba TC9564 clock support" >>> + imply RESET_TC9564 >> >> I'd make RESET_TC9564 default COMMON_CLK_TC9564 instead. > > That was my suggestion Philipp. Both are Ok Kconfig wise > The idea with imply is both reference are on single side > Both Kconfig and driver string are on the clock side. Are you saying that it's because the clock driver incorporates the name of the reset driver, so the clock driver config is the one whose Kconfig should imply that the reset driver gets enabled? > With default, the Kconfig ref in in reset while aux driver > reference is still in clock. It feels a little less neat to me So just to be crystal clear... you're saying you prefer the "imply" rather than doing what Philipp suggested above. > The reset needs to select the AUX BUS though Yes, that was pointed out by Sashiko earlier, for both clock and reset. (I built with defconfig for arm64, arm, riscv, loongarch, arc, and mips, and *all* of them already had AUXILIARY_BUS enabled, so this problem was not flagged.) -Alex