Re: [PATCH 5/6] CRIS v32: remove I2C bitbanging driver

2015-10-01 Thread Jesper Nilsson
On Mon, Aug 03, 2015 at 08:19:23PM +0200, Rabin Vincent wrote:
> Now that we have a gpiolib GPIO driver, the generic i2c-gpio driver
> provides this functionality.

Applied to the cris tree, thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 5/6] CRIS v32: remove I2C bitbanging driver

2015-10-01 Thread Jesper Nilsson
On Mon, Aug 03, 2015 at 08:19:23PM +0200, Rabin Vincent wrote:
> Now that we have a gpiolib GPIO driver, the generic i2c-gpio driver
> provides this functionality.

Applied to the cris tree, thanks!

/^JN - Jesper Nilsson
-- 
   Jesper Nilsson -- jesper.nils...@axis.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/6] CRIS v32: remove I2C bitbanging driver

2015-08-03 Thread Rabin Vincent
Now that we have a gpiolib GPIO driver, the generic i2c-gpio driver
provides this functionality.

Signed-off-by: Rabin Vincent 
---
 arch/cris/arch-v32/drivers/Kconfig  |  18 -
 arch/cris/arch-v32/drivers/Makefile |   1 -
 arch/cris/arch-v32/drivers/i2c.c| 751 
 arch/cris/arch-v32/drivers/i2c.h|  16 -
 4 files changed, 786 deletions(-)
 delete mode 100644 arch/cris/arch-v32/drivers/i2c.c
 delete mode 100644 arch/cris/arch-v32/drivers/i2c.h

diff --git a/arch/cris/arch-v32/drivers/Kconfig 
b/arch/cris/arch-v32/drivers/Kconfig
index 4fc16b4..bebb718 100644
--- a/arch/cris/arch-v32/drivers/Kconfig
+++ b/arch/cris/arch-v32/drivers/Kconfig
@@ -149,24 +149,6 @@ config ETRAX_NANDBOOT
  Say Y if your boot code, kernel and root file system is in
  NAND flash. Say N if they are in NOR flash.
 
-config ETRAX_I2C
-   bool "I2C driver"
-   depends on ETRAX_ARCH_V32
-   help
- This option enables the I2C driver used by e.g. the RTC driver.
-
-config ETRAX_V32_I2C_DATA_PORT
-   string "I2C data pin"
-   depends on ETRAX_I2C
-   help
- The pin to use for I2C data.
-
-config ETRAX_V32_I2C_CLK_PORT
-   string "I2C clock pin"
-   depends on ETRAX_I2C
-   help
- The pin to use for I2C clock.
-
 config ETRAX_GPIO
bool "GPIO support"
depends on ETRAX_ARCH_V32
diff --git a/arch/cris/arch-v32/drivers/Makefile 
b/arch/cris/arch-v32/drivers/Makefile
index 15fbfef..b5a75fd 100644
--- a/arch/cris/arch-v32/drivers/Makefile
+++ b/arch/cris/arch-v32/drivers/Makefile
@@ -7,6 +7,5 @@ obj-$(CONFIG_ETRAX_AXISFLASHMAP)+= axisflashmap.o
 obj-$(CONFIG_ETRAXFS)   += mach-fs/
 obj-$(CONFIG_CRIS_MACH_ARTPEC3) += mach-a3/
 obj-$(CONFIG_ETRAX_IOP_FW_LOAD) += iop_fw_load.o
