Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Wilson Ding <dingwei@marvell.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org, andrew@lunn.ch,
	gregory.clement@bootlin.com,  sebastian.hesselbarth@gmail.com,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	 p.zabel@pengutronix.de, salee@marvell.com, gakula@marvell.com
Subject: Re: [PATCH 1/4] [PATCH 1/4] reset: simple: Add syscon device compatible
Date: Fri, 14 Feb 2025 09:48:04 +0100	[thread overview]
Message-ID: <20250214-arcane-raspberry-hornet-f22d93@krzk-bin> (raw)
In-Reply-To: <20250214065833.530276-3-dingwei@marvell.com>

On Thu, Feb 13, 2025 at 10:58:30PM -0800, Wilson Ding wrote:
>  #define SOCFPGA_NR_BANKS	8
> @@ -171,26 +221,51 @@ static int reset_simple_probe(struct platform_device *pdev)
>  	if (!data)
>  		return -ENOMEM;
>  
> -	membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
> -	if (IS_ERR(membase))
> -		return PTR_ERR(membase);
> +	if (devdata && devdata->syscon_dev) {
> +		data->regmap = syscon_node_to_regmap(pdev->dev.parent->of_node);
> +		if (IS_ERR(data->regmap))
> +			return PTR_ERR(data->regmap);
>  
> -	spin_lock_init(&data->lock);
> -	data->membase = membase;
> -	data->rcdev.owner = THIS_MODULE;
> -	data->rcdev.nr_resets = resource_size(res) * BITS_PER_BYTE;
> -	data->rcdev.ops = &reset_simple_ops;
> -	data->rcdev.of_node = dev->of_node;
> +		if (device_property_read_u32(&pdev->dev, "offset",

Where is this binding documented? This is patch #1, so something anywy
is wrong here (see submitting patches for bindings).

> +					     &data->reg_offset))
> +			data->reg_offset = devdata->reg_offset;
>  
> -	if (devdata) {
> -		reg_offset = devdata->reg_offset;
> -		if (devdata->nr_resets)
> -			data->rcdev.nr_resets = devdata->nr_resets;
> +		if (devdata->nr_resets == 0) {
> +			dev_err(dev, "no reset line\n");
> +			return -EINVAL;
> +		}

Best regards,
Krzysztof



  reply	other threads:[~2025-02-14  8:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14  6:58 [PATCH 0/4] Add Armada8K reset controller support Wilson Ding
2025-02-14  6:58 ` Wilson Ding
2025-02-14  6:58 ` [PATCH 1/4] [PATCH 1/4] reset: simple: Add syscon device compatible Wilson Ding
2025-02-14  8:48   ` Krzysztof Kozlowski [this message]
2025-02-14 11:54   ` Philipp Zabel
2025-02-14 17:13     ` Wilson Ding
2025-02-14 18:03       ` Philipp Zabel
2025-02-14 18:40         ` [EXTERNAL] " Wilson Ding
2025-02-14  6:58 ` [PATCH 2/4] [PATCH 2/4] reset: simple: Add support for Armada8K reset controller Wilson Ding
2025-02-14  8:48   ` Krzysztof Kozlowski
2025-02-14  6:58 ` [PATCH 3/4] [PATCH 3/4] dt-bindings: cp110: Document the " Wilson Ding
2025-02-14  8:45   ` Krzysztof Kozlowski
2025-02-14  6:58 ` [PATCH 4/4] [PATCH 4/4] arm64: dts: marvell: cp11x: Add reset controller node Wilson Ding
2025-02-14  8:48   ` Krzysztof Kozlowski
2025-02-19  0:42 ` [PATCH 0/4] Add Armada8K reset controller support Rob Herring (Arm)

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=20250214-arcane-raspberry-hornet-f22d93@krzk-bin \
    --to=krzk@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dingwei@marvell.com \
    --cc=gakula@marvell.com \
    --cc=gregory.clement@bootlin.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=salee@marvell.com \
    --cc=sebastian.hesselbarth@gmail.com \
    /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