Skip to contentSkip to conversation

therm_adt746x: Don't access non-existing register

PATCH In review Jean Delvare 9 participants 17 messages Dec 2, 2009 – Dec 8, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 therm_adt746x: Don't access non-existing register

Michel, Darrick,

Apparently you are using the therm_adt746x driver, so maybe you would be interested in testing and carrying the following patch. I've sent it to Colin Leroy, who is listed as the maintainer for this driver, 1.5 month ago, but did not hear back.

* * * * *

The ADT746x don't have any register at sub-address 0, so better use an existing register for the initial test read.

Cc Colin Leroy <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
---
 drivers/macintosh/therm_adt746x.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/macintosh/therm_adt746x.c +1 -1
@@ -387,7 +387,7 @@ static int probe_thermostat(struct i2c_c
 	i2c_set_clientdata(client, th);
 	th->clt = client;
 
-	rc = read_reg(th, 0);
+	rc = read_reg(th, CONFIG_REG);
 	if (rc < 0) {
 		dev_err(&client->dev, "Thermostat failed to read config!\n");
 		kfree(th);
Signature · 1 line
Jean Delvare
#1 lore raw
Quoted 6 lines · Jean Delvare

Michel, Darrick,

Apparently you are using the therm_adt746x driver, so maybe you would be interested in testing and carrying the following patch. I've sent it to Colin Leroy, who is listed as the maintainer for this driver, 1.5 month ago, but did not hear back.

The driver seems to load and work fine here (on a PowerBook5,8) with the patch, so feel free to add a Tested-By: line for me.

Quoted 27 lines

* * * * *

The ADT746x don't have any register at sub-address 0, so better use an existing register for the initial test read.

Cc Colin Leroy <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
---
 drivers/macintosh/therm_adt746x.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/macintosh/therm_adt746x.c +1 -1
@@ -387,7 +387,7 @@ static int probe_thermostat(struct i2c_c
 	i2c_set_clientdata(client, th);
 	th->clt = client;
 
-	rc = read_reg(th, 0);
+	rc = read_reg(th, CONFIG_REG);
 	if (rc < 0) {
 		dev_err(&client->dev, "Thermostat failed to read config!\n");
 		kfree(th);
Signature · 2 lines
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer
#2 lore raw
Quoted 10 lines · Michel Dänzer
Quoted 6 lines · Jean Delvare

Michel, Darrick,

Apparently you are using the therm_adt746x driver, so maybe you would be interested in testing and carrying the following patch. I've sent it to Colin Leroy, who is listed as the maintainer for this driver, 1.5 month ago, but did not hear back.

The driver seems to load and work fine here (on a PowerBook5,8) with the patch, so feel free to add a Tested-By: line for me.

Will do, thanks.

BTW, I also have i2c-powermac patches queued for 2.6.33 if you want to give them a try:

ftp://ftp.kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/i2c-powermac-*.patch

(Don't look for patch 5/6, it was broken so I discarded it.)

Signature · 1 line
Jean Delvare
Tested-by
#3 lore raw
Quoted 12 lines · Jean Delvare
Quoted 10 lines · Michel Dänzer
Quoted 6 lines · Jean Delvare

Michel, Darrick,

Apparently you are using the therm_adt746x driver, so maybe you would be interested in testing and carrying the following patch. I've sent it to Colin Leroy, who is listed as the maintainer for this driver, 1.5 month ago, but did not hear back.

The driver seems to load and work fine here (on a PowerBook5,8) with the patch, so feel free to add a Tested-By: line for me.

Quoted 8 lines

Will do, thanks.

BTW, I also have i2c-powermac patches queued for 2.6.33 if you want to give them a try:

ftp://ftp.kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/i2c-powermac-*.patch

(Don't look for patch 5/6, it was broken so I discarded it.)

My PowerBook5,8 boots and works fine with all of these applied and CONFIG_I2C_POWERMAC=y, so for all of them:

Signature · 2 lines
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer
#4 lore raw
Quoted 4 lines · Michel Dänzer
Quoted 3 lines · Jean Delvare

BTW, I also have i2c-powermac patches queued for 2.6.33 if you want to give them a try:

Quoted 8 lines
Quoted 3 lines

ftp://ftp.kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/i2c-powermac-*.patch

(Don't look for patch 5/6, it was broken so I discarded it.)

My PowerBook5,8 boots and works fine with all of these applied and CONFIG_I2C_POWERMAC=y, so for all of them:

Very nice, thank you!

Signature · 1 line
Jean Delvare
#6 lore raw
In reply to Jean Delvare
Quoted 6 lines · Jean Delvare

Michel, Darrick,

Apparently you are using the therm_adt746x driver, so maybe you would be interested in testing and carrying the following patch. I've sent it to Colin Leroy, who is listed as the maintainer for this driver, 1.5 month ago, but did not hear back.

I will take it.

Basic rule is: CC to [email protected] ;-)

That way it gets picked up by patchwork and doesn't get lost. Even if it goes low on my priority list it will not be lost and I'll eventually pick it up.

Cheers,
Ben.

Quoted 27 lines

* * * * *

The ADT746x don't have any register at sub-address 0, so better use an existing register for the initial test read.

Cc Colin Leroy <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
---
 drivers/macintosh/therm_adt746x.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/macintosh/therm_adt746x.c +1 -1
@@ -387,7 +387,7 @@ static int probe_thermostat(struct i2c_c
 	i2c_set_clientdata(client, th);
 	th->clt = client;
 
-	rc = read_reg(th, 0);
+	rc = read_reg(th, CONFIG_REG);
 	if (rc < 0) {
 		dev_err(&client->dev, "Thermostat failed to read config!\n");
 		kfree(th);
#7 lore raw

Hi Benjamin,

Quoted 9 lines · Benjamin Herrenschmidt
Quoted 6 lines · Jean Delvare

Michel, Darrick,

Apparently you are using the therm_adt746x driver, so maybe you would be interested in testing and carrying the following patch. I've sent it to Colin Leroy, who is listed as the maintainer for this driver, 1.5 month ago, but did not hear back.

I will take it.

Thanks.

Quoted 5 lines

Basic rule is: CC to [email protected] ;-)

That way it gets picked up by patchwork and doesn't get lost. Even if it goes low on my priority list it will not be lost and I'll eventually pick it up.

I've sent it to [email protected] on October 14th. This is the address which is listed 22 times in MAINTAINERS. If it isn't correct, then please update MAINTAINERS.

Also note that:

$ scripts/get_maintainer.pl --file drivers/macintosh/therm_adt746x.c 
Colin Leroy <[email protected]>
Grant Likely <[email protected]>
[email protected]
[email protected]

This lists Colin Leroy, who apparently doesn't exactly care about the driver, but not linuxppc-dev@*ozlabs.org where you say patches should be sent.

Signature · 1 line
Jean Delvare
#8 lore raw
Quoted 4 lines · Jean Delvare

I've sent it to [email protected] on October 14th. This is the address which is listed 22 times in MAINTAINERS. If it isn't correct, then please update MAINTAINERS.

No it's fine both shoul work. Your patches are there, just waiting for me to pick them up, I was just firing a reminder to the rest of the CC list :-) (and I do remember fwd'ing a couple of your patches to the list, for some reason they didn't make it to patchwork back then, that was a few month ago).

Anyways, I've been stretched thin with all sort of stuff lately, so bear with me if I'm a bit slow at taking or testing stuff, I'm doing my best.

Cheers,
Ben.

maintainer
#15 lore raw
In reply to Jean Delvare

On Fri, 4 Dec 2009 10:34:34 +0100, Jean Delvare wrote:

Hi,

Quoted 9 lines
$ scripts/get_maintainer.pl --file drivers/macintosh/therm_adt746x.c 
Colin Leroy <[email protected]>
Grant Likely <[email protected]>
[email protected]
[email protected]

This lists Colin Leroy, who apparently doesn't exactly care about the driver, but not linuxppc-dev@*ozlabs.org where you say patches should be sent.

I'm sorry, I thought I wasn't listed as a maintainer anymore for this... I don't have the hardware anymore.

Signature · 1 line
Colin
#16 lore raw

Hi Colin,

Quoted 7 lines · Colin Leroy
Quoted 6 lines · Jean Delvare
$ scripts/get_maintainer.pl --file drivers/macintosh/therm_adt746x.c 
Colin Leroy <[email protected]>
Grant Likely <[email protected]>
[email protected]
[email protected]
Quoted 6 lines
Quoted 3 lines

This lists Colin Leroy, who apparently doesn't exactly care about the driver, but not linuxppc-dev@*ozlabs.org where you say patches should be sent.

I'm sorry, I thought I wasn't listed as a maintainer anymore for this... I don't have the hardware anymore.

Care to submit a patch removing the "ADT746X FAN DRIVER" entry from MAINTAINERS then? Unless someone volunteers quickly to take over.

Signature · 1 line
Jean Delvare
#9 lore raw

PATCH 1/1 MAINTAINERS: Add PowerPC patterns

In reply to Benjamin Herrenschmidt
Quoted 11 lines · Benjamin Herrenschmidt
Quoted 3 lines · Jean Delvare

I've sent it to [email protected] on October 14th. This is the address which is listed 22 times in MAINTAINERS. If it isn't correct, then please update MAINTAINERS.

No it's fine both shoul work. Your patches are there, just waiting for me to pick them up, I was just firing a reminder to the rest of the CC list :-) (and I do remember fwd'ing a couple of your patches to the list, for some reason they didn't make it to patchwork back then, that was a few month ago).
Anyways, I've been stretched thin with all sort of stuff lately, so bear with me if I'm a bit slow at taking or testing stuff, I'm doing my best.

Adding patterns to the PowerPC sections of MAINTAINERS is useful.

MAINTAINERS +15 -0
index 4f96ac8..c7f8e5a 100644
@@ -3193,6 +3193,7 @@ LINUX FOR IBM pSERIES (RS/6000)
 M:	Paul Mackerras <[email protected]>
 W:	http://www.ibm.com/linux/ltc/projects/ppc
 S:	Supported
+F:	arch/powerpc/boot/rs6000.h
 
 LINUX FOR POWERPC (32-BIT AND 64-BIT)
 M:	Benjamin Herrenschmidt <[email protected]>
@@ -3201,18 +3202,24 @@ W:	http://www.penguinppc.org/
 L:	[email protected]
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
 S:	Supported
+F:	Documentation/powerpc/
+F:	arch/powerpc/
 
 LINUX FOR POWER MACINTOSH
 M:	Benjamin Herrenschmidt <[email protected]>
 W:	http://www.penguinppc.org/
 L:	[email protected]
 S:	Maintained
+F:	arch/powerpc/platforms/powermac/
+F:	drivers/macintosh/
 
 LINUX FOR POWERPC EMBEDDED MPC5XXX
 M:	Grant Likely <[email protected]>
 L:	[email protected]
 T:	git git://git.secretlab.ca/git/linux-2.6.git
 S:	Maintained
+F:	arch/powerpc/platforms/512x/
+F:	arch/powerpc/platforms/52xx/
 
 LINUX FOR POWERPC EMBEDDED PPC4XX
 M:	Josh Boyer <[email protected]>
@@ -3221,6 +3228,8 @@ W:	http://www.penguinppc.org/
 L:	[email protected]
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
 S:	Maintained
+F:	arch/powerpc/platforms/40x/
+F:	arch/powerpc/platforms/44x/
 
 LINUX FOR POWERPC EMBEDDED XILINX VIRTEX
 M:	Grant Likely <[email protected]>
@@ -3228,6 +3237,8 @@ W:	http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex
 L:	[email protected]
 T:	git git://git.secretlab.ca/git/linux-2.6.git
 S:	Maintained
+F:	arch/powerpc/*/*virtex*
+F:	arch/powerpc/*/*/*virtex*
 
 LINUX FOR POWERPC EMBEDDED PPC8XX
 M:	Vitaly Bordug <[email protected]>
@@ -3241,12 +3252,16 @@ M:	Kumar Gala <[email protected]>
 W:	http://www.penguinppc.org/
 L:	[email protected]
 S:	Maintained
+F:	arch/powerpc/platforms/83xx/
 
 LINUX FOR POWERPC PA SEMI PWRFICIENT
 M:	Olof Johansson <[email protected]>
 W:	http://www.pasemi.com/
 L:	[email protected]
 S:	Supported
+F:	arch/powerpc/platforms/pasemi/
+F:	drivers/*/*pasemi*
+F:	drivers/*/*/*pasemi*
 
 LINUX SECURITY MODULE (LSM) FRAMEWORK
 M:	Chris Wright <[email protected]>
Acked-by on v1 1/1
#10 lore raw

Re: [PATCH] MAINTAINERS: Add PowerPC patterns

MAINTAINERS W: http://www.penguinppc.org/ · line 3232

Quoted 8 lines · Joe Perches

LINUX FOR POWERPC EMBEDDED PPC4XX
M: Josh Boyer <[email protected]>

(quoted diff) +0 -0
@@ -3221,6 +3228,8 @@ W:	http://www.penguinppc.org/

L: [email protected]
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
S: Maintained

MAINTAINERS +2 -0
+F:	arch/powerpc/platforms/40x/
+F:	arch/powerpc/platforms/44x/

This is mostly complete. There are a few files under arch/powerpc/sysdev/, and arch/powerpc/boot/ as well, but I don't think they're entirely necessary.

For the 4xx parts:

josh

Acked-by
#11 lore raw

Re: [PATCH] MAINTAINERS: Add PowerPC patterns

Quoted 13 lines · Josh Boyer

MAINTAINERS W: http://www.penguinppc.org/ · line 3232

Quoted 8 lines · Joe Perches

LINUX FOR POWERPC EMBEDDED PPC4XX
M:    Josh Boyer <[email protected]>

(quoted diff) +0 -0
@@ -3221,6 +3228,8 @@ W:       http://www.penguinppc.org/

L:    [email protected]
T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
S:    Maintained

MAINTAINERS +2 -0
+F:    arch/powerpc/platforms/40x/
+F:    arch/powerpc/platforms/44x/

This is mostly complete.  There are a few files under arch/powerpc/sysdev/, and arch/powerpc/boot/ as well, but I don't think they're entirely necessary.

Quoted 3 lines

For the 4xx parts:

Acked-by on v1 1/1
#12 lore raw

Re: [PATCH] MAINTAINERS: Add PowerPC patterns

In reply to Joe Perches
Quoted 13 lines · Joe Perches
Quoted 11 lines · Benjamin Herrenschmidt
Quoted 3 lines · Jean Delvare

I've sent it to [email protected] on October 14th. This is the address which is listed 22 times in MAINTAINERS. If it isn't correct, then please update MAINTAINERS.

No it's fine both shoul work. Your patches are there, just waiting for me to pick them up, I was just firing a reminder to the rest of the CC list :-) (and I do remember fwd'ing a couple of your patches to the list, for some reason they didn't make it to patchwork back then, that was a few month ago).
Anyways, I've been stretched thin with all sort of stuff lately, so bear with me if I'm a bit slow at taking or testing stuff, I'm doing my best.

Quoted 3 lines

Adding patterns to the PowerPC sections of MAINTAINERS is useful.

There are a few other files under arch/powerpc that's not under platforms that belongs to the pasemi code but it's not a big deal to not include them. This goes most of the way.

-Olof

Tested-by
#5 lore raw
In reply to Michel Dänzer
Quoted 18 lines · Michel Dänzer
Quoted 17 lines · Jean Delvare
Quoted 10 lines · Michel Dänzer
Quoted 6 lines · Jean Delvare

Michel, Darrick,

Apparently you are using the therm_adt746x driver, so maybe you would be interested in testing and carrying the following patch. I've sent it to Colin Leroy, who is listed as the maintainer for this driver, 1.5 month ago, but did not hear back.

The driver seems to load and work fine here (on a PowerBook5,8) with the patch, so feel free to add a Tested-By: line for me.

Will do, thanks.

BTW, I also have i2c-powermac patches queued for 2.6.33 if you want to give them a try:

Quoted 8 lines
Quoted 3 lines

ftp://ftp.kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/i2c-powermac-*.patch

(Don't look for patch 5/6, it was broken so I discarded it.)

My PowerBook5,8 boots and works fine with all of these applied and CONFIG_I2C_POWERMAC=y, so for all of them:

Patch set seems to work with CONFIG_I2C_POWERMAC=y just fine on my PowerBook6,3, so

--D

Acked-by on v1 1/1
#13 lore raw

Re: [PATCH] MAINTAINERS: Add PowerPC patterns

In reply to Joe Perches
Quoted 13 lines · Joe Perches
Quoted 11 lines · Benjamin Herrenschmidt
Quoted 3 lines · Jean Delvare

I've sent it to [email protected] on October 14th. This is the address which is listed 22 times in MAINTAINERS. If it isn't correct, then please update MAINTAINERS.

No it's fine both shoul work. Your patches are there, just waiting for me to pick them up, I was just firing a reminder to the rest of the CC list :-) (and I do remember fwd'ing a couple of your patches to the list, for some reason they didn't make it to patchwork back then, that was a few month ago).
Anyways, I've been stretched thin with all sort of stuff lately, so bear with me if I'm a bit slow at taking or testing stuff, I'm doing my best.

Quoted 3 lines

Adding patterns to the PowerPC sections of MAINTAINERS is useful.

---

Are you going to submit that yourself or do you want me to carry it in the powerpc tree ?

Cheers,
Ben.

Quoted 73 lines
MAINTAINERS +15 -0
index 4f96ac8..c7f8e5a 100644
@@ -3193,6 +3193,7 @@ LINUX FOR IBM pSERIES (RS/6000)
 M:	Paul Mackerras <[email protected]>
 W:	http://www.ibm.com/linux/ltc/projects/ppc
 S:	Supported
+F:	arch/powerpc/boot/rs6000.h
 
 LINUX FOR POWERPC (32-BIT AND 64-BIT)
 M:	Benjamin Herrenschmidt <[email protected]>
@@ -3201,18 +3202,24 @@ W:	http://www.penguinppc.org/
 L:	[email protected]
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
 S:	Supported
+F:	Documentation/powerpc/
+F:	arch/powerpc/
 
 LINUX FOR POWER MACINTOSH
 M:	Benjamin Herrenschmidt <[email protected]>
 W:	http://www.penguinppc.org/
 L:	[email protected]
 S:	Maintained
+F:	arch/powerpc/platforms/powermac/
+F:	drivers/macintosh/
 
 LINUX FOR POWERPC EMBEDDED MPC5XXX
 M:	Grant Likely <[email protected]>
 L:	[email protected]
 T:	git git://git.secretlab.ca/git/linux-2.6.git
 S:	Maintained
+F:	arch/powerpc/platforms/512x/
+F:	arch/powerpc/platforms/52xx/
 
 LINUX FOR POWERPC EMBEDDED PPC4XX
 M:	Josh Boyer <[email protected]>
@@ -3221,6 +3228,8 @@ W:	http://www.penguinppc.org/
 L:	[email protected]
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
 S:	Maintained
+F:	arch/powerpc/platforms/40x/
+F:	arch/powerpc/platforms/44x/
 
 LINUX FOR POWERPC EMBEDDED XILINX VIRTEX
 M:	Grant Likely <[email protected]>
@@ -3228,6 +3237,8 @@ W:	http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex
 L:	[email protected]
 T:	git git://git.secretlab.ca/git/linux-2.6.git
 S:	Maintained
+F:	arch/powerpc/*/*virtex*
+F:	arch/powerpc/*/*/*virtex*
 
 LINUX FOR POWERPC EMBEDDED PPC8XX
 M:	Vitaly Bordug <[email protected]>
@@ -3241,12 +3252,16 @@ M:	Kumar Gala <[email protected]>
 W:	http://www.penguinppc.org/
 L:	[email protected]
 S:	Maintained
+F:	arch/powerpc/platforms/83xx/
 
 LINUX FOR POWERPC PA SEMI PWRFICIENT
 M:	Olof Johansson <[email protected]>
 W:	http://www.pasemi.com/
 L:	[email protected]
 S:	Supported
+F:	arch/powerpc/platforms/pasemi/
+F:	drivers/*/*pasemi*
+F:	drivers/*/*/*pasemi*
 
 LINUX SECURITY MODULE (LSM) FRAMEWORK
 M:	Chris Wright <[email protected]>