All of lore.kernel.org
 help / color / mirror / Atom feed
* gpio_expander_omap removal?
@ 2008-11-24 17:17 Trilok Soni
  2008-11-24 17:42 ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Trilok Soni @ 2008-11-24 17:17 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org

Any plans to remove gpio expander APIs from drivers/i2c/chips?

I hope gpio_xxx APIs from gpiolib will work directly over pcf857x.

-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gpio_expander_omap removal?
  2008-11-24 17:17 gpio_expander_omap removal? Trilok Soni
@ 2008-11-24 17:42 ` Tony Lindgren
  2008-11-24 18:10   ` Trilok Soni
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2008-11-24 17:42 UTC (permalink / raw)
  To: Trilok Soni; +Cc: linux-omap@vger.kernel.org

* Trilok Soni <soni.trilok@gmail.com> [081124 09:18]:
> Any plans to remove gpio expander APIs from drivers/i2c/chips?
> 
> I hope gpio_xxx APIs from gpiolib will work directly over pcf857x.

Yes, let's get rid of that.

Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gpio_expander_omap removal?
  2008-11-24 17:42 ` Tony Lindgren
@ 2008-11-24 18:10   ` Trilok Soni
  2008-11-24 18:26     ` David Brownell
  0 siblings, 1 reply; 4+ messages in thread
From: Trilok Soni @ 2008-11-24 18:10 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 168 bytes --]

Hi Tony,

>
> Yes, let's get rid of that.
>

Attached the patch, just check.


-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-OMAP-I2C-Remove-gpio_expander_omap-APIs.patch --]
[-- Type: text/x-patch; name=0001-OMAP-I2C-Remove-gpio_expander_omap-APIs.patch, Size: 3609 bytes --]

From 88ce88a30a3c141657786869d87afc3600def0d8 Mon Sep 17 00:00:00 2001
From: Trilok Soni <soni.trilok@gmail.com>
Date: Mon, 24 Nov 2008 23:14:48 +0530
Subject: [PATCH] OMAP: I2C: Remove gpio_expander_omap APIs

- Remove gpio_expander_omap APIs as it is replaced by
  gpio/pcf857x.

Signed-off-by: Trilok Soni <soni.trilok@gmail.com>
---
 drivers/i2c/chips/Kconfig              |    7 ---
 drivers/i2c/chips/Makefile             |    1 -
 drivers/i2c/chips/gpio_expander_omap.c |   71 --------------------------------
 3 files changed, 0 insertions(+), 79 deletions(-)
 delete mode 100644 drivers/i2c/chips/gpio_expander_omap.c

diff --git a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig
index 4c73bb5..d61589b 100644
--- a/drivers/i2c/chips/Kconfig
+++ b/drivers/i2c/chips/Kconfig
@@ -146,13 +146,6 @@ config SENSORS_TLV320AIC23
 	  If you say yes here you get support for the I2C control
 	  interface for Texas Instruments TLV320AIC23 audio codec.
 
-config GPIOEXPANDER_OMAP
-	bool "GPIO Expander PCF8574PWR for OMAP"
-	depends on I2C && MACH_OMAP_H3
-	help
-	  If you say yes here you get support for I/O expander calls
-	  to configure IrDA, Camera and audio devices.
-
 config TWL4030_MADC
 	tristate "TWL4030 MADC Driver"
 	depends on TWL4030_CORE
diff --git a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile
index cb9f2bb..d82019c 100644
--- a/drivers/i2c/chips/Makefile
+++ b/drivers/i2c/chips/Makefile
@@ -21,7 +21,6 @@ obj-$(CONFIG_SENSORS_PCF8591)	+= pcf8591.o
 obj-$(CONFIG_ISP1301_OMAP)	+= isp1301_omap.o
 obj-$(CONFIG_TPS65010)		+= tps65010.o
 obj-$(CONFIG_SENSORS_TLV320AIC23) += tlv320aic23.o
-obj-$(CONFIG_GPIOEXPANDER_OMAP)	+= gpio_expander_omap.o
 obj-$(CONFIG_MENELAUS)		+= menelaus.o
 obj-$(CONFIG_SENSORS_TSL2550)	+= tsl2550.o
 obj-$(CONFIG_MCU_MPC8349EMITX)	+= mcu_mpc8349emitx.o
diff --git a/drivers/i2c/chips/gpio_expander_omap.c b/drivers/i2c/chips/gpio_expander_omap.c
deleted file mode 100644
index dfe7f04..0000000
--- a/drivers/i2c/chips/gpio_expander_omap.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * drivers/i2c/chips/gpio_expander_omap.c
- *
- * Copyright (C) 2004 Texas Instruments Inc
- * Author:
- *
- * gpio expander is used to configure IrDA, camera and audio devices on omap 1710 processor.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- */
-
-#include <linux/types.h>
-#include <linux/i2c.h>
-#include <linux/errno.h>
-
-int read_gpio_expa(u8 * val, int addr);
-int write_gpio_expa(u8 val, int addr);
-
-int write_gpio_expa(u8 val, int addr)
-{
-	struct i2c_adapter *adap;
-	int err;
-	struct i2c_msg msg[1];
-	unsigned char data[1];
-
-	adap = i2c_get_adapter(1);
-	if (!adap)
-		return -ENODEV;
-	msg->addr = addr;	/* I2C address of GPIO EXPA */
-	msg->flags = 0;
-	msg->len = 1;
-	msg->buf = data;
-	data[0] = val;
-	err = i2c_transfer(adap, msg, 1);
-	if (err >= 0)
-		return 0;
-	return err;
-}
-
-/* Read from I/O EXPANDER on the H3 board.
- * The IO expanders need an independent I2C client driver.
- */
-
-int read_gpio_expa(u8 * val, int addr)
-{
-	struct i2c_adapter *adap;
-	int err;
-	struct i2c_msg msg[1];
-	unsigned char data[1];
-
-	adap = i2c_get_adapter(1);
-	if (!adap)
-		return -ENODEV;
-	msg->addr = addr;	/* I2C address of GPIO EXPA */
-	msg->flags = I2C_M_RD;
-	msg->len = 2;
-	msg->buf = data;
-	err = i2c_transfer(adap, msg, 1);
-	*val = data[0];
-
-	if (err >= 0)
-		return 0;
-	return err;
-}
-
-EXPORT_SYMBOL(read_gpio_expa);
-EXPORT_SYMBOL(write_gpio_expa);
-
-- 
1.6.0.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: gpio_expander_omap removal?
  2008-11-24 18:10   ` Trilok Soni
@ 2008-11-24 18:26     ` David Brownell
  0 siblings, 0 replies; 4+ messages in thread
From: David Brownell @ 2008-11-24 18:26 UTC (permalink / raw)
  To: Trilok Soni; +Cc: Tony Lindgren, linux-omap@vger.kernel.org

On Monday 24 November 2008, Trilok Soni wrote:
> > Yes, let's get rid of that.
> >
> 
> Attached the patch, just check.

I suggest the two patches I'll send in a moment, instead.
The reason it was still around was because the H3 board
support still used it...

- Dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-24 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-24 17:17 gpio_expander_omap removal? Trilok Soni
2008-11-24 17:42 ` Tony Lindgren
2008-11-24 18:10   ` Trilok Soni
2008-11-24 18:26     ` David Brownell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.