Commit d4416d68 authored by Greg Gallagher's avatar Greg Gallagher Committed by Jan Kiszka

Add RTDM gpio driver for the OMAP family of SOCs

Add new gpio RTDM driver for OMAP family of SOCs, tested on beaglebone black
and beaglebone green (AM335x)
Signed-off-by: Greg Gallagher's avatarGreg Gallagher <greg@embeddedgreg.com>
[Jan: enable also in CI]
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 3806b60d
......@@ -139,6 +139,7 @@ before_script:
- ./scripts/config -e XENO_DRIVERS_GPIO_SUN8I_H3
- ./scripts/config -e XENO_DRIVERS_GPIO_ZYNQ7000
- ./scripts/config -e XENO_DRIVERS_GPIO_XILINX
- ./scripts/config -e XENO_DRIVERS_GPIO_OMAP
- ./scripts/config -e XENO_DRIVERS_GPIO_DEBUG
- ./scripts/config -e XENO_DRIVERS_GPIOPWM
- ./scripts/config -e XENO_DRIVERS_SPI_BCM2835
......
......@@ -49,6 +49,14 @@ config XENO_DRIVERS_GPIO_XILINX
Enables support for the GPIO controller available from
Xilinx's softcore IP.
config XENO_DRIVERS_GPIO_OMAP
depends on ARCH_OMAP2PLUS || ARCH_OMAP
tristate "Support for OMAP GPIOs"
help
Enables support for the GPIO controller available from
OMAP family SOC.
config XENO_DRIVERS_GPIO_DEBUG
bool "Enable GPIO core debugging features"
......
......@@ -5,6 +5,7 @@ obj-$(CONFIG_XENO_DRIVERS_GPIO_MXC) += xeno-gpio-mxc.o
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) += gpio-core.o
xeno-gpio-bcm2835-y := gpio-bcm2835.o
......@@ -12,3 +13,4 @@ xeno-gpio-mxc-y := gpio-mxc.o
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
/**
* @note Copyright (C) 2020 Greg Gallagher <greg@embeddedgreg.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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <linux/module.h>
#include <rtdm/gpio.h>
#define RTDM_SUBCLASS_OMAP 6
static const char *compat_array[] = {
"ti,omap4-gpio",
"ti,omap3-gpio",
"ti,omap2-gpio",
};
static int __init omap_gpio_init(void)
{
return rtdm_gpiochip_scan_array_of(NULL, compat_array,
ARRAY_SIZE(compat_array),
RTDM_SUBCLASS_OMAP);
}
module_init(omap_gpio_init);
static void __exit omap_gpio_exit(void)
{
rtdm_gpiochip_remove_of(RTDM_SUBCLASS_OMAP);
}
module_exit(omap_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