From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796377355; b=2MaimhVlsEo5AoNmhtwvQhmxMfc8lVDdSZnlv2NNSrjZQXADUrT0CMFoFiN1ZYZQdYWA jeyT15bdgqNYiVp3hk97Q5L1Nl6ZV2fsZ38JzgOl7JjyIJgL64f00Tl8uiRQXAYh2Oicv rLZcA+/bbwjolPJ7conQT3pms8RP2pzSEV218CKXWN0UKvoyESlsSod/c1bE4xa0ywVdQ F/h/an2wJbQUCxgsjmddQY09Xm0hD7tkZbBUhY87IuiJNqz5qG/HtnzFqSAzFTuS8VHck rVyatLjPWyw0kyvR9HJ3pxmGfqzF/aAkylj/4V373pZpCNpwZqcr3qsCxTtRHNQdesQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796377355; 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-Authority-Analysis:X-Proofpoint-Spam-Info:X-Proofpoint-GUID: X-Proofpoint-ORIG-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=3QB0buN7+KV5tf9He4ZjezR53g3mlJKo9Rh4FpM6sVA=; b=zZvyfprmzTACbutm3ueZgVFWQq/qt/bdlFDgb6do0MHrwDv2A6tFOGVtoMWw41+5LC+0 G2oXdIOANzLh1D4cYfpq1181GEWfZwQIJxT6/RcqMH9hjRhwdxyH7xk+D/Th7Rgd7B3WM EjkrFFWmNQlokKAoyEDOBjX2kAC7kFMiQTWLuD1vnVVzTaywYup02U/Q7mGn2fmOuQ+b4 Rg8UkIyDN9jCy9MHN4rk4zsSzy2YVs0xeTR9j3bJ5rb2RK9xoFNfeLhLnrGuvgaUO7IdN mbmBqw05y4WTHBhLI5mxz9oVyGtQDLI37+lrcuayypZ0ZN8GkgI3HXX7gifqtbLpDow== 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=lG1JQlLU; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=NBju2UhX; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 A42B9606A332 for ; Fri, 4 Dec 2026 09:42:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A42B9606A332 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=lG1JQlLU; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=NBju2UhX Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B45H3is3647374 for ; Fri, 4 Dec 2026 09:42:32 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=3QB0buN7+KV5tf9He4ZjezR5 3g3mlJKo9Rh4FpM6sVA=; b=lG1JQlLUuMBpaIq8LmsaafD87BECGaXM5dcDRPEa ERRfOv7fi72NJ9oMjhgej0y11/ZWr21DWaJjVOowhjh+S7lPMBe3YOuuPfmNvGea kePr2ngQzJ8xAt3kGPdcegJRK5basdc0i7Y0SMeyqTOri//Ei0aSqoLrIPmPvd7U 4rpI63BNpRNZInZRsWPvlcC5NUIhGBNyXCtne/HSOzYaxmusNTsWWdSEPqec6T8/ kzOISjNWDiqJqhDVCvuGxtCyegLvb0dmMjtu4QiLzjES8eazGeRsvUfdQsSzG2wG Evqng4tDJZzCfCf+xe2zbJAQAdJmIWEn0s6hoTaMzXJR7A== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jbq7w8sju-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 04 Dec 2026 09:42:32 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-9495dd0f07eso146695885a.0 for ; Fri, 04 Dec 2026 01:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796377352; x=1796982152; 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=3QB0buN7+KV5tf9He4ZjezR53g3mlJKo9Rh4FpM6sVA=; b=NBju2UhXp7w0yK3Kdh5mOmJwEg6udRKApMlXOSs5RL1Jk2ZrxEhuX964fkcREf8KbW LEYf3ZaaleNyS0hp7TTbvBgdco0GC0mjFexd+Aj+fCMcFrF6qM9fSB3XBSFV7sTX6igB Zn5bQ3xcFE3/8jDYiaHIxFoM8l+H4RfspsyTOIRdnrIs7lLO169IeHL1mpWLbSuMPrmm 7QBo7I+CcMeau1lD1YzIvNYspmEGepVqPTIEeTLNpRaDzl7rphf8ItJSHZ8szIWL0MoY In9uFDt29eRQCHw4q18v4UJGoRcXeDU7+IfZX6APY2f++Kn5ryKj6p+Tv5FByGDTDc/M V0LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796377352; x=1796982152; 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=3QB0buN7+KV5tf9He4ZjezR53g3mlJKo9Rh4FpM6sVA=; b=xjJeN5e9QKe1TlWzQVSKjIAIvWiB8Ig7Hyrql1YvVChDdM97HJE3S5RkwG0aLWVHkv IxEVVAcGJyogCGlEnvMY9eTFB3L0RLk9L3+Nr40hH6A6vJuJKtTUI+trLv7A/+ky1m8C VUobbf9stf+nEonHVLuXke6J0ujaaxzNDSBUAu/gSuaNaJ4VwISqr3SpF6jD/TwChCqz X62VtRdU0uGE5WD8m/tb/WMsBkzGGK3J1GJeKQzm60T3QTohegJsgOxp3WrokoCO7F1i 1yy998FaBBCJxDQB9AL52n2VbWF9nG2iqfBm41HZDrL+ZYc9gX3jV5Z0RiCU2dU8fb1o jwsg== X-Forwarded-Encrypted: i=1; AL+hErGmcHY7rwvV6qCYTfqSwarh6Ov3kkcR0JHSr8Z0OExnebSGrfpR4yB8bD6Kvs/oXpfoRGWqvJclZ/g=@vger.kernel.org X-Gm-Message-State: APuU4Z8atgEGPdkeJzJhqEXtFrmUDp1T7JlNfom039moTrqKmegOb0ew gUyGTs6krk7WTbdT3FgwLDyfmy3w8SqWwXTd/8NIuII2t6gbk1qaWwRwQ8d+a+bmTXGDBO6tKWq tANLisb+qbepDt4IXOIbF44+aEajePEuoR2e4SnSgy/DDyn09JOQmaZDJ4+Js3WA= X-Gm-Gg: AZFdTZes597dn53cEnQ8v14Oo2FCnZuGQf41otEd27knoGFVPJviC3nW6bUvE6xS2I3 h0Ne9XXSqqTswkBKX5Ipmizr/jF5NKLcaeruLlhB8xyP/7KZsNnWG4iKUVAyD/RcrmTDrDE2JmI XOuncGwYeICi4/f7yH6HZylge3+sbIbqIl1wKDJmhsttWS/mcR0rzhHZSA1uG16CJ2wt57nFMNy XfaFPwah3jI1XdaYJ0Mw1iyOMpM7JRxVbd5N9vwVQgNDgCsfujQVJ+pMDxyZMluL7mHqh6LqfVm qnR3PBNPLKwvceukGdMgaufU9T1/ghHG3CtRzKtDJzd/kbnZH/L+TZUrT+uNgr1lv85DXnGP68K pLlT89k6kXgDF0uf7ODuAvQ38rQGcm/OutDAXvXjYxnf/ro7Y1SQ6X7lpAizHKg== X-Received: by 2002:a05:620a:4005:b0:949:4835:c7d9 with SMTP id af79cd13be357-94a82dfab82mr181708185a.56.1796377351611; Fri, 04 Dec 2026 01:42:31 -0800 (PST) X-Received: by 2002:a05:620a:4005:b0:949:4835:c7d9 with SMTP id af79cd13be357-94a82dfab82mr181704385a.56.1796377350857; Fri, 04 Dec 2026 01:42:30 -0800 (PST) Received: from localhost ([130.25.105.85]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbeb6f0085sm30967375e9.4.2026.12.04.01.42.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 01:42:29 -0800 (PST) Date: Fri, 4 Dec 2026 10:42:29 +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> 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="Fl9spQUXiGpkWvBU" Content-Disposition: inline In-Reply-To: <20261203200948.1595470-3-elder@riscstar.com> X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA0MDAzOCBTYWx0ZWRfX0Tv6MigYefDJ ArBFOUkDj8Q0diIVctnmnSNEs12iOhSINyVIWBAYsR/fWy6JanO2hAeqFBQyMkRI3phbALweJ3j ljrJ5T76bhOa81m5bll4VxA9Skf3ua+PGBm6MkVFg1lKEwQ5JxSEWcCp8DpKaYLNv/m2GPH/b/J W+cNH1axSXHEO5kQyhoc9EtpS9ESLhUQhV+QpYVEtfuo8IETbbjnpR0VV7jimLsYypS1KnQ9BN4 C1bZoc5DCUfDCv+vfhYMqgl4yhVhpX41fH3MWQv4ppu8Uy46BvEa36tQ/Dk0Kblk92148vlm9cb GXZa5dlAKDjcokk+0iyBIOp9FkfDp/v3bHMMCCTSLVie3whSi9VFNg57NV0OZOYyfdMXD2o2zkc Ksj55mvLWXv+wpH6qFB/6seiLSHgs5DVI8qlr9eyMTN+xuWMU0enBViM9fXdREYER862ZvU9Twl XGTjLFnKgbIC5Tm92Rw== X-Authority-Analysis: v=2.4 cv=S55MU4sP c=1 sm=1 tr=0 ts=6b128b08 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=RcFDq6c+avmIvxkL9iwlxA==:17 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=ee_2aqc6AAAA:8 a=VwQbUJbxAAAA:8 a=tjWom-upkmsANV6UOSQA:9 a=CjuIK1q_8ugA:10 a=T1IMlR0TAu2BES3GsWEA:9 a=IoWCM6iH3mJn3m4BftBB:22 a=VOpmJXOdbJOWo2YY3GeN:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA0MDAzOCBTYWx0ZWRfX41HRok9pgyCS +7DSSzuSd1BlGvsoTnL5Z5TVi6JdQxruUQRbGFx0Eu8A/0FPIHoCqfcfYKA4/qwgss26ga/Aw9G 1k5xnwpPejx0oSP5qWw5cNTV+H2/brw= X-Proofpoint-GUID: LHLIOVreYew9LtA1bDR6_DK1YQXy1lXM X-Proofpoint-ORIG-GUID: LHLIOVreYew9LtA1bDR6_DK1YQXy1lXM 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_01,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 phishscore=0 malwarescore=0 adultscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612040038 --Fl9spQUXiGpkWvBU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > 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 > diff --git a/MAINTAINERS b/MAINTAINERS > index 5d9fc5c5fbcd8..936d60a27dd3c 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -28812,6 +28812,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 > =20 > TOSHIBA WMI HOTKEYS DRIVER > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig > index 673bca1e594e0..f8ef663ac5b79 100644 > --- a/drivers/reset/Kconfig > +++ b/drivers/reset/Kconfig > @@ -369,6 +369,14 @@ config RESET_SUNXI > help > This enables the reset driver for Allwinner SoCs. > =20 > +config RESET_TC9564 > + tristate "Toshiba TC9564 reset controller driver" > + select AUXILIARY_BUS > + help > + This enables support for the reset controller embedded in the > + Toshiba TC9564 SoC. The device is created by the TC9564 clock > + controller driver as an auxiliary device. > + > config RESET_TENSTORRENT_ATLANTIS > tristate "Tenstorrent atlantis reset driver" > depends on ARCH_TENSTORRENT || COMPILE_TEST > diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile > index 2fe527a7be8e1..2144095c14b3d 100644 > --- a/drivers/reset/Makefile > +++ b/drivers/reset/Makefile > @@ -47,6 +47,7 @@ obj-$(CONFIG_RESET_SKY1_AUDSS) +=3D reset-sky1-audss.o > obj-$(CONFIG_RESET_SOCFPGA) +=3D reset-socfpga.o > obj-$(CONFIG_RESET_SUNPLUS) +=3D reset-sunplus.o > obj-$(CONFIG_RESET_SUNXI) +=3D reset-sunxi.o > +obj-$(CONFIG_RESET_TC9564) +=3D reset-tc9564.o > obj-$(CONFIG_RESET_TENSTORRENT_ATLANTIS) +=3D reset-tenstorrent-atlantis= =2Eo > obj-$(CONFIG_RESET_TH1520) +=3D reset-th1520.o > obj-$(CONFIG_RESET_TI_SCI) +=3D reset-ti-sci.o > diff --git a/drivers/reset/reset-tc9564.c b/drivers/reset/reset-tc9564.c > new file mode 100644 > index 0000000000000..218be6dbbb2a3 > --- /dev/null > +++ b/drivers/reset/reset-tc9564.c > @@ -0,0 +1,165 @@ > +// SPDX-License-Identifier: GPL-2.0-only > + > +/* > + * Copyright (C) 2026 by RISCstar Solutions Corporation. All rights res= erved. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +/* > + * Two registers implement the bits that control whether our resets are > + * asserted. These offsets are relative to the mapped memory passed > + * as platform data from the TC9564 clock driver. > + */ > +#define RESET0_OFFSET 0x4 > +#define RESET1_OFFSET 0xc > + > +struct tc9564_reset { > + void __iomem *regs; /* Mapped registers base address */ > + spinlock_t lock; /* Protects register updates */ > + struct reset_controller_dev rcdev; > +}; > + > +struct reset_init { > + u16 offset; /* Control register offset (0x4 or 0xc) */ > + u16 bit; /* Bit in the control register (0-31) */ > +}; > + > +static const struct reset_init reset_init[] =3D { > + [TC9564_RST_MAC0_MAC] =3D { > + .offset =3D RESET0_OFFSET, > + .bit =3D 7, > + }, > + [TC9564_RST_MSIGEN] =3D { > + .offset =3D RESET0_OFFSET, > + .bit =3D 18, > + }, > + [TC9564_RST_MAC0_PMA] =3D { > + .offset =3D RESET0_OFFSET, > + .bit =3D 30, > + }, > + [TC9564_RST_MAC0_XPCS] =3D { > + .offset =3D RESET0_OFFSET, > + .bit =3D 31, > + }, > + [TC9564_RST_MAC1_MAC] =3D { > + .offset =3D RESET1_OFFSET, > + .bit =3D 7, > + }, > + [TC9564_RST_MAC1_PMA] =3D { > + .offset =3D RESET1_OFFSET, > + .bit =3D 30, > + }, > + [TC9564_RST_MAC1_XPCS] =3D { > + .offset =3D RESET1_OFFSET, > + .bit =3D 31, > + }, > +}; > +#define RESET_COUNT ARRAY_SIZE(reset_init) > + > +static int reset_update(struct reset_controller_dev *rcdev, > + unsigned long id, bool assert) > +{ > + struct tc9564_reset *reset =3D dev_get_drvdata(rcdev->dev); > + const struct reset_init *init =3D &reset_init[id]; > + void __iomem *reg =3D reset->regs + init->offset; > + u32 mask =3D BIT(init->bit); > + u32 val; > + > + guard(spinlock_irqsave)(&reset->lock); > + > + val =3D readl(reg); > + if (assert) > + val |=3D mask; > + else > + val &=3D ~mask; > + writel(val, reg); > + > + return 0; > +} > + > +static int reset_assert(struct reset_controller_dev *rcdev, unsigned lon= g id) > +{ > + return reset_update(rcdev, id, true); > +} > + > +static int reset_deassert(struct reset_controller_dev *rcdev, unsigned l= ong id) > +{ > + return reset_update(rcdev, id, false); > +} > + > +static int reset_status(struct reset_controller_dev *rcdev, unsigned lon= g id) > +{ > + struct tc9564_reset *reset =3D dev_get_drvdata(rcdev->dev); > + const struct reset_init *init =3D &reset_init[id]; > + void __iomem *reg =3D reset->regs + init->offset; > + > + return readl(reg) & BIT(init->bit) ? 1 : 0; > +} > + > +static const struct reset_control_ops reset_control_ops =3D { > + .assert =3D reset_assert, > + .deassert =3D reset_deassert, > + .status =3D reset_status, > +}; > + > +static int tc9564_reset_probe(struct auxiliary_device *adev, > + const struct auxiliary_device_id *id) > +{ > + struct reset_controller_dev *rcdev; > + struct tc9564_aux_data *aux_data; > + struct device *dev =3D &adev->dev; > + struct tc9564_reset *reset; > + int ret; > + > + aux_data =3D dev_get_platdata(dev); > + if (!aux_data) > + return dev_err_probe(dev, -EINVAL, "no register pointer\n"); > + > + reset =3D devm_kzalloc_obj(dev, *reset); > + if (!reset) > + return -ENOMEM; > + > + reset->regs =3D aux_data->regs; > + spin_lock_init(&reset->lock); > + > + /* This needs to be set before registering */ > + dev_set_drvdata(dev, reset); > + > + rcdev =3D &reset->rcdev; > + rcdev->ops =3D &reset_control_ops; > + rcdev->owner =3D THIS_MODULE; > + rcdev->dev =3D dev; > + rcdev->of_node =3D dev_of_node(dev); > + rcdev->nr_resets =3D RESET_COUNT; > + > + ret =3D devm_reset_controller_register(dev, rcdev); > + if (ret) > + return dev_err_probe(dev, ret, > + "failed to register reset controller\n"); > + return 0; > +} > + > +static const struct auxiliary_device_id tc9564_reset_ids[] =3D { > + { TC9564_CLK_MODNAME "." TC9564_RESET_DEV_NAME }, > + { } > +}; > +MODULE_DEVICE_TABLE(auxiliary, tc9564_reset_ids); > + > +static struct auxiliary_driver tc9564_reset_driver =3D { > + .name =3D KBUILD_MODNAME, > + .probe =3D tc9564_reset_probe, > + .id_table =3D tc9564_reset_ids, > +}; > +module_auxiliary_driver(tc9564_reset_driver); > + > +MODULE_DESCRIPTION("Toshiba TC9564 Reset Driver"); > +MODULE_LICENSE("GPL"); > diff --git a/include/linux/soc/qcom/tc9563.h b/include/linux/soc/qcom/tc9= 563.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 > =20 > +/* Name of the clock driver and the reset auxiliary device it creates */ > +#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; nit: I guess we do not really need it. Regards, Lorenzo > +}; > + > #endif /* __QCOM_TC9563_H */ > --=20 > 2.53.0 >=20 --Fl9spQUXiGpkWvBU Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCaxKLBQAKCRA6cBh0uS2t rHJhAP4+ZLfejGuC0wOKuZxTEpACv0mwUW6Tzvn78X/kPssAUQD/eUXqMcTQeUSC WdxDZ1PgcexpN4GCvX3m+UyShfnj3g4= =YS5p -----END PGP SIGNATURE----- --Fl9spQUXiGpkWvBU--