public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] cbus: move <plat/cbus.h> to <linux/platform_data/cbus.h>
@ 2011-06-16 11:27 Felipe Balbi
  2011-06-16 11:27 ` [PATCH 2/4] cbus: drop unneeded headers Felipe Balbi
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Felipe Balbi @ 2011-06-16 11:27 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Linux OMAP Mailing List, Felipe Balbi

it's a much more sensible location for that
sort of thing.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap1/board-nokia770.c   |    2 +-
 arch/arm/mach-omap2/board-n8x0.c       |    2 +-
 arch/arm/plat-omap/include/plat/cbus.h |   40 --------------------------------
 drivers/cbus/cbus.c                    |    3 +-
 drivers/cbus/retu.c                    |    2 +-
 include/linux/platform_data/cbus.h     |   40 ++++++++++++++++++++++++++++++++
 6 files changed, 44 insertions(+), 45 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/plat/cbus.h
 create mode 100644 include/linux/platform_data/cbus.h

diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 676d99f..7990c48 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -12,6 +12,7 @@
 #include <linux/init.h>
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
+#include <linux/platform_data/cbus.h>
 #include <linux/irq.h>
 #include <linux/input.h>
 #include <linux/clk.h>
@@ -37,7 +38,6 @@
 #include <plat/lcd_mipid.h>
 #include <plat/mmc.h>
 #include <plat/clock.h>
-#include <plat/cbus.h>
 
 #define ADS7846_PENDOWN_GPIO	15
 
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index b61ac1d..b3e80c9 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -19,6 +19,7 @@
 #include <linux/io.h>
 #include <linux/stddef.h>
 #include <linux/platform_device.h>
+#include <linux/platform_data/cbus.h>
 #include <linux/i2c.h>
 #include <linux/spi/spi.h>
 #include <linux/usb/musb.h>
@@ -35,7 +36,6 @@
 #include <plat/onenand.h>
 #include <plat/mmc.h>
 #include <plat/serial.h>
-#include <plat/cbus.h>
 
 #include "mux.h"
 
diff --git a/arch/arm/plat-omap/include/plat/cbus.h b/arch/arm/plat-omap/include/plat/cbus.h
deleted file mode 100644
index 563b1c2..0000000
--- a/arch/arm/plat-omap/include/plat/cbus.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * cbus.h - CBUS platform_data definition
- *
- * Copyright (C) 2004 - 2009 Nokia Corporation
- *
- * Written by Felipe Balbi <felipe.balbi@nokia.com>
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file "COPYING" in the main directory of this
- * archive for more details.
- *
- * 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 __PLAT_CBUS_H
-#define __PLAT_CBUS_H
-
-#define CBUS_RETU_DEVICE_ID	0x01
-#define CBUS_TAHVO_DEVICE_ID	0x02
-
-struct cbus_host_platform_data {
-	int	dat_gpio;
-	int	clk_gpio;
-	int	sel_gpio;
-};
-
-struct cbus_retu_platform_data {
-	int	irq_base;
-	int	irq_end;
-	int	devid;
-};
-
-#endif /* __PLAT_CBUS_H */
diff --git a/drivers/cbus/cbus.c b/drivers/cbus/cbus.c
index fb524cb..486254d 100644
--- a/drivers/cbus/cbus.c
+++ b/drivers/cbus/cbus.c
@@ -33,8 +33,7 @@
 #include <linux/spinlock.h>
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
-
-#include <plat/cbus.h>
+#include <linux/platform_data/cbus.h>
 
 #include "cbus.h"
 
diff --git a/drivers/cbus/retu.c b/drivers/cbus/retu.c
index 3f0578b..be07938 100644
--- a/drivers/cbus/retu.c
+++ b/drivers/cbus/retu.c
@@ -37,6 +37,7 @@
 #include <linux/irq.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
+#include <linux/platform_data/cbus.h>
 #include <linux/gpio.h>
 
 #include <asm/uaccess.h>
@@ -44,7 +45,6 @@
 
 #include <plat/mux.h>
 #include <plat/board.h>
-#include <plat/cbus.h>
 
 #include "cbus.h"
 #include "retu.h"
diff --git a/include/linux/platform_data/cbus.h b/include/linux/platform_data/cbus.h
new file mode 100644
index 0000000..a1c5a26
--- /dev/null
+++ b/include/linux/platform_data/cbus.h
@@ -0,0 +1,40 @@
+/*
+ * cbus.h - CBUS platform_data definition
+ *
+ * Copyright (C) 2004 - 2009 Nokia Corporation
+ *
+ * Written by Felipe Balbi <felipe.balbi@nokia.com>
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License. See the file "COPYING" in the main directory of this
+ * archive for more details.
+ *
+ * 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 __INCLUDE_LINUX_CBUS_H
+#define __INCLUDE_LINUX_CBUS_H
+
+#define CBUS_RETU_DEVICE_ID	0x01
+#define CBUS_TAHVO_DEVICE_ID	0x02
+
+struct cbus_host_platform_data {
+	int	dat_gpio;
+	int	clk_gpio;
+	int	sel_gpio;
+};
+
+struct cbus_retu_platform_data {
+	int	irq_base;
+	int	irq_end;
+	int	devid;
+};
+
+#endif /* __INCLUDE_LINUX_CBUS_H */
-- 
1.7.6.rc1


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

* [PATCH 2/4] cbus: drop unneeded headers
  2011-06-16 11:27 [PATCH 1/4] cbus: move <plat/cbus.h> to <linux/platform_data/cbus.h> Felipe Balbi
@ 2011-06-16 11:27 ` Felipe Balbi
  2011-06-16 11:27 ` [PATCH 3/4] cbus: Kconfig cleanup Felipe Balbi
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Felipe Balbi @ 2011-06-16 11:27 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Linux OMAP Mailing List, Felipe Balbi

we don't use anything from those headers
so we might as well just drop them.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/cbus/retu.c  |   10 ----------
 drivers/cbus/tahvo.c |   10 ----------
 2 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/drivers/cbus/retu.c b/drivers/cbus/retu.c
index be07938..708b811 100644
--- a/drivers/cbus/retu.c
+++ b/drivers/cbus/retu.c
@@ -30,21 +30,11 @@
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/device.h>
-#include <linux/miscdevice.h>
-#include <linux/poll.h>
-#include <linux/fs.h>
 #include <linux/mutex.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/cbus.h>
-#include <linux/gpio.h>
-
-#include <asm/uaccess.h>
-#include <asm/mach-types.h>
-
-#include <plat/mux.h>
-#include <plat/board.h>
 
 #include "cbus.h"
 #include "retu.h"
diff --git a/drivers/cbus/tahvo.c b/drivers/cbus/tahvo.c
index bc440bc..d4a89a6 100644
--- a/drivers/cbus/tahvo.c
+++ b/drivers/cbus/tahvo.c
@@ -29,19 +29,9 @@
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/device.h>
-#include <linux/miscdevice.h>
-#include <linux/poll.h>
-#include <linux/fs.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
-#include <linux/gpio.h>
-
-#include <asm/uaccess.h>
-#include <asm/mach-types.h>
-
-#include <plat/mux.h>
-#include <plat/board.h>
 
 #include "cbus.h"
 #include "tahvo.h"
-- 
1.7.6.rc1


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

* [PATCH 3/4] cbus: Kconfig cleanup
  2011-06-16 11:27 [PATCH 1/4] cbus: move <plat/cbus.h> to <linux/platform_data/cbus.h> Felipe Balbi
  2011-06-16 11:27 ` [PATCH 2/4] cbus: drop unneeded headers Felipe Balbi
