Re: [PATCH v4 3/4] reset: toshiba: introduce a TC9564 reset driver

From: Philipp Zabel

Date: Thu Dec 03 2026 - 09:56:56 EST


On Do, 2026-12-03 at 14:51 +0100, 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 <daniel@xxxxxxxxxxxx>
> > > Signed-off-by: Daniel Thompson <daniel@xxxxxxxxxxxx>
> > > Signed-off-by: Alex Elder <elder@xxxxxxxxxxxx>
> > > ---
> > > 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 <lorenzo.bianconi@xxxxxxxxxxxxxxxx>
> > > M: Alex Elder <elder@xxxxxxxxxx>
> > > M: Daniel Thompson <danielt@xxxxxxxxxx>
> > > 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.
>
> With default, the Kconfig ref in in reset while aux driver
> reference is still in clock. It feels a little less neat to me

If you're fine with this, I won't object. I just got triggered by the
optics of a "reset:" patch touching drivers/clk/Kconfig. Because of the
shared dependency on patch 1, I expect this patch to go through the
clock tree anyway.

> The reset needs to select the AUX BUS though

Agreed.

regards
Philipp