brintos

brintos / linux-shallow public Read only

0
0
Text · 1.7 KiB · f1b9dab Raw
69 lines · c
1/* SPDX-License-Identifier: GPL-2.0+ */2/*3 * IMX pinmux core definitions4 *5 * Copyright (C) 2012 Freescale Semiconductor, Inc.6 * Copyright (C) 2012 Linaro Ltd.7 *8 * Author: Dong Aisheng <dong.aisheng@linaro.org>9 */10 11#ifndef __DRIVERS_PINCTRL_IMX1_H12#define __DRIVERS_PINCTRL_IMX1_H13 14struct platform_device;15 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).21 */22struct imx1_pin {23	unsigned int pin_id;24	unsigned int mux_id;25	unsigned long config;26};27 28/**29 * struct imx1_pin_group - describes an IMX pin group30 * @name: the name of this specific pin group31 * @pins: an array of imx1_pin structs used in this group32 * @npins: the number of pins in this group array, i.e. the number of33 *	elements in .pins so we can iterate over that array34 */35struct imx1_pin_group {36	const char *name;37	unsigned int *pin_ids;38	struct imx1_pin *pins;39	unsigned npins;40};41 42/**43 * struct imx1_pmx_func - describes IMX pinmux functions44 * @name: the name of this specific function45 * @groups: corresponding pin groups46 * @num_groups: the number of groups47 */48struct imx1_pmx_func {49	const char *name;50	const char **groups;51	unsigned num_groups;52};53 54struct 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;62};63 64#define IMX_PINCTRL_PIN(pin) PINCTRL_PIN(pin, #pin)65 66int imx1_pinctrl_core_probe(struct platform_device *pdev,67			struct imx1_pinctrl_soc_info *info);68#endif /* __DRIVERS_PINCTRL_IMX1_H */69