aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-08-11 16:53:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-08-26 16:05:12 -0400
commit4801bc25f37a969ea773c24d12fd4738541848a1 (patch)
tree95e9c36770d255dbf5f78515abda64ca91d0a1f3
parentf834c755423332a6ff4397fae754029a6a7a8249 (diff)
[PATCH] i2c: tps65010 build fixes
The tps65010.c driver in the main tree never got updated with build fixes since the last batch of I2C driver changes; and the genirq trigger flags were updated wierdly too. This also includes a minor tweak to reduce the frequency used to poll for unplug-the-AC-power on the TPS chips that don't provide relevant IRQs. It _would_ be nice to sense whether there's even a battery, but that'd normally be an HDQ/1-wire interface to a smart battery, and such APIs aren't standardized. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/i2c/chips/tps65010.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/i2c/chips/tps65010.c b/drivers/i2c/chips/tps65010.c
index e7e27049fbfa..0be6fd6a267d 100644
--- a/drivers/i2c/chips/tps65010.c
+++ b/drivers/i2c/chips/tps65010.c
@@ -43,13 +43,12 @@
43/*-------------------------------------------------------------------------*/ 43/*-------------------------------------------------------------------------*/
44 44
45#define DRIVER_VERSION "2 May 2005" 45#define DRIVER_VERSION "2 May 2005"
46#define DRIVER_NAME (tps65010_driver.name) 46#define DRIVER_NAME (tps65010_driver.driver.name)
47 47
48MODULE_DESCRIPTION("TPS6501x Power Management Driver"); 48MODULE_DESCRIPTION("TPS6501x Power Management Driver");
49MODULE_LICENSE("GPL"); 49MODULE_LICENSE("GPL");
50 50
51static unsigned short normal_i2c[] = { 0x48, /* 0x49, */ I2C_CLIENT_END }; 51static unsigned short normal_i2c[] = { 0x48, /* 0x49, */ I2C_CLIENT_END };
52static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
53 52
54I2C_CLIENT_INSMOD; 53I2C_CLIENT_INSMOD;
55 54
@@ -100,7 +99,7 @@ struct tps65010 {
100 /* not currently tracking GPIO state */ 99 /* not currently tracking GPIO state */
101}; 100};
102 101
103#define POWER_POLL_DELAY msecs_to_jiffies(800) 102#define POWER_POLL_DELAY msecs_to_jiffies(5000)
104 103
105/*-------------------------------------------------------------------------*/ 104/*-------------------------------------------------------------------------*/
106 105
@@ -520,8 +519,11 @@ tps65010_probe(struct i2c_adapter *bus, int address, int kind)
520 goto fail1; 519 goto fail1;
521 } 520 }
522 521
522 /* the IRQ is active low, but many gpio lines can't support that
523 * so this driver can use falling-edge triggers instead.
524 */
525 irqflags = IRQF_SAMPLE_RANDOM;
523#ifdef CONFIG_ARM 526#ifdef CONFIG_ARM
524 irqflags = IRQF_SAMPLE_RANDOM | IRQF_TRIGGER_LOW;
525 if (machine_is_omap_h2()) { 527 if (machine_is_omap_h2()) {
526 tps->model = TPS65010; 528 tps->model = TPS65010;
527 omap_cfg_reg(W4_GPIO58); 529 omap_cfg_reg(W4_GPIO58);
@@ -543,8 +545,6 @@ tps65010_probe(struct i2c_adapter *bus, int address, int kind)
543 545
544 // FIXME set up this board's IRQ ... 546 // FIXME set up this board's IRQ ...
545 } 547 }
546#else
547 irqflags = IRQF_SAMPLE_RANDOM;
548#endif 548#endif
549 549
550 if (tps->irq > 0) { 550 if (tps->irq > 0) {