Re: [PATCH v3 07/13] reset: add Synaptics SL2610 reset controller support
From: Jisheng Zhang
Date: Thu Dec 03 2026 - 06:17:52 EST
On Thu, Dec 03, 2026 at 10:29:02AM +0000, Richard GENOUD wrote:
> Hi Jisheng,
>
> Le 30/11/2026 à 18:03, Jisheng Zhang a écrit :
> > Support the SoC and MCU reset controls exposed by the SL2610 system
> > controllers. Match the MFD-created platform devices, use the parent
> > syscon regmap and register each reset provider against the parent DT node.
> >
> > Handle both pulse resets and sticky resets with assert/deassert controls.
> >
> > Signed-off-by: Jisheng Zhang <jszhang@xxxxxxxxxx>
> > ---
> > drivers/reset/Kconfig | 13 ++
> > drivers/reset/Makefile | 1 +
> > drivers/reset/reset-sl2610.c | 224 +++++++++++++++++++++++++++++++++++
> > 3 files changed, 238 insertions(+)
> > create mode 100644 drivers/reset/reset-sl2610.c
> >
> > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> > index eda9c698a95f..981d3ec29595 100644
> > --- a/drivers/reset/Kconfig
> > +++ b/drivers/reset/Kconfig
> > @@ -358,6 +358,19 @@ config RESET_SUNXI
> > help
> > This enables the reset driver for Allwinner SoCs.
> > +config RESET_SL2610
> > + tristate "Synaptics SL2610 Reset Driver"
> > + depends on ARCH_BERLIN || COMPILE_TEST
> > + depends on OF && HAS_IOMEM
> > + depends on MFD_SL2610_SYSCON
> > + help
> > + Support the reset controllers in the SoC and MCU system control
> > + blocks of Synaptics SL2610 SoCs. Both pulse and sticky reset lines
> > + are supported.
> > +
> > + To compile this driver as a module, choose M here. The module will
> > + be called reset-sl2610.
> > +
> > 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 489fafd6bbe3..d28276a4f2ea 100644
> > --- a/drivers/reset/Makefile
> > +++ b/drivers/reset/Makefile
> > @@ -42,6 +42,7 @@ obj-$(CONFIG_RESET_SCMI) += reset-scmi.o
> > obj-$(CONFIG_RESET_SIMPLE) += reset-simple.o
> > obj-$(CONFIG_RESET_SKY1) += reset-sky1.o
> > obj-$(CONFIG_RESET_SKY1_AUDSS) += reset-sky1-audss.o
> > +obj-$(CONFIG_RESET_SL2610) += reset-sl2610.o
> > obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o
> > obj-$(CONFIG_RESET_SUNPLUS) += reset-sunplus.o
> > obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
> > diff --git a/drivers/reset/reset-sl2610.c b/drivers/reset/reset-sl2610.c
> > new file mode 100644
> > index 000000000000..dc55a05d29d8
> > --- /dev/null
> > +++ b/drivers/reset/reset-sl2610.c
> > @@ -0,0 +1,224 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (C) 2026 Synaptics Incorporated
> > + *
> > + * Synaptics SL2610 reset driver
> > + *
> > + * Author: Jisheng Zhang <jszhang@xxxxxxxxxx>
> > + */
> > +
>
> [...]
>
> > +
> > +static int sl2610_reset_assert(struct reset_controller_dev *rcdev,
> > + unsigned long id)
> > +{
> > + struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
> > + const struct sl2610_reset_cfg *cfg = &priv->cfgs[id];
> > +
> > + if (!cfg->sticky)
> > + return -ENOTSUPP;
>
> Prefer EOPNOTSUPP over ENOTSUPP
The reset core use ENOTSUPP, so I follow its style.
Hi Philipp,
which do you prefer?
Thanks
>
> > +
> > + return regmap_clear_bits(priv->regmap, cfg->reg, cfg->bit);
> > +}
> > +
> > +static int sl2610_reset_deassert(struct reset_controller_dev *rcdev,
> > + unsigned long id)
> > +{
> > + struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
> > + const struct sl2610_reset_cfg *cfg = &priv->cfgs[id];
> > +
> > + if (!cfg->sticky)
> > + return 0;
> > +
> > + return regmap_set_bits(priv->regmap, cfg->reg, cfg->bit);
> > +}
> > +
> > +static int sl2610_reset_reset(struct reset_controller_dev *rcdev,
> > + unsigned long id)
> > +{
> > + struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
> > + const struct sl2610_reset_cfg *cfg = &priv->cfgs[id];
> > +
> > + if (cfg->sticky)
> > + return -ENOTSUPP;
> ditto
>
>