Commit fd557d20 authored by Hongzhan Chen's avatar Hongzhan Chen Committed by Jan Kiszka
Browse files

driver/gpio: Add Intel Cherryview pinctrl driver



Add support for Intel Cherryview pin controller driver
Signed-off-by: default avatarHongzhan Chen <hongzhan.chen@intel.com>
[Jan: renamed 'compat_array' to 'label_array', folded in right removal function]
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 33d28eee
......@@ -57,6 +57,13 @@ config XENO_DRIVERS_GPIO_OMAP
Enables support for the GPIO controller available from
OMAP family SOC.
config XENO_DRIVERS_GPIO_CHERRYVIEW
depends on PINCTRL_CHERRYVIEW
tristate "Support for Cherryview GPIOs"
help
Enables support for the Intel Cherryview GPIO controller
config XENO_DRIVERS_GPIO_DEBUG
bool "Enable GPIO core debugging features"
......
......@@ -6,6 +6,7 @@ obj-$(CONFIG_XENO_DRIVERS_GPIO_SUN8I_H3) += xeno-gpio-sun8i-h3.o
obj-$(CONFIG_XENO_DRIVERS_GPIO_ZYNQ7000) += xeno-gpio-zynq7000.o
obj-$(CONFIG_XENO_DRIVERS_GPIO_XILINX) += xeno-gpio-xilinx.o
obj-$(CONFIG_XENO_DRIVERS_GPIO_OMAP) += xeno-gpio-omap.o
obj-$(CONFIG_XENO_DRIVERS_GPIO_CHERRYVIEW) += xeno-gpio-cherryview.o
obj-$(CONFIG_XENO_DRIVERS_GPIO) += gpio-core.o
xeno-gpio-bcm2835-y := gpio-bcm2835.o
......@@ -14,3 +15,4 @@ xeno-gpio-sun8i-h3-y := gpio-sun8i-h3.o
xeno-gpio-zynq7000-y := gpio-zynq7000.o
xeno-gpio-xilinx-y := gpio-xilinx.o
xeno-gpio-omap-y := gpio-omap.o
xeno-gpio-cherryview-y := gpio-cherryview.o
// SPDX-License-Identifier: GPL-2.0
/*
* @note Copyright (C) 2021 Hongzhan Chen <hongzhan.chen@intel.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#include <linux/module.h>
#include <rtdm/gpio.h>
#define RTDM_SUBCLASS_CHERRYVIEW 7
static const char *label_array[] = {
"INT33FF:00",
"INT33FF:01",
"INT33FF:02",
"INT33FF:03",
};
static int __init cherryview_gpio_init(void)
{
return rtdm_gpiochip_array_find(NULL, label_array,
ARRAY_SIZE(label_array),
RTDM_SUBCLASS_CHERRYVIEW);
}
module_init(cherryview_gpio_init);
static void __exit cherryview_gpio_exit(void)
{
rtdm_gpiochip_remove_by_type(RTDM_SUBCLASS_CHERRYVIEW);
}
module_exit(cherryview_gpio_exit);
MODULE_LICENSE("GPL");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment