Linux 5.1.15
[linux/fpc-iii.git] / drivers / pinctrl / freescale / pinctrl-imx1.h
blobf1b9dabf76014a277c0c0a23cde315b8f28fcf21
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * IMX pinmux core definitions
5 * Copyright (C) 2012 Freescale Semiconductor, Inc.
6 * Copyright (C) 2012 Linaro Ltd.
8 * Author: Dong Aisheng <dong.aisheng@linaro.org>
9 */
11 #ifndef __DRIVERS_PINCTRL_IMX1_H
12 #define __DRIVERS_PINCTRL_IMX1_H
14 struct platform_device;
16 /**
17 * struct imx1_pin - describes an IMX1/21/27 pin.
18 * @pin_id: ID of the described pin.
19 * @mux_id: ID of the mux setup.
20 * @config: Configuration of the pin (currently only pullup-enable).
22 struct imx1_pin {
23 unsigned int pin_id;
24 unsigned int mux_id;
25 unsigned long config;
28 /**
29 * struct imx1_pin_group - describes an IMX pin group
30 * @name: the name of this specific pin group
31 * @pins: an array of imx1_pin structs used in this group
32 * @npins: the number of pins in this group array, i.e. the number of
33 * elements in .pins so we can iterate over that array
35 struct imx1_pin_group {
36 const char *name;
37 unsigned int *pin_ids;
38 struct imx1_pin *pins;
39 unsigned npins;
42 /**
43 * struct imx1_pmx_func - describes IMX pinmux functions
44 * @name: the name of this specific function
45 * @groups: corresponding pin groups
46 * @num_groups: the number of groups
48 struct imx1_pmx_func {
49 const char *name;
50 const char **groups;
51 unsigned num_groups;
54 struct imx1_pinctrl_soc_info {
55 struct device *dev;
56 const struct pinctrl_pin_desc *pins;
57 unsigned int npins;
58 struct imx1_pin_group *groups;
59 unsigned int ngroups;
60 struct imx1_pmx_func *functions;
61 unsigned int nfunctions;
64 #define IMX_PINCTRL_PIN(pin) PINCTRL_PIN(pin, #pin)
66 int imx1_pinctrl_core_probe(struct platform_device *pdev,
67 struct imx1_pinctrl_soc_info *info);
68 #endif /* __DRIVERS_PINCTRL_IMX1_H */