[Xenomai] [PATCH 1/3] Add Xilinx AXI gpio driver

Philippe Gerum rpm at xenomai.org
Thu Feb 1 11:26:59 CET 2018


On 01/31/2018 03:36 AM, Greg Gallagher wrote:
> ---
>  kernel/drivers/gpio/Kconfig       | 10 +++++++++-
>  kernel/drivers/gpio/Makefile      |  3 ++-
>  kernel/drivers/gpio/gpio-xilinx.c | 40 +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 51 insertions(+), 2 deletions(-)

[snip]

> diff --git a/kernel/drivers/gpio/gpio-xilinx.c b/kernel/drivers/gpio/gpio-xilinx.c
> new file mode 100644
> index 0000000..72d4364
> --- /dev/null
> +++ b/kernel/drivers/gpio/gpio-xilinx.c
> @@ -0,0 +1,40 @@
> +/**
> + * @note Copyright (C) 2017 Greg Gallagher <greg at embeddedgreg.com>
> + *
> + * This driver controls the gpio that can be located on the PL
> + * of the Zynq SOC
> + *
> + * 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 "gpio-core.h"
> +

The change below is required for this driver to build since recently,
due to moving gpio-core.h to a public header containing the generic GPIO
bits some client drivers may need. Other than that, this looks ok.

diff --git a/kernel/drivers/gpio/gpio-xilinx.c
b/kernel/drivers/gpio/gpio-xilinx.c
index 72d436435..cae88b62f 100644
--- a/kernel/drivers/gpio/gpio-xilinx.c
+++ b/kernel/drivers/gpio/gpio-xilinx.c
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
  */
 #include <linux/module.h>
-#include "gpio-core.h"
+#include <rtdm/gpio.h>

 #define RTDM_SUBCLASS_XILINX  5

-- 
Philippe.



More information about the Xenomai mailing list