gpio: sx150x: Add Semtech I2C sx150x gpio expander driver.
Subsystems (3)
PATCH v2 1/1 gpio: sx150x: Add Semtech I2C sx150x gpio expander driver.
Add support for Semtech SX150-series I2C GPIO expanders. Compatible models include:
8 bits: sx1508q
16 bits: sx1509q
--- drivers/gpio/Kconfig | 11 + drivers/gpio/Makefile | 1 + drivers/gpio/sx150x.c | 646 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/i2c/sx150x.h | 78 ++++++ 4 files changed, 736 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/sx150x.c create mode 100644 include/linux/i2c/sx150x.h
drivers/gpio/Kconfig +11 -0
@@ -195,6 +195,17 @@ config GPIO_PCF857X This driver provides an in-kernel interface to those GPIOs using platform-neutral GPIO calls. +config GPIO_SX150X + tristate "Semtech SX150x I2C GPIO expander" + depends on I2C + default n + help + Say yes here to provide support for Semtech SX150-series I2C + GPIO expanders. Compatible models include: + + 8 bits: sx1508q + 16 bits: sx1509q + config GPIO_TC35892 bool "TC35892 GPIOs" depends on MFD_TC35892
drivers/gpio/Makefile +1 -0
@@ -31,3 +31,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_GPIO_SX150X) += sx150x.o
drivers/gpio/sx150x.c new file +646 -0
646 lines not on this page · raw message
include/linux/i2c/sx150x.h new file +78 -0
78 lines not on this page · raw message
Signature · 5 lines
1.7.0.4 -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
A message that is not in the archive (sent off-list or not yet received): 1278617834-14970-1-git-send-email-gbean-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
Trilok Soni
Reviewed-byQuoted 7 lines · Gregory Bean
Add support for Semtech SX150-series I2C GPIO expanders. Compatible models include:
8 bits: sx1508q
16 bits: sx1509qSigned-off-by Gregory Bean <[email protected]>
Quoted 9 lines
--- drivers/gpio/Kconfig | 11 + drivers/gpio/Makefile | 1 + drivers/gpio/sx150x.c | 646 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/i2c/sx150x.h | 78 ++++++ 4 files changed, 736 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/sx150x.c create mode 100644 include/linux/i2c/sx150x.h
Looks good to me.
---Trilok Soni
Signature · 2 lines
Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Hi Jean, Andrew,
Quoted 18 lines · Trilok Soni
Quoted 7 lines · Gregory Bean
Add support for Semtech SX150-series I2C GPIO expanders. Compatible models include:
8 bits: sx1508q
16 bits: sx1509qSigned-off-by Gregory Bean <[email protected]>Quoted 9 lines
--- drivers/gpio/Kconfig | 11 + drivers/gpio/Makefile | 1 + drivers/gpio/sx150x.c | 646 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/i2c/sx150x.h | 78 ++++++ 4 files changed, 736 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/sx150x.c create mode 100644 include/linux/i2c/sx150x.h
Quoted 4 lines
Looks good to me.
Reviewed-by Trilok Soni <[email protected]>
Any review comments on this new version of the driver?
Signature · 2 lines
Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Quoted 21 lines · On Mon, 12 Jul 2010 14:25:24 +0530 Trilok Soni…
Hi Jean, Andrew,
Quoted 18 lines · Trilok Soni
Quoted 16 lines · Gregory Bean
Add support for Semtech SX150-series I2C GPIO expanders. Compatible models include:
8 bits: sx1508q
16 bits: sx1509qSigned-off-by Gregory Bean <[email protected]>--- drivers/gpio/Kconfig | 11 + drivers/gpio/Makefile | 1 + drivers/gpio/sx150x.c | 646 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/i2c/sx150x.h | 78 ++++++ 4 files changed, 736 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/sx150x.c create mode 100644 include/linux/i2c/sx150x.h
Quoted 6 lines
Quoted 4 lines
Looks good to me.
Reviewed-by Trilok Soni <[email protected]>Any review comments on this new version of the driver?
It looked OK to me. You should have received an email when I merged it into my tree?
Quoted 1 line · On Thu, 8 Jul 2010 12:37:14 -0700 Gregory Bean…
Add support for Semtech SX150-series I2C GPIO expanders.
It doesn't work when compiled as a module:
ERROR: "irq_to_desc" [drivers/gpio/sx150x.ko] undefined!
ERROR: "handle_edge_irq" [drivers/gpio/sx150x.ko] undefined!
ERROR: "set_irq_chip_and_handler" [drivers/gpio/sx150x.ko] undefined!
ERROR: "set_irq_noprobe" [drivers/gpio/sx150x.ko] undefined!
I think there's a reason why some of those things aren't exported to modules. Perhaps Thomas can remind us?
Meanwhile I'll do s/tristate/bool/.
A message that is not in the archive (sent off-list or not yet received): 20100719163142.16cab271.akpm-de/[email protected]
Quoted 12 lines · On Mon, 19 Jul 2010 16:31:42 -0700 Andrew Morton…
Quoted 1 line · On Thu, 8 Jul 2010 12:37:14 -0700 Gregory Bean…
Add support for Semtech SX150-series I2C GPIO expanders.
It doesn't work when compiled as a module:
ERROR: "
irq_to_desc" [drivers/gpio/sx150x.ko] undefined!
ERROR: "handle_edge_irq" [drivers/gpio/sx150x.ko] undefined!
ERROR: "set_irq_chip_and_handler" [drivers/gpio/sx150x.ko] undefined!
ERROR: "set_irq_noprobe" [drivers/gpio/sx150x.ko] undefined!
Quoted 4 lines
I think there's a reason why some of those things aren't exported to modules. Perhaps Thomas can remind us?
Meanwhile I'll do s/tristate/bool/.
Which of course didn't work because i2c is a module.
drivers/built-in.o: In function `sx150x_i2c_read':
sx150x.c:(.text+0x5362): undefined reference to i2c_smbus_read_byte_data' drivers/built-in.o: In function sx150x_i2c_write':
sx150x.c:(.text+0x53e4): undefined reference to i2c_smbus_write_byte_data' drivers/built-in.o: In function sx150x_init':
sx150x.c:(.init.text+0x418): undefined reference to i2c_register_driver' drivers/built-in.o: In function sx150x_probe':
sx150x.c:(.devinit.text+0xda1): undefined reference to i2c_smbus_write_word_data' drivers/built-in.o: In function sx150x_exit':
sx150x.c:(.exit.text+0x7c): undefined reference to `i2c_del_driver'
A message that is not in the archive (sent off-list or not yet received): 20100719165038.a308b019.akpm-de/[email protected]
Quoted 5 lines · Andrew Morton
Quoted 1 line · Andrew Morton
Meanwhile I'll do s/tristate/bool/.
Which of course didn't work because i2c is a module.
The standard fix all the other affected drivers are doing is
depends on I2C=y
Quoted 7 lines · Andrew Morton
Quoted 1 line · On Thu, 8 Jul 2010 12:37:14 -0700 Gregory Bean…
Add support for Semtech SX150-series I2C GPIO expanders.
It doesn't work when compiled as a module:
Quoted 7 lines
ERROR: "
irq_to_desc" [drivers/gpio/sx150x.ko] undefined!
ERROR: "handle_edge_irq" [drivers/gpio/sx150x.ko] undefined!
ERROR: "set_irq_chip_and_handler" [drivers/gpio/sx150x.ko] undefined!
ERROR: "set_irq_noprobe" [drivers/gpio/sx150x.ko] undefined!I think there's a reason why some of those things aren't exported to modules. Perhaps Thomas can remind us?
There was no requirement to do so, it came up with those I2C irq controllers lately. I don't have a strong feeling, but if we can avoid the export I'd feel more comfortable.
Thanks,
tglx