diff options
author | Mathieu J. Poirier <mathieu.poirier@linaro.org> | 2011-03-25 15:51:47 -0600 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 15:14:41 +0200 |
commit | 41f1ca40f7f5e86eb42900a2a56db5894569f38f (patch) | |
tree | 5933a52224c81d07a8341535b1343b1e1a52319f /arch/arm/mach-ux500/pins.h | |
parent | ca49374a786ed05194f1f553170032dbbddcbbb6 (diff) |
Porting architecture portion of av8100 driver from .35 to .38
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500/pins.h')
-rw-r--r-- | arch/arm/mach-ux500/pins.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/pins.h b/arch/arm/mach-ux500/pins.h new file mode 100644 index 00000000000..52e123963f1 --- /dev/null +++ b/arch/arm/mach-ux500/pins.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) ST-Ericsson SA 2010 + * + * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson + * License terms: GNU General Public License (GPL), version 2 + */ + +#ifndef __MACH_UX500_PINS_H +#define __MACH_UX500_PINS_H + +#include <linux/list.h> + +#define PIN_LOOKUP(_name, _pins) \ +{ \ + .name = _name, \ + .pins = _pins, \ +} + +#define UX500_PINS(name, pins...) \ +struct ux500_pins name = { \ + .cfg = (pin_cfg_t[]) {pins}, \ + .num = ARRAY_SIZE(((pin_cfg_t[]) {pins})), \ +} + +struct ux500_pins { + int usage; + int num; + pin_cfg_t *cfg; +}; + +struct ux500_pin_lookup { + struct list_head node; + const char *name; + struct ux500_pins *pins; +}; + +void __init ux500_pins_add(struct ux500_pin_lookup *pl, size_t num); +struct ux500_pins *ux500_pins_get(const char *name); +int ux500_pins_enable(struct ux500_pins *pins); +int ux500_pins_disable(struct ux500_pins *pins); +void ux500_pins_put(struct ux500_pins *pins); + +#endif |