From: Wilson Ding <dingwei@marvell.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Cc: "andrew@lunn.ch" <andrew@lunn.ch>,
"gregory.clement@bootlin.com" <gregory.clement@bootlin.com>,
"sebastian.hesselbarth@gmail.com"
<sebastian.hesselbarth@gmail.com>,
"robh@kernel.org" <robh@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
Sanghoon Lee <salee@marvell.com>,
Geethasowjanya Akula <gakula@marvell.com>
Subject: RE: [EXTERNAL] Re: [PATCH 1/4] [PATCH 1/4] reset: simple: Add syscon device compatible
Date: Fri, 14 Feb 2025 18:40:16 +0000 [thread overview]
Message-ID: <BY3PR18MB46737EC23144183C5C272406A7FE2@BY3PR18MB4673.namprd18.prod.outlook.com> (raw)
In-Reply-To: <8a9518fdfda805f52b96e93649c9ee39274f5844.camel@pengutronix.de>
> -----Original Message-----
> From: Philipp Zabel <p.zabel@pengutronix.de>
> Sent: Friday, February 14, 2025 10:03 AM
> To: Wilson Ding <dingwei@marvell.com>; linux-kernel@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> Cc: andrew@lunn.ch; gregory.clement@bootlin.com;
> sebastian.hesselbarth@gmail.com; robh@kernel.org; krzk+dt@kernel.org;
> conor+dt@kernel.org; Sanghoon Lee <salee@marvell.com>; Geethasowjanya
> Akula <gakula@marvell.com>
> Subject: [EXTERNAL] Re: [PATCH 1/4] [PATCH 1/4] reset: simple: Add syscon
> device compatible
>
> On Fr, 2025-02-14 at 17: 13 +0000, Wilson Ding wrote: > > > -----Original
> Message----- > > From: Philipp Zabel <p. zabel@ pengutronix. de> > > Sent:
> Friday, February 14, 2025 3: 54 AM > > To: Wilson Ding
> <dingwei@ marvell. com>;
> On Fr, 2025-02-14 at 17:13 +0000, Wilson Ding wrote:
> >
> > > -----Original Message-----
> > > From: Philipp Zabel <p.zabel@pengutronix.de>
> > > Sent: Friday, February 14, 2025 3:54 AM
> > > To: Wilson Ding <dingwei@marvell.com>; linux-kernel@vger.kernel.org;
> > > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> > > Cc: andrew@lunn.ch; gregory.clement@bootlin.com;
> > > sebastian.hesselbarth@gmail.com; robh@kernel.org;
> > > krzk+dt@kernel.org;
> > > conor+dt@kernel.org; Sanghoon Lee <salee@marvell.com>;
> > > conor+Geethasowjanya
> > > Akula <gakula@marvell.com>
> > > Subject: [EXTERNAL] Re: [PATCH 1/4] [PATCH 1/4] reset: simple: Add
> > > syscon device compatible
> > >
> > > On Do, 2025-02-13 at 22:58 -0800, Wilson Ding wrote:
> > > > Introduce the new ops for updating reset line and getting status.
> > > > Thus, the reset controller can be accessed through either direct
> > > > I/O or regmap interfaces.
> > >
> > > Please don't add a new layer of function pointer indirection, just
> > > add a new struct reset_control_ops for the regmap variant.
> > >
> >
> > If just adding a new struct reset_control_ops for the regmap variant,
> > almost all the functions will be duplicated for regmap variant.
> > Besides reset_simple_regmap_assert/deassert(), we also need to have
> > the regmap version of reset_simple_update().
>
> Yes. You could also duplicate/fold update() into assert/deassert().
> It is trivial enough and the compiler will do that anyway.
>
> > Since reset_simple_reset() invokes
> > reset_simple_regmap_assert/deassert(), it also needs to be duplicated.
>
> That one could go through the data->rcdev.ops->assert/deassert function
> pointers and be reused. But I wonder if that one function is worth the added
> complexity.
>
> > In this case, there will be too many redundant codes in this file. I
> > doubt if it is worth to use the reset simple code. Maybe it's better
> > to fork a new file for the syscon device, such as 'reset-simple-syscon.c'. What
> do you say?
>
> That sounds sensible to me.
>
Well. I will go with the approach of a new driver, which avoids all the
unnecessary complexity and redundance. Thank!
> regards
> Philipp
next prev parent reply other threads:[~2025-02-14 19:08 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
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 ` Wilson Ding [this message]
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=BY3PR18MB46737EC23144183C5C272406A7FE2@BY3PR18MB4673.namprd18.prod.outlook.com \
--to=dingwei@marvell.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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