@ 2011-06-16 11:27 ` Felipe Balbi
  2011-06-16 11:27 ` [PATCH 4/4] cbus: move cbus under drivers/Kconfig Felipe Balbi
  2011-06-29 10:51 ` [PATCH 1/4] cbus: move <plat/cbus.h> to <linux/platform_data/cbus.h> Tony Lindgren
  3 siblings, 0 replies; 5+ messages in thread
From: Felipe Balbi @ 2011-06-16 11:27 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Linux OMAP Mailing List, Felipe Balbi

trivial, no functional changes. While at
that, also drop the OMAP dependency as
there's no need for that.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/cbus/Kconfig |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/cbus/Kconfig b/drivers/cbus/Kconfig
index d845a7e..938d244 100644
--- a/drivers/cbus/Kconfig
+++ b/drivers/cbus/Kconfig
@@ -5,7 +5,6 @@
 menu "CBUS support"
 
 config CBUS
-	depends on ARCH_OMAP
 	bool "CBUS support on OMAP"
 	---help---
 	  CBUS is a proprietary serial protocol by Nokia.  It is mainly
@@ -21,8 +20,10 @@ config CBUS_TAHVO
 
 	  If you want Tahvo support, you should say Y here.
 
+if CBUS_TAHVO
+
 config CBUS_TAHVO_USB
-	depends on CBUS_TAHVO && USB
+	depends on USB
 	select USB_OTG_UTILS
 	tristate "Support for Tahvo USB transceiver"
 	---help---
@@ -35,6 +36,8 @@ config CBUS_TAHVO_USB_HOST_BY_DEFAULT
 	  Say Y here, if you want the device to enter USB host mode
 	  by default on bootup.
 
+endif # CBUS_TAHVO
+
 config CBUS_RETU
 	depends on CBUS
 	bool "Support for Retu"
@@ -43,8 +46,10 @@ config CBUS_RETU
 
 	  If you want Retu support, you should say Y here.
 
+if CBUS_RETU
+
 config CBUS_RETU_POWERBUTTON
-	depends on CBUS_RETU
+	depends on INPUT
 	bool "Support for Retu power button"
 	---help---
 	  The power button on Nokia 770 is connected to the Retu ASIC.
@@ -52,25 +57,27 @@ config CBUS_RETU_POWERBUTTON
 	  If you want support for the Retu power button, you should say Y here.
 
 config CBUS_RETU_RTC
-	depends on CBUS_RETU && RTC_CLASS
+	depends on RTC_CLASS
 	tristate "Support for Retu pseudo-RTC"
 	---help---
 	  Say Y here if you want support for the device that alleges to be an
 	  RTC in Retu. This will expose a sysfs interface for it.
 
 config CBUS_RETU_WDT
-	depends on CBUS_RETU && SYSFS && WATCHDOG
+	depends on SYSFS && WATCHDOG
 	tristate "Support for Retu watchdog timer"
 	---help---
 	  Say Y here if you want support for the watchdog in Retu. This will
 	  expose a sysfs interface to grok it.
 
 config CBUS_RETU_HEADSET
-	depends on CBUS_RETU && SYSFS
+	depends on SYSFS
 	tristate "Support for headset detection with Retu/Vilma"
 	---help---
 	  Say Y here if you want support detecting a headset that's connected
 	  to Retu/Vilma. Detection state and events are exposed through
 	  sysfs.
 
+endif # CBUS_RETU
+
 endmenu
-- 
1.7.6.rc1


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

* [PATCH 4/4] cbus: move cbus under drivers/Kconfig
  2011-06-16 11:27 [PATCH 1/4] cbus: move <plat/cbus.h> to <linux/platform_data/cbus.h> Felipe Balbi
  2011-06-16 11:27 ` [PATCH 2/4] cbus: drop unneeded headers Felipe Balbi
  2011-06-16 11:27 ` [PATCH 3/4] cbus: Kconfig cleanup Felipe Balbi
@ 2011-06-16 11:27 ` Felipe Balbi
  2011-06-29 10:51 ` [PATCH 1/4] cbus: move <plat/cbus.h> to <linux/platform_data/cbus.h> Tony Lindgren
  3 siblings, 0 replies; 5+ messages in thread
From: Felipe Balbi @ 2011-06-16 11:27 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Linux OMAP Mailing List, Felipe Balbi

all drivers should appear under "Device Drivers"

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/Kconfig |    4 ----
 drivers/Kconfig  |    2 ++
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 037ecda..9adc278 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -2031,10 +2031,6 @@ source "net/Kconfig"
 
 source "drivers/Kconfig"
 
-if ARCH_OMAP
-source "drivers/cbus/Kconfig"
-endif
-
 source "fs/Kconfig"
 
 source "arch/arm/Kconfig.debug"
diff --git a/drivers/Kconfig b/drivers/Kconfig
index 3bb154d..e6c60d4 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -2,6 +2,8 @@ menu "Device Drivers"
 
 source "drivers/base/Kconfig"
 
+source "drivers/cbus/Kconfig"
+
 source "drivers/connector/Kconfig"
 
 source "drivers/mtd/Kconfig"
-- 
1.7.6.rc1


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

* Re: [PATCH 1/4] cbus: move <plat/cbus.h> to <linux/platform_data/cbus.h>
  2011-06-16 11:27 [PATCH 1/4] cbus: move <plat/cbus.h> to <linux/platform_data/cbus.h> Felipe Balbi
                   ` (2 preceding siblings ...)
  2011-06-16 11:27 ` [PATCH 4/4] cbus: move cbus under drivers/Kconfig Felipe Balbi
@ 2011-06-29 10:51 ` Tony Lindgren
  3 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2011-06-29 10:51 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Linux OMAP Mailing List

* Felipe Balbi <balbi@ti.com> [110616 04:22]:
> it's a much more sensible location for that
> sort of thing.

Applying all four to cbus branch.

Tony

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

end of thread, other threads:[~2011-06-29 10:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-16 11:27 [PATCH 1/4] cbus: move <plat/cbus.h> to <linux/platform_data/cbus.h> Felipe Balbi
2011-06-16 11:27 ` [PATCH 2/4] cbus: drop unneeded headers Felipe Balbi
2011-06-16 11:27 ` [PATCH 3/4] cbus: Kconfig cleanup Felipe Balbi
2011-06-16 11:27 ` [PATCH 4/4] cbus: move cbus under drivers/Kconfig Felipe Balbi
2011-06-29 10:51 ` [PATCH 1/4] cbus: move <plat/cbus.h> to <linux/platform_data/cbus.h> Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox