therm_adt7467 update
PATCH 1/1 therm_adt7467 update
Hi,
the fan driver I wrote for adt746x looks like it only handles the adt7467 chip found in iBooks G4; but it also handles the adt7460 chip found in the Powerbook G4 Alu.
Here's a patch that renames the file to therm_adt746x.c and updates Kconfig and Makefile. I also changed a few lines in therm_adt746x.c after renaming it (the patch contains these), the diff is here for clarity:
--- drivers/macintosh/therm_adt7467.c 2004-03-11 03:55:37.000000000 +0100 +++ drivers/macintosh.new/therm_adt746x.c 2004-03-11 15:21:00.000000000 +0100
@@ -49,7 +49,7 @@
static int fan_speed = -1;
MODULE_AUTHOR("Colin Leroy <[email protected]>");
-MODULE_DESCRIPTION("Driver for ADT7467 thermostat in iBook G4"); +MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and Powerbook G4 Alu");
MODULE_LICENSE("GPL");
MODULE_PARM(limit_adjust,"i");
@@ -161,7 +161,7 @@
}
static struct i2c_driver thermostat_driver = {
- .name ="Apple Thermostat ADT7467",
+ .name ="Apple Thermostat ADT746x",
.id =0xDEAD7467,
.flags =I2C_DF_NOTIFY,
.attach_adapter =&attach_thermostat,
@@ -494,9 +494,6 @@
struct device_node* np;
u32 *prop;
- /* Currently, we only deal with the iBook G4, we will support
- * all "2003" powerbooks later on
- */
np = of_find_node_by_name(NULL, "fan");
if (!np)
return -ENODEV;
Signature · 3 lines
Colin This message represents the official view of the voices in my head.
macintosh.new/Kconfig renamed from macintosh/Kconfig +1 -1
@@ -174,7 +174,7 @@ This driver provides some thermostat and fan control for the desktop G4 "Windtunnel" -config THERM_ADT7467 +config THERM_ADT746X tristate "Support for thermal mgmnt on laptops with ADT 7467 chipset" depends on I2C && I2C_KEYWEST && PPC_PMAC && !PPC_PMAC64 help
macintosh.new/Makefile renamed from macintosh/Makefile +1 -1
@@ -25,4 +25,4 @@ obj-$(CONFIG_THERM_PM72) += therm_pm72.o obj-$(CONFIG_THERM_WINDTUNNEL) += therm_windtunnel.o -obj-$(CONFIG_THERM_ADT7467) += therm_adt7467.o +obj-$(CONFIG_THERM_ADT746X) += therm_adt746x.o
macintosh.new/therm_adt7467.c renamed from macintosh/therm_adt7467.c +0 -562
562 lines not on this page · raw message
macintosh.new/therm_adt746x.c renamed from macintosh/therm_adt746x.c +559 -0
559 lines not on this page · raw message
Quoted 8 lines · Colin Leroy
Hi,
the fan driver I wrote for adt746x looks like it only handles the adt7467 chip found in iBooks G4; but it also handles the adt7460 chip found in the Powerbook G4 Alu.
Here's a patch that renames the file totherm_adt746x.cand updatesKconfigandMakefile. I also changed a few lines intherm_adt746x.cafter renaming it (the patch contains these), the diff is here for clarity:
Ok, I'll look into getting that upstream. Renaming things is a bit nasty (makes big patch for little changes) unless Linus does directly a "bk mv" in his tree..
Ben.
On 12 Mar 2004 at 09h03, Benjamin Herrenschmidt wrote:
Hi,
Quoted 7 lines
Quoted 3 lines
Here's a patch that renames the file to
therm_adt746x.cand updatesKconfigandMakefile. I also changed a few lines intherm_adt746x.cafter renaming it (the patch contains these), the diff is here for clarity:Ok, I'll look into getting that upstream. Renaming things is a bit nasty (makes big patch for little changes) unless Linus does directly a "bk mv" in his tree..
Ok, that's what I thought.
Would it help if I sent a simpler patch with the modifications to therm_adt7467.c, Kconfig and Makefile, and specify to bk mv the file after applying the patch ?
Just in case, here it is.
Don't forget to rename drivers/macintosh/therm_adt7467.c to therm_adt746x.c after :-)
Signature · 1 line
Colin
macintosh.new/Kconfig renamed from macintosh/Kconfig +2 -2
@@ -174,8 +174,8 @@ This driver provides some thermostat and fan control for the desktop G4 "Windtunnel" -config THERM_ADT7467 - tristate "Support for thermal mgmnt on laptops with ADT 7467 chipset" +config THERM_ADT746X + tristate "Support for thermal mgmnt on laptops with ADT 746x chipset" depends on I2C && I2C_KEYWEST && PPC_PMAC && !PPC_PMAC64 help This driver provides some thermostat and fan control for the
macintosh.new/Makefile renamed from macintosh/Makefile +1 -1
@@ -25,4 +25,4 @@ obj-$(CONFIG_THERM_PM72) += therm_pm72.o obj-$(CONFIG_THERM_WINDTUNNEL) += therm_windtunnel.o -obj-$(CONFIG_THERM_ADT7467) += therm_adt7467.o +obj-$(CONFIG_THERM_ADT746X) += therm_adt746x.o
macintosh.new/therm_adt7467.c renamed from macintosh/therm_adt7467.c +2 -2
@@ -49,7 +49,7 @@static int fan_speed =-1 ;MODULE_AUTHOR ("Colin Leroy <[email protected]>" ); -MODULE_DESCRIPTION ("Driver for ADT7467 thermostat in iBook G4" ); +MODULE_DESCRIPTION ("Driver for ADT746x thermostat in iBook G4 and Powerbook G4 Alu" );MODULE_LICENSE ("GPL" );MODULE_PARM (limit_adjust,"i" );
@@ -161,7 +161,7 @@ }static struct i2c_driver thermostat_driver = { - .name ="Apple Thermostat ADT7467" , + .name ="Apple Thermostat ADT746x" , .id =0xDEAD7467 , .flags =I2C_DF_NOTIFY , .attach_adapter =&attach_thermostat,
Quoted 9 lines
Ok, that's what I thought.
Would it help if I sent a simpler patch with the modifications totherm_adt7467.c,KconfigandMakefile, and specify tobk mvthe file after applying the patch ?Just in case, here it is.
Don't forget to renamedrivers/macintosh/therm_adt7467.ctotherm_adt746x.cafter :-)
Can you send that directly to Linus/Andrew ? I'm quite busy at the moment.
Ben.