[MeeGo-Dev][PATCH] Topcliff: Update PCH_GPIO driver to 2.6.35

Previous thread: cfq: oops in __call_for_each_cic by Jeff Layton on Tuesday, August 10, 2010 - 3:40 am. (9 messages)

Next thread: Fan runs full speed after S3 sometimes (regression) by Jiri Slaby on Tuesday, August 10, 2010 - 4:20 am. (8 messages)
From: Masayuki Ohtak
Date: Tuesday, August 10, 2010 - 3:59 am

GPIO driver of Topcliff PCH

Topcliff PCH is the platform controller hub that is going to be used in
Intel's upcoming general embedded platform. All IO peripherals in
Topcliff PCH are actually devices sitting on AMBA bus. 
Topcliff PCH has GPIO I/F. Using this I/F, it is able to access system
devices connected to GPIO.

Signed-off-by: Masayuki Ohtake <masa-korg@dsn.okisemi.com>
---
 drivers/gpio/Kconfig    |    8 +
 drivers/gpio/Makefile   |    1 +
 drivers/gpio/pch_gpio.c |  901 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/gpio/pch_gpio.h |  245 +++++++++++++
 4 files changed, 1155 insertions(+), 0 deletions(-)
 create mode 100644 drivers/gpio/pch_gpio.c
 create mode 100644 drivers/gpio/pch_gpio.h

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 7face91..76701f6 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -113,6 +113,14 @@ config GPIO_SCH
 
 comment "I2C GPIO expanders:"
 
+config PCH_GPIO
+	tristate "PCH GPIO"
+	depends on PCI
+	help
+	  This driver is for PCH GPIO of Topcliff which is an IOH for x86
+	  embedded processor.
+	  This driver can access PCH GPIO device.
+
 config GPIO_MAX7300
 	tristate "Maxim MAX7300 GPIO expander"
 	depends on I2C
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index e53dcff..eda01b6 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -35,3 +35,4 @@ obj-$(CONFIG_GPIO_WM8994)	+= wm8994-gpio.o
 obj-$(CONFIG_GPIO_SCH)		+= sch_gpio.o
 obj-$(CONFIG_GPIO_RDC321X)	+= rdc321x-gpio.o
 obj-$(CONFIG_GPIO_JANZ_TTL)	+= janz-ttl.o
+obj-$(CONFIG_PCH_GPIO)	+= pch_gpio.o
diff --git a/drivers/gpio/pch_gpio.c b/drivers/gpio/pch_gpio.c
new file mode 100644
index 0000000..4cf8fc0
--- /dev/null
+++ b/drivers/gpio/pch_gpio.c
@@ -0,0 +1,901 @@
+/*
+ * Copyright (C) 2010 OKI SEMICONDUCTOR Co., LTD.
+ *
+ * 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 ...
From: Greg KH
Date: Tuesday, August 10, 2010 - 10:08 am

A whole major number for a single driver and a single minor?

Please no, just dynamically allocate it if you really need it.

And with the char node, you are creating new ioctls that duplicate the
gpio layer in the kernel, please don't do that.  Just hook into the
proper gpio subsystem and you will not need any character device at all.

thanks,

greg k-h
--

Previous thread: cfq: oops in __call_for_each_cic by Jeff Layton on Tuesday, August 10, 2010 - 3:40 am. (9 messages)

Next thread: Fan runs full speed after S3 sometimes (regression) by Jiri Slaby on Tuesday, August 10, 2010 - 4:20 am. (8 messages)