2004-03-11 14:43:54

by Colin Leroy

[permalink] [raw]
Subject: [PATCH] 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;
--
Colin
This message represents the official view of the voices
in my head.


Attachments:
746x.patch (31.91 kB)

2004-03-11 22:50:01

by Benjamin Herrenschmidt

[permalink] [raw]
Subject: Re: [PATCH] therm_adt7467 update

On Fri, 2004-03-12 at 01:35, Colin Leroy wrote:
> 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:

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.


2004-03-13 15:34:55

by Colin Leroy

[permalink] [raw]
Subject: Re: [PATCH] therm_adt7467 update

On 12 Mar 2004 at 09h03, Benjamin Herrenschmidt wrote:

Hi,

> > 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:
>
> 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 :-)

--
Colin


Attachments:
746x.2.patch (1.78 kB)

2004-03-15 23:57:34

by Benjamin Herrenschmidt

[permalink] [raw]
Subject: Re: [PATCH] therm_adt7467 update


> 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 :-)

Can you send that directly to Linus/Andrew ? I'm quite busy at
the moment.

Ben.