Skip to content

Commit

Permalink
pinctrl: add a group-specific hog macro
Browse files Browse the repository at this point in the history
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.

Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed Jan 3, 2012
1 parent 51cd24e commit 2375019
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/linux/pinctrl/machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2375019

Please sign in to comment.