From: Laxman Dewangan <ldewangan@nvidia.com>
To: lee.jones@linaro.org, sameo@linux.intel.com, broonie@kernel.org,
linus.walleij@linaro.org, akpm@linux-foundation.org
Cc: devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
rtc-linux@googlegroups.com, rob.herring@calxeda.com,
mark.rutland@arm.com, pawel.moll@arm.com, swarren@wwwdotorg.org,
rob@landley.net, ijc+devicetree@hellion.org.uk,
grant.likely@linaro.org, Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH V2 1/5] regmap: add helper macro to set min/max range of register
Date: Fri, 20 Sep 2013 18:00:10 +0530 [thread overview]
Message-ID: <1379680214-9143-2-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1379680214-9143-1-git-send-email-ldewangan@nvidia.com>
Add helper macro to set the min and max value of the register range.
This is useful when initialising the register ranges of the device like
static const struct regmap_range readable_ranges[] = {
regmap_reg_range(DEVICE_REG0, DEVICE_REG10),
};
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
As per Mark's comment on V1 series, adding the macro in header in place
of defining in driver.
This should go on same tree as 2/5.
include/linux/regmap.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 4c8c20a..047e8dc 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -70,6 +70,8 @@ struct regmap_range {
unsigned int range_max;
};
+#define regmap_reg_range(low, high) { .range_min = low, .range_max = high, }
+
/*
* A table of ranges including some yes ranges and some no ranges.
* If a register belongs to a no_range, the corresponding check function
--
1.7.1.1
next prev parent reply other threads:[~2013-09-20 12:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 12:30 [PATCH V2 0/5] Add AMS AS3722 mfd, GPIO, regulator and RTC driver Laxman Dewangan
2013-09-20 12:30 ` Laxman Dewangan [this message]
2013-09-20 16:56 ` [PATCH V2 1/5] regmap: add helper macro to set min/max range of register Mark Brown
2013-09-20 12:30 ` [PATCH V2 2/5] mfd: add support for AMS AS3722 PMIC Laxman Dewangan
2013-09-20 12:39 ` Lee Jones
2013-09-20 15:55 ` Mark Brown
2013-09-20 12:30 ` [PATCH V2 3/5] gpio: add support for AMS AS3722 gpio driver Laxman Dewangan
2013-09-23 8:06 ` [rtc-linux] " Linus Walleij
2013-09-23 8:55 ` Laxman Dewangan
2013-09-23 9:26 ` Linus Walleij
[not found] ` <CACRpkdYVTdh3+ayy96D4=iNO6ZASfTfeQOHF9vdoPjfLDCtB5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-23 10:01 ` Laxman Dewangan
[not found] ` <5240117C.8060300-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-09-23 18:06 ` Linus Walleij
2013-09-20 12:30 ` [PATCH V2 4/5] regulator: as3722: add regulator driver for AMS AS3722 Laxman Dewangan
2013-09-20 17:08 ` Mark Brown
2013-09-20 12:30 ` [PATCH V2 5/5] drivers/rtc/rtc-as3722: add RTC driver Laxman Dewangan
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=1379680214-9143-2-git-send-email-ldewangan@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=rtc-linux@googlegroups.com \
--cc=sameo@linux.intel.com \
--cc=swarren@wwwdotorg.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).