aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/windfarm_max6690_sensor.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-04-18 18:16:54 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-04-30 01:37:24 -0400
commitd839ba2ab2f3270fe4f067e082a7233ba06bcf9c (patch)
tree360a0de268a4469a05199609ff311b92b787f310 /drivers/macintosh/windfarm_max6690_sensor.c
parent08fe5bc75f8c43042963dee4f33c9c6cb7791b69 (diff)
powerpc/windfarm: Updates to lm75 and max6690 sensors
This allows those modules to load on PowerMac7,2 PowerMac7,3 and RackMac3,1 and add the sensor name conversion for those machines. This will be used by the corresponding new windfarm modules for those machines. Note that since therm_pm72 is linked first, it will still take priority on those i2c devices if built-in. If using modules it will depend which is loaded first, but you should avoid building therm_pm72 if you are using the new windfarm drivers Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/macintosh/windfarm_max6690_sensor.c')
-rw-r--r--drivers/macintosh/windfarm_max6690_sensor.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/macintosh/windfarm_max6690_sensor.c b/drivers/macintosh/windfarm_max6690_sensor.c
index f4902f4cf8cb..371b058d2f7d 100644
--- a/drivers/macintosh/windfarm_max6690_sensor.c
+++ b/drivers/macintosh/windfarm_max6690_sensor.c
@@ -74,7 +74,11 @@ static int wf_max6690_probe(struct i2c_client *client,
74 return -ENXIO; 74 return -ENXIO;
75 } 75 }
76 76
77 if (!strcmp(loc, "BACKSIDE")) 77 /*
78 * We only expose the external temperature register for
79 * now as this is all we need for our control loops
80 */
81 if (!strcmp(loc, "BACKSIDE") || !strcmp(loc, "SYS CTRLR AMBIENT"))
78 name = "backside-temp"; 82 name = "backside-temp";
79 else if (!strcmp(loc, "NB Ambient")) 83 else if (!strcmp(loc, "NB Ambient"))
80 name = "north-bridge-temp"; 84 name = "north-bridge-temp";
@@ -128,11 +132,6 @@ static struct i2c_driver wf_max6690_driver = {
128 132
129static int __init wf_max6690_sensor_init(void) 133static int __init wf_max6690_sensor_init(void)
130{ 134{
131 /* Don't register on old machines that use therm_pm72 for now */
132 if (of_machine_is_compatible("PowerMac7,2") ||
133 of_machine_is_compatible("PowerMac7,3") ||
134 of_machine_is_compatible("RackMac3,1"))
135 return -ENODEV;
136 return i2c_add_driver(&wf_max6690_driver); 135 return i2c_add_driver(&wf_max6690_driver);
137} 136}
138 137