[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1379680214-9143-2-git-send-email-ldewangan@nvidia.com>
Date: Fri, 20 Sep 2013 18:00:10 +0530
From: Laxman Dewangan <ldewangan@...dia.com>
To: <lee.jones@...aro.org>, <sameo@...ux.intel.com>,
<broonie@...nel.org>, <linus.walleij@...aro.org>,
<akpm@...ux-foundation.org>
CC: <devicetree@...r.kernel.org>, <linux-doc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-gpio@...r.kernel.org>,
<rtc-linux@...glegroups.com>, <rob.herring@...xeda.com>,
<mark.rutland@....com>, <pawel.moll@....com>,
<swarren@...dotorg.org>, <rob@...dley.net>,
<ijc+devicetree@...lion.org.uk>, <grant.likely@...aro.org>,
Laxman Dewangan <ldewangan@...dia.com>
Subject: [PATCH V2 1/5] regmap: add helper macro to set min/max range of register
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@...dia.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists