From: Krystian Garbaciak <krystian.garbaciak@diasemi.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com,
lm-sensors@lm-sensors.org, linux-input@vger.kernel.org,
linux-watchdog@vger.kernel.org, linux-leds@vger.kernel.org,
"Samuel Ortiz" <sameo@linux.intel.com>,
"Liam Girdwood" <lrg@ti.com>,
"Mark Brown" <broonie@opensource.wolfsonmicro.com>,
"Alessandro Zummo" <a.zummo@towertech.it>,
"Jean Delvare" <khali@linux-fr.org>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Ashish Jangam" <ashish.jangam@kpitcummins.com>,
"Andrew Jones" <drjones@redhat.com>,
"Donggeun Kim" <dg77.kim@samsung.com>,
"Philippe Rétornaz" <philippe.retornaz@epfl.ch>,
"Wim Van Sebroeck" <wim@iguana.be>,
"Bryan Wu" <bryan.wu@canonical.com>,
"Richard Purdie" <rpurdie@rpsys.net>,
"Anthony Olech" <anthony.olech@diasemi.com>
Subject: Re: [PATCH 1/8] mfd: Add Dialog DA906x core driver.
Date: Fri, 31 Aug 2012 12:20:00 +0100 [thread overview]
Message-ID: <201208311220@sw-eng-lt-dc-vm2> (raw)
In-Reply-To: <20120825183113.GE6520@opensource.wolfsonmicro.com>
> On Fri, Aug 24, 2012 at 02:50:00PM +0100, Krystian Garbaciak wrote:
>
> > This is MFD module providing access to registers and interrupts of DA906x
> > series PMIC. It is used by other functional modules, registered as MFD cells.
> > Driver uses regmap with paging to access extended register list. Register map
> > is divided into two pages, where the second page is used during initialisation.
>
> Your selection of people to CC here appears both large and random...
I've added any maintainer for my modules from maintainer list.
> > +inline unsigned int da906x_to_range_reg(u16 reg)
> > +{
> > + return reg + DA906X_MAPPING_BASE;
> > +}
>
> I've no real idea what this stuff is all about, it at least needs some
> comments somewhere. The fact that you're just adding a constant offset
> to all registers is at best odd.
I will comment it precisely for next version:
+/* Adding virtual register range starting from address DA9063_MAPPING_BASE.
+ It will be used for registers requiring page switching, which in our case
+ are virtually all PMIC registers.
+ Registers from 0 to 255 are used only as a page window and are volatile,
+ except DA9063_REG_PAGE_CON register (page selector), which is cachable. */
+static const struct regmap_range_cfg da9063_range_cfg[] = {
+ {
+ .range_min = DA9063_MAPPING_BASE,
+ .range_max = DA9063_MAPPING_BASE +
+ ARRAY_SIZE(da9063_reg_flg) - 1,
+ .selector_reg = DA9063_REG_PAGE_CON,
+ .selector_mask = 1 << DA9063_I2C_PAGE_SEL_SHIFT,
+ .selector_shift = DA9063_I2C_PAGE_SEL_SHIFT,
+ .window_start = 0,
+ .window_len = 256,
+ }
+};
.. and here:
+/* Access to any PMIC register is passed through virtual register range,
+ starting at DA9063_MAPPING_BASE. For those registers, paging is required. */
+inline unsigned int da9063_to_range_reg(u16 reg)
+{
+ return reg + DA9063_MAPPING_BASE;
+}
next prev parent reply other threads:[~2012-08-31 11:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201208241445@sw-eng-lt-dc-vm2>
[not found] ` <201208241450@sw-eng-lt-dc-vm2>
[not found] ` <201208241455@sw-eng-lt-dc-vm2>
2012-08-25 15:10 ` [RFC PATCH 2/8] regulator: Add Dialog DA906x voltage regulators support Mark Brown
2012-08-29 14:50 ` Krystian Garbaciak
2012-08-30 17:47 ` Mark Brown
2012-08-31 10:00 ` Krystian Garbaciak
2013-05-09 14:05 ` Guennadi Liakhovetski
2013-05-09 14:18 ` Anthony Olech
2013-05-09 14:28 ` Guennadi Liakhovetski
2013-05-09 14:42 ` Anthony Olech
2013-05-09 14:50 ` Guennadi Liakhovetski
2012-08-25 18:31 ` [PATCH 1/8] mfd: Add Dialog DA906x core driver Mark Brown
2012-08-31 11:20 ` Krystian Garbaciak [this message]
2012-08-31 11:37 ` Philippe Rétornaz
2012-08-31 17:16 ` Mark Brown
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=201208311220@sw-eng-lt-dc-vm2 \
--to=krystian.garbaciak@diasemi.com \
--cc=a.zummo@towertech.it \
--cc=anthony.olech@diasemi.com \
--cc=ashish.jangam@kpitcummins.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=bryan.wu@canonical.com \
--cc=dg77.kim@samsung.com \
--cc=dmitry.torokhov@gmail.com \
--cc=drjones@redhat.com \
--cc=khali@linux-fr.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=lrg@ti.com \
--cc=philippe.retornaz@epfl.ch \
--cc=rpurdie@rpsys.net \
--cc=rtc-linux@googlegroups.com \
--cc=sameo@linux.intel.com \
--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