From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/5] reset: socfpga: use the reset-simple driver
Date: Mon, 21 Aug 2017 10:45:18 +0200 [thread overview]
Message-ID: <1503305118.8125.8.camel@pengutronix.de> (raw)
In-Reply-To: <900b3dad-7340-6ad9-d996-d2f0e389bd58@adaptrum.com>
On Wed, 2017-08-16 at 13:46 -0700, Alexandru Gagniuc wrote:
> Hi Phillip,
>
> On 08/16/2017 02:46 AM, Philipp Zabel wrote:
> [snip]
> > @@ -118,8 +151,23 @@ static int reset_simple_probe(struct
> > platform_device *pdev)
> > ? data->rcdev.ops = &reset_simple_ops;
> > ? data->rcdev.of_node = dev->of_node;
> >
> > - if (devdata)
> > + if (devdata) {
> > + u32 reg_offset = devdata->reg_offset;
> > +
> > + if (reg_offset &&
> > + ????of_property_read_u32(dev->of_node,
> > "altr,modrst-offset",
> > + ?®_offset)) {
> > + dev_warn(dev,
> > + ?"missing altr,modrst-offset
> > property, assuming 0x%x!\n",
> > + ?reg_offset);
> > + }
>
> I would not make reading dt properties dependent on the presence of?
> devdata. That breaks being able to configure the reset controller from?
> dt. I would either just read the "altr,modrst-offset" property, or read?
> it when
>
> of_device_is_compatible(dev->of_node, "altr,rst-mgr"));
Checking the compatible again is unnecessary, we already have obtained
devdata depending on the compatible value. I had effectively the same
check in v2:
if (devdata == &reset_simple_socfpga)
I can change back to that, if you prefer. Note that the
if (devdata)
reg_offset = devdata->reg_offset;
part has to stay now that reg_offset is stored in devdata.
> Ideally, we could have a more generic "reg-offset" binding for new reset?
> controllers, but that is beyond the scope of this patch.
Agreed.
regards
Philipp
next prev parent reply other threads:[~2017-08-21 8:45 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 9:46 [PATCH v3 0/5] Unify simple reset drivers Philipp Zabel
2017-08-16 9:46 ` [PATCH v3 1/5] reset: add reset-simple to unify socfpga, stm32, sunxi, and zx2967 Philipp Zabel
2017-08-16 11:30 ` Andre Przywara
2017-08-16 12:12 ` Andreas Färber
2017-08-16 15:11 ` Philipp Zabel
2017-08-16 15:17 ` Andre Przywara
2017-08-16 16:41 ` Andreas Färber
2017-08-16 16:46 ` Andre Przywara
2017-08-16 20:46 ` Alexandru Gagniuc
2017-08-16 9:46 ` [PATCH v3 2/5] reset: socfpga: use the reset-simple driver Philipp Zabel
2017-08-16 20:46 ` Alexandru Gagniuc
2017-08-21 8:45 ` Philipp Zabel [this message]
2017-08-16 9:46 ` [PATCH v3 3/5] reset: stm32: " Philipp Zabel
2017-08-16 12:52 ` Eugeniy Paltsev
2017-08-16 12:55 ` Andreas Färber
2017-08-16 13:03 ` Andre Przywara
2017-08-16 20:50 ` Alexandru Gagniuc
2017-08-16 20:52 ` Andreas Färber
2017-08-16 20:55 ` Alexandru Gagniuc
2017-08-17 9:19 ` Andre Przywara
2017-08-21 8:38 ` Philipp Zabel
2017-08-29 8:39 ` [v3,3/5] " Gabriel FERNANDEZ
2017-08-16 9:47 ` [PATCH v3 4/5] reset: zx2967: " Philipp Zabel
2017-08-16 20:50 ` Alexandru Gagniuc
2017-08-16 9:47 ` [PATCH v3 5/5] reset: simple: read back to make sure changes are applied Philipp Zabel
2017-08-16 21:00 ` Alexandru Gagniuc
2017-08-21 8:21 ` Philipp Zabel
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=1503305118.8125.8.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).