From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796392037; b=AGiZ+UafLr+H/UrpldXKqzqxs3n3tdfsbOur8j68AyLKTTKD+XVescwqmxRXiAoY6gwi EsCU6axH3akzOtSFVzxvELs5ZuYnRXvznG9upgQWiaoCqeYwoP+8hMRmPN5ItmDrVCpbz hCSCxImuZRSqteU6VBN1YSr2zHBc3A6X9AGScG/EFk7BjYQ63K+IN65R2aD54gT8DU+Ju qIHmWpuVCEQbxXbKdSPir7V9c7p30hEXfhlXu6E23HuObuarmV0Zqjp8v1yyPKIbxuRp4 NcKztoC6g7uxj96uP3bGXFjJMoE5dSq+3ypx+nxZFma6UqRV9OxPRpmfvKvnCKc5kyQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796392037; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Date:From: To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-ORIG-GUID:X-Authority-Analysis:X-Proofpoint-Spam-Info: X-Proofpoint-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=J3JkkuPdJNO14WouLim8wAbCt2HvEFLYcHu5Nfp/N00=; b=hglYFUgCyc/fjsursfHKRQ7wDUmu3Iwx2DVZ6Yz+/avZesQt0k0EYdNPQ2qeMBNgIZI/ ngP922cZp0LNiFK7U5OdTb61Vs6SBCfXZP+vijyr4D76OAjrzRYZnVSd4o+sPuSV5iQmd 2KU62prSptp3SYqiEwLegX+3F0U9lv++tqDYfpJw1Z3qjf1ZxoTW3heRpg3SnVEthn49u uaYOyXkcHdS4fIlghuimK9lMjjkn9RS9tbOQEN2j6JcXeHTfnnMgJsLDBRdt8iLJWkaEP 7Yl3SsyViW//fWYpwkky+SPPh45LOSX45A9ll/cQYTNmoRvkIVqQ2v5WrBgWuboibmQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=gswxyTx3; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=i0cy1Emm; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7AC5606A683 for ; Fri, 4 Dec 2026 13:47:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D7AC5606A683 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=gswxyTx3; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=i0cy1Emm Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B4BI2DX1841574 for ; Fri, 4 Dec 2026 13:47:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=J3JkkuPdJNO14WouLim8wAbC t2HvEFLYcHu5Nfp/N00=; b=gswxyTx3SetbYe8XxqkLu+t2esZfL1NxGO2kulWM iZ/uCvZp+uM5Oz8RwPXkdaioPJxIQoD7Mt0kdjiORh3DpZ4S/NioqhPgWET4Q7xi xKREkLr/IJSSfwmFSGYJwg8r7dmQ20nf9PJG6nQgeTv2VdJ1WWuJla7qG2mESJOd yxwt6EE8nmjsfNaib5+aWgvac/1OHHn2DBkAS5v+G6RG4xgNmmjKUG8XwRJJrVch TR5ZdytwQ+DmxHOUbTfgJeS3w3Mw40CUxkEEU0HtnPNUrZ6HrV03gynzKVTNbmqQ 2jJrUwSizZKAedMwS9ljWTNMKNs3s5r4OS/S5NaToOPZnA== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jbq7q1fte-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 04 Dec 2026 13:47:15 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-9495af07676so124154085a.2 for ; Fri, 04 Dec 2026 05:47:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796392035; x=1796996835; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=J3JkkuPdJNO14WouLim8wAbCt2HvEFLYcHu5Nfp/N00=; b=i0cy1EmmNsXnqu5iPePMnDp3YI76HUs3Mg5ah/IBVdjABG1uzOQBVQ4ECXdXUACLZc iQuXZ81Buzqfuo3AiKurzCLOIbnCsz2Pooyli1huB4mh9hD7Y+TEbdeloSlkeKZvg9EO ShfrFVSyIVzpi1AuoF5OwC23Og01KN37iLjSBFi8eUbOBLLgMyFnA9VUo06tmR8PBf09 wO0MnDkrHOnaJ5m43mlyqmGtBogWoY6q1b/bvux7cr7qKgteUpPlC49RWkS3KQrkgzEk qMsaT0r23cusgwUrOqXApEjNSw436UxYf2aoODH0OuTdz9E0o30SMs6fdbvhManh3Ey0 tx2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796392035; x=1796996835; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=J3JkkuPdJNO14WouLim8wAbCt2HvEFLYcHu5Nfp/N00=; b=nKGzE72EyNtBArIOrgO5e3KEVpRoFSeZq6dAeBG+S7skjO4Y44Sai7fb7GkK+wqazJ E/Q9i2UBdyoZjSIkes2/OCPl5GPqNOos0A5M+LBSHLsIsfN4rAonDOZpLk9Wmxmfp5mH 2q4P1dMYkVRNdeF8dQf1zdFnDJWdPKl2kDCdmvGyDyha8N0QAQNb14y9obBrmrlR31g+ BuECW7epsV0OpV9aDxX0WssPd3HukIl9yJAmNEDV91jCPqdRzUXIdNgzxRVwZVZAw0dB SI3ejQ2fxG5iVXzAYBtRfd9KxK0uj3g8rf9dD4yr5XKVQZCAknEWfV1tqPiLuSPkASBS MJnw== X-Forwarded-Encrypted: i=1; AL+hErEMHMRIqlugoF2dMkr+OGHw9smyPQFqb3iVipf7QtaaaVv0q7jpbUgQl3jdgZ1igaqziM8gnO3IKLo=@vger.kernel.org X-Gm-Message-State: APuU4Z8SA52pnesGmH/9RKQvF2Gqwb14dpYDKRMyhrxVAm7DPmreyIA6 s5dI7Cxpk+Btys9Kh7In8cPj5yQK9Twdv5rJwGkuqCVUagG89CeKZ+T5OgPOJ4maYAGq7JXZnOo X2yONF9QUv/gJt3ZG8A70+Yk5VeyFBRo1fb/0RuW9l5MoBPSOLgMF8Mw7IsU1TBk= X-Gm-Gg: AZFdTZdd/qYRtkXWPv5D2HjiQHom8K68BfI4r8I0ouvcucih1ghdkimb5sc0YH82P5B 9frzHNoYENYS6WOYTzOEvZFlL9Ug/bIvquKFPvjOyKD0eDPZT4QYH5W8zWNBgXfPxk/gveynl/1 ZaA55Bsa+TZX8oMndB0+4miRf6bpbQ4F7EDBuncQD1TUak3/rQcKB5ojYt3MJDsL8gNWlgA/nlO R3ITffG/auagH/yg+NdNHVtUPhFwu/+9mCXH2AnIRB1kHmFNwqMUpTav4PiTdzjDDMOkPKQ2b2J Ta8Z32X0ZZqklGcwN/kzMea2lLT5QPOdfIj3hytRsft7XuNgvW4WxDLzvt7r14ChX2pSyi41VM2 D405Ndbrd03ImDodklOI/vDCWMML+squn9thnmNVn737VC9NJ3Fy4uZX28gf5Rg== X-Received: by 2002:a05:620a:2843:b0:93f:3163:3e25 with SMTP id af79cd13be357-94a827922camr266486885a.24.1796392034588; Fri, 04 Dec 2026 05:47:14 -0800 (PST) X-Received: by 2002:a05:620a:2843:b0:93f:3163:3e25 with SMTP id af79cd13be357-94a827922camr266481785a.24.1796392033940; Fri, 04 Dec 2026 05:47:13 -0800 (PST) Received: from localhost ([130.25.105.85]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe00a2f98sm168795135e9.9.2026.12.04.05.47.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 05:47:13 -0800 (PST) Date: Fri, 4 Dec 2026 14:47:12 +0100 From: Lorenzo Bianconi To: Alex Elder Cc: sboyd@kernel.org, bmasney+clk@redhat.com, jbrunet+clk@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, andersson@kernel.org, konradybcio@kernel.org, abelvesa@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, daniel@riscstar.com, mohd.anwar@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 Subject: Re: [PATCH v5 2/4] reset: toshiba: introduce a TC9564 reset driver Message-ID: References: <20261203200948.1595470-1-elder@riscstar.com> <20261203200948.1595470-3-elder@riscstar.com> <70717fcc-59a5-4029-92d7-42617160c757@riscstar.com> X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Un9wxTbMUDZm+oaY" Content-Disposition: inline In-Reply-To: <70717fcc-59a5-4029-92d7-42617160c757@riscstar.com> X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA0MDA1NCBTYWx0ZWRfX2p8rX3Zwcug6 ehvpXBvPdGxuzImc3rDCo8UAVqHrhEaZ9FDwWBo4iZi5rqK1Ed682dqRHyI4Gh4IZFe1M9DKjqH xh5qFsPvw1c8AOOYZpnyqzgMx+Yfq39sZYgzGawWcb8wZVXweMtL4S1Cv1O6/unByiVrWtzHjnr u2nD/wCxp8n2z2KgLMchKgT02ErvMrHq6w1IXjVq8tY+s2eQZeePqdMWu4Dv1AvuWE4ENlEJZDS Y/l+X/sc1dRbEhd4Jhj4r4V0z+OZq0uQ+2gS7sKqknF02dFxi7++dBYY2lEHDR21svbIkvsQfL6 oq52HsE5SV4cNSJGHAhd56skLCr9fVgVfbNqIV2WbqfQwXv7zU3NFHvqCZ8Bnf1nHX+ViIMkWZ9 Vb7TC5FF4Da3gNzVVrEln5/NbWZh5RPkeuIyKbfTf2oLoP7Ti74BYm5UblJKHr04WLdDbovqHjY JJjaj0IbcEAYV4EY6tw== X-Proofpoint-ORIG-GUID: CGOo16c0O9DNNdA5a7SYlRBXEgFA_mv9 X-Authority-Analysis: v=2.4 cv=HOtWhYtv c=1 sm=1 tr=0 ts=6b12c463 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=RcFDq6c+avmIvxkL9iwlxA==:17 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=ee_2aqc6AAAA:8 a=84AiC_8bmQjDLoUn-VQA:9 a=CjuIK1q_8ugA:10 a=DfxHtd_X_eUyKpq_lgoA:9 a=PEH46H7Ffwr30OY-TuGO:22 a=VOpmJXOdbJOWo2YY3GeN:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA0MDA1NCBTYWx0ZWRfX23FD5iWbQuy/ 1XT6KE0dRLajWgPx5bFpBXNF0SMsX9zeJaV8z0wEhNZ+HUVzDr0lPKJxCfwoFRQdTyoggqPkok2 yc5ReERwTVov45/DBsHmlzeTwVzGfA8= X-Proofpoint-GUID: CGOo16c0O9DNNdA5a7SYlRBXEgFA_mv9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-04_02,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 clxscore=1015 phishscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 impostorscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612040054 --Un9wxTbMUDZm+oaY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Dec 04, Alex Elder wrote: > On 12/4/26 3:42 AM, Lorenzo Bianconi wrote: > > > Define a new auxiliary device driver that manages resets implemented > > > by the Toshiba TC9564 SoC. The TC9564 clock driver will create the > > > reset device, which will bind to this driver. > > >=20 > > > 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. > > >=20 > > > The MMIO region containing the two control registers is mapped by > > > the clock controller driver, and passed via the auxiliary device's > > > platform data. > > >=20 > > > Some common definitions are added to to > > > specify the interface between the clock and reset drivers. > > >=20 > > > Reviewed-by: Philipp Zabel > > > Reviewed-by: Lorenzo Bianconi > > > Co-developed-by: Daniel Thompson > > > Signed-off-by: Daniel Thompson > > > Signed-off-by: Alex Elder > > > --- > > > v5: - Code related to the I2C and PCIE resets (including code that > > > warned if they were used) has been removed. > > > - The Kconfig now selects AUXILIARY_BUS > > > - Philipp's Reviewed-by tag has been added. > > >=20 > > > MAINTAINERS | 1 + > > > drivers/reset/Kconfig | 8 ++ > > > drivers/reset/Makefile | 1 + > > > drivers/reset/reset-tc9564.c | 165 +++++++++++++++++++++++++++++= +++ > > > include/linux/soc/qcom/tc9563.h | 9 ++ > > > 5 files changed, 184 insertions(+) > > > create mode 100644 drivers/reset/reset-tc9564.c > > >=20 >=20 >=20 > . . . >=20 > > > diff --git a/include/linux/soc/qcom/tc9563.h b/include/linux/soc/qcom= /tc9563.h > > > index 086f37a40d801..f778ce9ae2e7c 100644 > > > --- a/include/linux/soc/qcom/tc9563.h > > > +++ b/include/linux/soc/qcom/tc9563.h > > > @@ -16,4 +16,13 @@ > > > #define TC9563_GPIO_CONFIG TC9563_GPIO_EN0_OFFSET > > > #define TC9563_RESET_GPIO TC9563_GPIO_OUT0_OFFSET > > > +/* Name of the clock driver and the reset auxiliary device it create= s */ > > > +#define TC9564_CLK_MODNAME "clk_tc9564" > > > +#define TC9564_RESET_DEV_NAME "tc9564-reset" > > > + > > > +/* Platform data passed to the TC9564 reset auxiliary driver */ > > > +struct tc9564_aux_data { > > > + void __iomem *regs; > >=20 > > nit: I guess we do not really need it. >=20 > I'm not sure what you mean here. The mapped registers pointer > is required by the auxiliary reset driver, so we need to pass > it via platform data. >=20 >=20 > If what you're saying is that we could just pass the pointer > alone, rather than a structure that *contains* the pointer, > that is technically true. (And I think that's what you're > saying.) >=20 > The reason I did it this way is that assigning an __iomem > tagged pointer to a simple void pointer (like the platform > data) produces a "sparse" warning: >=20 > warning: incorrect type in assignment (different address spaces) >=20 > That happens in the clock driver (when setting the platform > data) and in the auxiliary reset driver (when getting it > from the platform data). I didn't like that, so I enclosed > it in a structure to avoid the problem. >=20 > I *would* prefer to just pass the mapped pointer. But even if > I try to cast away the warning with (void *) we get a different > warning from "sparse": >=20 > warning: cast removes address space '__iomem' of expression ack, right. I missed it. Thx :) Regards, Lorenzo >=20 > I think the __iomem tag has value and putting it inside a > structure preserves it (and avoids these warnings). So > that's how I did it. >=20 > Unless there are other objections I'd like to keep it this way. >=20 > Thanks. >=20 > -Ales >=20 >=20 > > Regards, > > Lorenzo > >=20 > > > +}; > > > + > > > #endif /* __QCOM_TC9563_H */ > > > --=20 > > > 2.53.0 > > >=20 >=20 --Un9wxTbMUDZm+oaY Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCaxLEYAAKCRA6cBh0uS2t rPt/AP9QqdzX83SsiVRhjIpUWQmAuDA7YmkGopiFYh575QU84gD8CeJcWaEViqkI 28xZrgxJhyRdk2x7tMU547Od2OUNYg8= =jphs -----END PGP SIGNATURE----- --Un9wxTbMUDZm+oaY--