[aadk-commits] dbailey: uClinux/trunk r145 - /uClinux/trunk/uClinux-dist/linux-2.6.x/drivers...

aadk-commits at lists.digium.com aadk-commits at lists.digium.com
Tue Feb 6 08:41:15 MST 2007


Author: dbailey
Date: Tue Feb  6 09:41:14 2007
New Revision: 145

URL: http://svn.digium.com/view/aadk?view=rev&rev=145
Log:
Added a define that sets the twi I2C adapter to accommodate hwmon device drivers.

Modified:
    uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/Kconfig
    uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-bfin-twi.c

Modified: uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/Kconfig
URL: http://svn.digium.com/view/aadk/uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/Kconfig?view=diff&rev=145&r1=144&r2=145
==============================================================================
--- uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/Kconfig (original)
+++ uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/Kconfig Tue Feb  6 09:41:14 2007
@@ -51,6 +51,15 @@
 	help
 		The unit of the TWI clock is kilo HZ. Please divide the clock 
 		by 1024 if you count it in HZ. The value should be less than 400.
+
+config TWI_HWMON
+	bool "Blackfin TWI HWMON Class association"
+	depends on I2C_BFIN_TWI
+	default 50
+	help
+		Associates the Blackfin TWI with the HWMON driver by setting the 
+		TWI class to I2C_CLASS_HWMON.  hwmon device require this class type in
+		their i2c adapter
 
 config I2C_ALI1535
 	tristate "ALI 1535"

Modified: uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-bfin-twi.c
URL: http://svn.digium.com/view/aadk/uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-bfin-twi.c?view=diff&rev=145&r1=144&r2=145
==============================================================================
--- uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-bfin-twi.c (original)
+++ uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/i2c/busses/i2c-bfin-twi.c Tue Feb  6 09:41:14 2007
@@ -512,7 +512,9 @@
 	p_adap->algo_data = &twi_iface;
 	p_adap->client_register = NULL;
 	p_adap->client_unregister = NULL;
-
+#ifdef CONFIG_TWI_HWMON
+	p_adap->class |=  I2C_CLASS_HWMON;  
+#endif			
 	rc = request_irq(twi_iface.irq, bfin_twi_interrupt_entry, SA_INTERRUPT, "bfin-twi-i2c", &twi_iface);
 	if (rc) {
 		printk(KERN_ERR "i2c-bfin-twi: can't get IRQ %d !\n", twi_iface.irq);



More information about the aadk-commits mailing list