1 /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
3 * Microsemi SoCs pinctrl driver
5 * Author: <alexandre.belloni@free-electrons.com>
6 * License: Dual MIT/GPL
7 * Copyright (c) 2017 Microsemi Corporation
10 #define MSCC_FUNC_PER_PIN 4
25 struct mscc_pin_caps {
27 unsigned char functions[MSCC_FUNC_PER_PIN];
30 struct mscc_pin_data {
32 struct mscc_pin_caps *drv_data;
35 #define MSCC_P(p, f0, f1, f2) \
36 static struct mscc_pin_caps mscc_pin_##p = { \
39 FUNC_GPIO, FUNC_##f0, FUNC_##f1, FUNC_##f2, \
43 struct mscc_pmx_func {
50 struct pinctrl_dev *pctl;
52 struct mscc_pmx_func *func;
54 const struct mscc_pin_data *mscc_pins;
56 char * const *function_names;
57 const unsigned long *mscc_gpios;
60 int mscc_pinctrl_probe(struct udevice *dev, int num_func,
61 const struct mscc_pin_data *mscc_pins, int num_pins,
62 char * const *function_names,
63 const unsigned long *mscc_gpios);
64 const struct pinctrl_ops mscc_pinctrl_ops;
66 const struct dm_gpio_ops mscc_gpio_ops;