pinctrl/nomadik: reuse GPIO debug function for pins
[deliverable/linux.git] / drivers / pinctrl / pinctrl-nomadik.h
CommitLineData
e98ea774
LW
1#ifndef PINCTRL_PINCTRL_NOMADIK_H
2#define PINCTRL_PINCTRL_NOMADIK_H
3
4#include <plat/gpio-nomadik.h>
5
6/* Package definitions */
7#define PINCTRL_NMK_STN8815 0
8#define PINCTRL_NMK_DB8500 1
9
10/**
11 * struct nmk_pingroup - describes a Nomadik pin group
12 * @name: the name of this specific pin group
13 * @pins: an array of discrete physical pins used in this group, taken
14 * from the driver-local pin enumeration space
15 * @num_pins: the number of pins in this group array, i.e. the number of
16 * elements in .pins so we can iterate over that array
17 * @altsetting: the altsetting to apply to all pins in this group to
18 * configure them to be used by a function
19 */
20struct nmk_pingroup {
21 const char *name;
22 const unsigned int *pins;
23 const unsigned npins;
24 u32 altsetting;
25};
26
27/**
28 * struct nmk_pinctrl_soc_data - Nomadik pin controller per-SoC configuration
29 * @gpio_ranges: An array of GPIO ranges for this SoC
30 * @gpio_num_ranges: The number of GPIO ranges for this SoC
31 * @pins: An array describing all pins the pin controller affects.
32 * All pins which are also GPIOs must be listed first within the
33 * array, and be numbered identically to the GPIO controller's
34 * numbering.
35 * @npins: The numbmer of entries in @pins.
36 * @groups: An array describing all pin groups the pin SoC supports.
37 * @ngroups: The number of entries in @groups.
38 */
39struct nmk_pinctrl_soc_data {
40 struct pinctrl_gpio_range *gpio_ranges;
41 unsigned gpio_num_ranges;
42 const struct pinctrl_pin_desc *pins;
43 unsigned npins;
44 const struct nmk_pingroup *groups;
45 unsigned ngroups;
46};
47
48#ifdef CONFIG_PINCTRL_DB8500
49
50void nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data **soc);
51
52#else
53
54static inline void
55nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data **soc)
56{
57}
58
59#endif
60
61#endif /* PINCTRL_PINCTRL_NOMADIK_H */
This page took 0.025121 seconds and 5 git commands to generate.