-obj-$(CONFIG_ETRAX_I2C)+= i2c.o
 obj-$(CONFIG_ETRAX_SYNCHRONOUS_SERIAL) += sync_serial.o
 obj-$(CONFIG_PCI)  += pci/
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c
deleted file mode 100644
index 3b2c82c..000
--- a/arch/cris/arch-v32/drivers/i2c.c
+++ /dev/null
@@ -1,751 +0,0 @@
-/*!***
-*!
-*! FILE NAME  : i2c.c
-*!
-*! DESCRIPTION: implements an interface for IIC/I2C, both directly from other
-*!  kernel modules (i2c_writereg/readreg) and from userspace using
-*!  ioctl()'s
-*!
-*! Nov 30 1998  Torbjorn Eliasson  Initial version.
-*!  Bjorn WesenElinux kernel version.
-*! Jan 14 2000  Johan AdolfssonFixed PB shadow register stuff -
-*! don't use PB_I2C if DS1302 uses same bits,
-*! use PB.
-*| June 23 2003 Pieter Grimmerink  Added 'i2c_sendnack'. i2c_readreg now
-*| generates nack on last received byte,
-*| instead of ack.
-*| i2c_getack changed data level while clock
-*| was high, causing DS75 to see  a stop 
condition
-*!
-*! ---
-*!
-*! (C) Copyright 1999-2007 Axis Communications AB, LUND, SWEDEN
-*!
-*!***/
-
-/** INCLUDE FILES SECTION ***/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-#include 
-#include 
-
-#include "i2c.h"
-
-/** I2C DEFINITION SECTION */
-
-#define D(x)
-
-#define I2C_MAJOR 123  /* LOCAL/EXPERIMENTAL */
-static DEFINE_MUTEX(i2c_mutex);
-static const char i2c_name[] = "i2c";
-
-#define CLOCK_LOW_TIME8
-#define CLOCK_HIGH_TIME   8
-#define START_CONDITION_HOLD_TIME 8
-#define STOP_CONDITION_HOLD_TIME  8
-#define ENABLE_OUTPUT 0x01
-#define ENABLE_INPUT 0x00
-#define I2C_CLOCK_HIGH 1
-#define I2C_CLOCK_LOW 0
-#define I2C_DATA_HIGH 1
-#define I2C_DATA_LOW 0
-
-#define i2c_enable()
-#define i2c_disable()
-
-/* enable or disable output-enable, to select output or input on the i2c bus */
-
-#define i2c_dir_out() crisv32_io_set_dir(_i2c_data, crisv32_io_dir_out)
-#define i2c_dir_in() crisv32_io_set_dir(_i2c_data, crisv32_io_dir_in)
-
-/* control the i2c clock and data signals */
-
-#define i2c_clk(x) crisv32_io_set(_i2c_clk, x)
-#define i2c_data(x) crisv32_io_set(_i2c_data, x)
-
-/* read a bit from the i2c interface */
-
-#define i2c_getbit() crisv32_io_rd(_i2c_data)
-
-#define i2c_delay(usecs) udelay(usecs)
-
-static DEFINE_SPINLOCK(i2c_lock); /* Protect directions etc */
-
-/** VARIABLE SECTION /
-
-static struct crisv32_iopin cris_i2c_clk;
-static struct crisv32_iopin cris_i2c_data;
-
-/** FUNCTION DEFINITION SECTION 

[PATCH 5/6] CRIS v32: remove I2C bitbanging driver

2015-08-03 Thread Rabin Vincent
Now that we have a gpiolib GPIO driver, the generic i2c-gpio driver
provides this functionality.

Signed-off-by: Rabin Vincent ra...@rab.in
---
 arch/cris/arch-v32/drivers/Kconfig  |  18 -
 arch/cris/arch-v32/drivers/Makefile |   1 -
 arch/cris/arch-v32/drivers/i2c.c| 751 
 arch/cris/arch-v32/drivers/i2c.h|  16 -
 4 files changed, 786 deletions(-)
 delete mode 100644 arch/cris/arch-v32/drivers/i2c.c
 delete mode 100644 arch/cris/arch-v32/drivers/i2c.h

diff --git a/arch/cris/arch-v32/drivers/Kconfig 
b/arch/cris/arch-v32/drivers/Kconfig
index 4fc16b4..bebb718 100644
--- a/arch/cris/arch-v32/drivers/Kconfig
+++ b/arch/cris/arch-v32/drivers/Kconfig
@@ -149,24 +149,6 @@ config ETRAX_NANDBOOT
  Say Y if your boot code, kernel and root file system is in
  NAND flash. Say N if they are in NOR flash.
 
-config ETRAX_I2C
-   bool I2C driver
-   depends on ETRAX_ARCH_V32
-   help
- This option enables the I2C driver used by e.g. the RTC driver.
-
-config ETRAX_V32_I2C_DATA_PORT
-   string I2C data pin
-   depends on ETRAX_I2C
-   help
- The pin to use for I2C data.
-
-config ETRAX_V32_I2C_CLK_PORT
-   string I2C clock pin
-   depends on ETRAX_I2C
-   help
- The pin to use for I2C clock.
-
 config ETRAX_GPIO
bool GPIO support
depends on ETRAX_ARCH_V32
diff --git a/arch/cris/arch-v32/drivers/Makefile 
b/arch/cris/arch-v32/drivers/Makefile
index 15fbfef..b5a75fd 100644
--- a/arch/cris/arch-v32/drivers/Makefile
+++ b/arch/cris/arch-v32/drivers/Makefile
@@ -7,6 +7,5 @@ obj-$(CONFIG_ETRAX_AXISFLASHMAP)+= axisflashmap.o
 obj-$(CONFIG_ETRAXFS)   += mach-fs/
 obj-$(CONFIG_CRIS_MACH_ARTPEC3) += mach-a3/
 obj-$(CONFIG_ETRAX_IOP_FW_LOAD) += iop_fw_load.o
-obj-$(CONFIG_ETRAX_I2C)+= i2c.o
 obj-$(CONFIG_ETRAX_SYNCHRONOUS_SERIAL) += sync_serial.o
 obj-$(CONFIG_PCI)  += pci/
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c
deleted file mode 100644
index 3b2c82c..000
--- a/arch/cris/arch-v32/drivers/i2c.c
+++ /dev/null
@@ -1,751 +0,0 @@
-/*!***
-*!
-*! FILE NAME  : i2c.c
-*!
-*! DESCRIPTION: implements an interface for IIC/I2C, both directly from other
-*!  kernel modules (i2c_writereg/readreg) and from userspace using
-*!  ioctl()'s
-*!
-*! Nov 30 1998  Torbjorn Eliasson  Initial version.
-*!  Bjorn WesenElinux kernel version.
-*! Jan 14 2000  Johan AdolfssonFixed PB shadow register stuff -
-*! don't use PB_I2C if DS1302 uses same bits,
-*! use PB.
-*| June 23 2003 Pieter Grimmerink  Added 'i2c_sendnack'. i2c_readreg now
-*| generates nack on last received byte,
-*| instead of ack.
-*| i2c_getack changed data level while clock
-*| was high, causing DS75 to see  a stop 
condition
-*!
-*! ---
-*!
-*! (C) Copyright 1999-2007 Axis Communications AB, LUND, SWEDEN
-*!
-*!***/
-
-/** INCLUDE FILES SECTION ***/
-
-#include linux/module.h
-#include linux/sched.h
-#include linux/errno.h
-#include linux/kernel.h
-#include linux/fs.h
-#include linux/string.h
-#include linux/init.h
-#include linux/mutex.h
-
-#include asm/etraxi2c.h
-
-#include asm/io.h
-#include asm/delay.h
-
-#include i2c.h
-
-/** I2C DEFINITION SECTION */
-
-#define D(x)
-
-#define I2C_MAJOR 123  /* LOCAL/EXPERIMENTAL */
-static DEFINE_MUTEX(i2c_mutex);
-static const char i2c_name[] = i2c;
-
-#define CLOCK_LOW_TIME8
-#define CLOCK_HIGH_TIME   8
-#define START_CONDITION_HOLD_TIME 8
-#define STOP_CONDITION_HOLD_TIME  8
-#define ENABLE_OUTPUT 0x01
-#define ENABLE_INPUT 0x00
-#define I2C_CLOCK_HIGH 1
-#define I2C_CLOCK_LOW 0
-#define I2C_DATA_HIGH 1
-#define I2C_DATA_LOW 0
-
-#define i2c_enable()
-#define i2c_disable()
-
-/* enable or disable output-enable, to select output or input on the i2c bus */
-
-#define i2c_dir_out() crisv32_io_set_dir(cris_i2c_data, crisv32_io_dir_out)
-#define i2c_dir_in() crisv32_io_set_dir(cris_i2c_data, crisv32_io_dir_in)
-
-/* control the i2c clock and data signals */
-
-#define i2c_clk(x) crisv32_io_set(cris_i2c_clk, x)
-#define i2c_data(x) crisv32_io_set(cris_i2c_data, x)
-
-/* read a bit from the i2c interface */
-
-#define i2c_getbit() crisv32_io_rd(cris_i2c_data)
-
-#define i2c_delay(usecs) udelay(usecs)
-
-static DEFINE_SPINLOCK(i2c_lock); /* Protect directions etc */
-
-/** VARIABLE SECTION