lkml.org 
[lkml]   [2011]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] pinctrl: add a group-specific hog macro
Date
From: Linus Walleij <linus.walleij@linaro.org>

To create elegant tables for pinmux hogs on the PXA MMP platform,
we need this hog macro that can specify both function and group in
one go.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
include/linux/pinctrl/machine.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h
index ad430e0..d0aecb7 100644
--- a/include/linux/pinctrl/machine.h
+++ b/include/linux/pinctrl/machine.h
@@ -73,6 +73,15 @@ struct pinmux_map {
{ .name = a, .ctrl_dev_name = b, .function = c, \
.hog_on_boot = true }

+/*
+ * Convenience macro to map a system function onto a certain pinctrl device
+ * using a specified group, to be hogged by the pinmux core until the system
+ * shuts down.
+ */
+#define PINMUX_MAP_SYS_HOG_GROUP(a, b, c, d) \
+ { .name = a, .ctrl_dev_name = b, .function = c, .group = d, \
+ .hog_on_boot = true }
+
#ifdef CONFIG_PINMUX

extern int pinmux_register_mappings(struct pinmux_map const *map,
--
1.7.3.2


\
 
 \ /
  Last update: 2011-12-14 09:35    [W:0.070 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site