Add support for SX151x SPI GPIO Expanders
PATCH 1/1 Add support for SX151x SPI GPIO Expanders
Signed-off-by Viktar Palstsiuk <[email protected]>
--- drivers/gpio/Makefile | 1 + drivers/gpio/sx151x.c | 255 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/sx151x.h | 30 ++++++ 3 files changed, 286 insertions(+) create mode 100644 drivers/gpio/sx151x.c create mode 100644 include/sx151x.h
drivers/gpio/Makefile +1 -0
@@ -34,6 +34,7 @@ COBJS-$(CONFIG_S3C2440_GPIO) += s3c2440_gpio.o COBJS-$(CONFIG_XILINX_GPIO) += xilinx_gpio.o COBJS-$(CONFIG_ADI_GPIO2) += adi_gpio2.o COBJS-$(CONFIG_TCA642X) += tca642x.o +COBJS-$(CONFIG_SX151X) += sx151x.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c)
drivers/gpio/sx151x.c new file +255 -0
255 lines not on this page · raw message
include/sx151x.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* (C) Copyright 2013 +* Viktar Palstsiuk, Promwad, [email protected] +* +* 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 +*/ + +#ifndef __SX151X_H_ +#define __SX151X_H_ + +int sx151x_get_value (int chip,int gpio); +int sx151x_set_value (int chip,int gpio,int val); +int sx151x_direction_input (int chip,int gpio); +int sx151x_direction_output (int chip,int gpio); +int sx151x_reset (int chip); + +#endif /* __SX151X_H_ */
Signature · 1 line
1.8.4.rc3
PATCH 1/1 Add support for SX151x SPI GPIO Expanders
Dear Viktar Palstsiuk,
Quoted 11 lines · In message <[email protected]>…
+++
b/drivers/gpio/sx151x.cdrivers/gpio/sx151x.c new file +8
-0@@ -0,0 +1,255 @@ +/* +* (C) Copyright 2013 +* Viktar Palstsiuk, Promwad, viktar.palstsiuk at promwad.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.
drivers/gpio/sx151x.c line 18
Quoted 10 lines
drivers/gpio/sx151x.c new file +10
-0+* +* 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
Please replace by SPDX ID.
Best regards,
Wolfgang Denk
Signature · 8 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You speak of courage. Obviously you do not know the difference bet- ween courage and foolhardiness. Always it is the brave ones who die, the soldiers. -- Kor, the Klingon Commander, "Errand of Mercy", stardate 3201.7