aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitaly Wool <vitalywool@gmail.com>2007-01-04 07:07:03 -0500
committerJean Delvare <khali@arrakis.delvare>2007-01-04 07:07:03 -0500
commit6c566fb7b3cda741dd6ed60c7d6aae0e17c9c8fe (patch)
tree87e7c5983c32e1c69c5e447004f3370a329acc37
parenta7ec3f5289681e9d63b65db5f56857f998812b4b (diff)
i2c-pnx: Fix interrupt handler, get rid of EARLY config option
This fixes two issues raised by David Brownell on the i2c list: << Someone needs to update i2c-pnx.c to handle the IRQ handler doesn't expect pt_regs (gone now for a while), and so it doesn't try to reference "mudule_init()" if I2C isn't initialized "early". For that matter, to get rid of that _option_ to initialize then, and always init that driver with subsystem_init() ... it's common with embedded systems to need I2C access to tweak a GPIO expander or do some other work when bringing up drivers, that's not specific to USB stacks. >> Signed-off-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
-rw-r--r--drivers/i2c/busses/Kconfig9
-rw-r--r--drivers/i2c/busses/i2c-pnx.c7
2 files changed, 1 insertions, 15 deletions
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index e1989f3a2684..9367c4cfe936 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -564,13 +564,4 @@ config I2C_PNX
564 This driver can also be built as a module. If so, the module 564 This driver can also be built as a module. If so, the module
565 will be called i2c-pnx. 565 will be called i2c-pnx.
566 566
567config I2C_PNX_EARLY
568 bool "Early initialization for I2C on PNXxxxx"
569 depends on I2C_PNX=y
570 help
571 Under certain circumstances one may need to make sure I2C on PNXxxxx
572 is initialized earlier than some other driver that depends on it
573 (for instance, that might be USB in case of PNX4008). With this
574 option turned on you can guarantee that.
575
576endmenu 567endmenu
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index de0bca77e926..17376feb1acc 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -305,8 +305,7 @@ static int i2c_pnx_master_rcv(struct i2c_adapter *adap)
305 return 0; 305 return 0;
306} 306}
307 307
308static irqreturn_t 308static irqreturn_t i2c_pnx_interrupt(int irq, void *dev_id)
309i2c_pnx_interrupt(int irq, void *dev_id, struct pt_regs *regs)
310{ 309{
311 u32 stat, ctl; 310 u32 stat, ctl;
312 struct i2c_adapter *adap = dev_id; 311 struct i2c_adapter *adap = dev_id;
@@ -699,10 +698,6 @@ MODULE_AUTHOR("Vitaly Wool, Dennis Kovalev <source@mvista.com>");
699MODULE_DESCRIPTION("I2C driver for Philips IP3204-based I2C busses"); 698MODULE_DESCRIPTION("I2C driver for Philips IP3204-based I2C busses");
700MODULE_LICENSE("GPL"); 699MODULE_LICENSE("GPL");
701 700
702#ifdef CONFIG_I2C_PNX_EARLY
703/* We need to make sure I2C is initialized before USB */ 701/* We need to make sure I2C is initialized before USB */
704subsys_initcall(i2c_adap_pnx_init); 702subsys_initcall(i2c_adap_pnx_init);
705#else
706mudule_init(i2c_adap_pnx_init);
707#endif
708module_exit(i2c_adap_pnx_exit); 703module_exit(i2c_adap_pnx_exit);