Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Author: Jerry Zhu <Jerry.Zhu@cixtech.com>
|
|
*/
|
|
|
|
#ifndef __DRIVERS_PINCTRL_SKY1_H
|
|
#define __DRIVERS_PINCTRL_SKY1_H
|
|
|
|
struct sky1_pinctrl_group {
|
|
const char *name;
|
|
unsigned long config;
|
|
unsigned int pin;
|
|
};
|
|
|
|
struct sky1_pin_desc {
|
|
const struct pinctrl_pin_desc pin;
|
|
const char * const *func_group;
|
|
unsigned int nfunc;
|
|
};
|
|
|
|
struct sky1_pinctrl_soc_info {
|
|
const struct sky1_pin_desc *pins;
|
|
unsigned int npins;
|
|
};
|
|
|
|
#define SKY_PINFUNCTION(_pin, _func) \
|
|
((struct sky1_pin_desc) { \
|
|
.pin = _pin, \
|
|
.func_group = _func##_group, \
|
|
.nfunc = ARRAY_SIZE(_func##_group), \
|
|
})
|
|
/**
|
|
* @dev: a pointer back to containing device
|
|
* @base: the offset to the controller in virtual memory
|
|
*/
|
|
struct sky1_pinctrl {
|
|
struct device *dev;
|
|
struct pinctrl_dev *pctl;
|
|
void __iomem *base;
|
|
const struct sky1_pinctrl_soc_info *info;
|
|
struct sky1_pinctrl_group *groups;
|
|
const char **grp_names;
|
|
};
|
|
|
|
int sky1_base_pinctrl_probe(struct platform_device *pdev,
|
|
const struct sky1_pinctrl_soc_info *info);
|
|
|
|
#endif /* __DRIVERS_PINCTRL_SKY1_H */
|