mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard GENOUD <richard.genoud@posteo.net>
To: Jisheng Zhang <jszhang@kernel.org>, Rob Herring <robh@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	Linus Walleij <linusw@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH v3 07/13] reset: add Synaptics SL2610 reset controller support
Date: Thu, 03 Dec 2026 10:29:02 +0000	[thread overview]
Message-ID: <cebd31b1-a246-4c58-8a97-f784a0c612dd@posteo.net> (raw)
In-Reply-To: <20261130170352.12853-8-jszhang@kernel.org>

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@kernel.org>
> ---
>   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@kernel.org>
> + */
> +

[...]

> +
> +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

> +
> +	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



  reply	other threads:[~2026-12-03 10:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 17:03 [PATCH v3 00/13] arm64: add Synaptics SL2610 SoCs and RDK boards Jisheng Zhang
2026-11-30 17:03 ` [PATCH v3 01/13] arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs Jisheng Zhang
2026-11-30 17:03 ` [PATCH v3 02/13] pinctrl: berlin: use u16 instead of u8 for the offset Jisheng Zhang
2026-11-30 17:03 ` [PATCH v3 03/13] pinctrl: berlin: enable module build support Jisheng Zhang
2026-12-03 10:32   ` Richard GENOUD
2026-11-30 17:03 ` [PATCH v3 04/13] pinctrl: berlin: add optional pinconf support Jisheng Zhang
2026-11-30 17:03 ` [PATCH v3 05/13] dt-bindings: soc: synaptics: add SL2610 system controllers Jisheng Zhang
2026-11-30 17:03 ` [PATCH v3 06/13] soc: synaptics: add SL2610 system controller support Jisheng Zhang
2026-11-30 17:03 ` [PATCH v3 07/13] reset: add Synaptics SL2610 reset " Jisheng Zhang
2026-12-03 10:29   ` Richard GENOUD [this message]
2026-12-03 10:57     ` Jisheng Zhang
2026-12-03 15:11       ` Philipp Zabel
2026-12-03 15:12   ` Philipp Zabel
2026-11-30 17:03 ` [PATCH v3 08/13] pinctrl: berlin: add Synaptics SL2610 pin " Jisheng Zhang
2026-11-30 17:03 ` [PATCH v3 09/13] clk: berlin: add Synaptics clock controller helpers Jisheng Zhang
2026-11-30 17:03 ` [PATCH v3 10/13] clk: berlin: add Synaptics SL2610 clocks and PLLs Jisheng Zhang
2026-12-02 14:20 ` [PATCH v3 00/13] arm64: add Synaptics SL2610 SoCs and RDK boards Richard GENOUD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cebd31b1-a246-4c58-8a97-f784a0c612dd@posteo.net \
    --to=richard.genoud@posteo.net \
    --cc=bmasney+clk@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet+clk@baylibre.com \
    --cc=jszhang@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®