From: Damien Riegel <damien.riegel@savoirfairelinux.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Lee Jones <lee.jones@linaro.org>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-watchdog@vger.kernel.org, shawnguo@kernel.org,
kernel@pengutronix.de, wim@iguana.be, robh+dt@kernel.org,
sameo@linux.intel.com, dinh.linux@gmail.com, linux@roeck-us.net,
kernel@savoirfairelinux.com
Subject: Re: [PATCH v2 2/5] mfd: ts4800-syscon: add driver for TS-4800 syscon
Date: Tue, 3 Nov 2015 09:36:38 -0500 [thread overview]
Message-ID: <20151103143636.GA8350@localhost> (raw)
In-Reply-To: <5597828.MPo2kL1TSa@wuerfel>
On Tue, Nov 03, 2015 at 11:48:38AM +0100, Arnd Bergmann wrote:
> On Tuesday 03 November 2015 10:12:17 Lee Jones wrote:
> > >
> > > I think a 'buswidth=<16>;' property in addition to 'compatible="syscon"'
> > > is more in line with what other subsystems do.
> >
> > Perfect.
> >
>
> Just to clarify: I just checked the other DT bindings and it should
> actually be "bus-width", not "buswidth".
Actually, I need the set the three following values of regmap_config:
reg_bits, reg_stride, and val_bits.
I had the following mapping in mind:
@@ -69,6 +70,18 @@ static struct syscon *of_syscon_register(struct device_node *np)
else if (of_property_read_bool(np, "little-endian"))
syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE;
+ ret = of_property_read_u32(np, "reg-bits", &val);
+ if (!ret)
+ syscon_config.reg_bits = val;
+
+ ret = of_property_read_u32(np, "val-bits", &val);
+ if (!ret)
+ syscon_config.val_bits = val;
+
+ ret = of_property_read_u32(np, "reg-stride", &val);
+ if (!ret)
+ syscon_config.reg_stride = val;
+
regmap = regmap_init_mmio(NULL, base, &syscon_config);
if (IS_ERR(regmap)) {
pr_err("regmap init failed\n");
Would you prefer other property names, like "reg-bus-width",
"val-bus-width", and "reg-stride"? Should I prefix them with "syscon,"?
Damien
next prev parent reply other threads:[~2015-11-03 14:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 20:27 [PATCH v2 0/5] Add board support for TS-4800 Damien Riegel
2015-10-29 20:27 ` [PATCH v2 1/5] of: add vendor prefix for Technologic Systems Damien Riegel
2015-10-30 18:04 ` Lee Jones
2015-10-30 19:58 ` Damien Riegel
2015-11-02 9:13 ` Lee Jones
2015-10-29 20:27 ` [PATCH v2 2/5] mfd: ts4800-syscon: add driver for TS-4800 syscon Damien Riegel
2015-10-30 17:56 ` Lee Jones
2015-10-30 20:08 ` Damien Riegel
2015-11-02 9:12 ` Lee Jones
2015-11-02 18:13 ` Damien Riegel
2015-11-03 8:38 ` Lee Jones
2015-11-03 8:39 ` Lee Jones
2015-11-03 8:40 ` Arnd Bergmann
2015-11-03 10:12 ` Lee Jones
2015-11-03 10:48 ` Arnd Bergmann
2015-11-03 14:36 ` Damien Riegel [this message]
2015-10-29 20:27 ` [PATCH v2 3/5] watchdog: ts4800: add driver for TS-4800 watchdog Damien Riegel
2015-10-30 17:28 ` Lee Jones
2015-10-30 17:52 ` Lee Jones
2015-10-29 20:27 ` [PATCH v2 4/5] ARM: imx_v6_v7_defconfig: add TS-4800 watchdog and syscon Damien Riegel
2015-10-29 20:27 ` [PATCH v2 5/5] ARM: dts: TS-4800: add basic device tree Damien Riegel
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=20151103143636.GA8350@localhost \
--to=damien.riegel@savoirfairelinux.com \
--cc=arnd@arndb.de \
--cc=dinh.linux@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kernel@savoirfairelinux.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=robh+dt@kernel.org \
--cc=sameo@linux.intel.com \
--cc=shawnguo@kernel.org \
--cc=wim@iguana.be \
/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).