aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pcf8591.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2010-10-28 14:31:50 -0400
committerJean Delvare <khali@endymion.delvare>2010-10-28 14:31:50 -0400
commit6dfee85397a47063291fe199eaf950bee7944454 (patch)
treea0938da1f748f16621238e047a93f052fbd9adb2 /drivers/hwmon/pcf8591.c
parent4275fcd65d3b4a504b7779e532c81a927afd28c0 (diff)
hwmon: (pcf8591) Don't attempt to detect devices
The PCF8591 can't be detected, don't even try. There are plenty of other means to instantiate i2c devices these days. Signed-off-by: Jean Delvare <khali@linux-fr.org> Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'drivers/hwmon/pcf8591.c')
-rw-r--r--drivers/hwmon/pcf8591.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/hwmon/pcf8591.c b/drivers/hwmon/pcf8591.c
index d7df0e6c1ef4..dc7259d69812 100644
--- a/drivers/hwmon/pcf8591.c
+++ b/drivers/hwmon/pcf8591.c
@@ -26,10 +26,6 @@
26#include <linux/err.h> 26#include <linux/err.h>
27#include <linux/hwmon.h> 27#include <linux/hwmon.h>
28 28
29/* Addresses to scan */
30static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
31 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
32
33/* Insmod parameters */ 29/* Insmod parameters */
34 30
35static int input_mode; 31static int input_mode;
@@ -170,24 +166,6 @@ static const struct attribute_group pcf8591_attr_group_opt = {
170 * Real code 166 * Real code
171 */ 167 */
172 168
173/* Return 0 if detection is successful, -ENODEV otherwise */
174static int pcf8591_detect(struct i2c_client *client,
175 struct i2c_board_info *info)
176{
177 struct i2c_adapter *adapter = client->adapter;
178
179 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE
180 | I2C_FUNC_SMBUS_WRITE_BYTE_DATA))
181 return -ENODEV;
182
183 /* Now, we would do the remaining detection. But the PCF8591 is plainly
184 impossible to detect! Stupid chip. */
185
186 strlcpy(info->type, "pcf8591", I2C_NAME_SIZE);
187
188 return 0;
189}
190
191static int pcf8591_probe(struct i2c_client *client, 169static int pcf8591_probe(struct i2c_client *client,
192 const struct i2c_device_id *id) 170 const struct i2c_device_id *id)
193{ 171{
@@ -307,10 +285,6 @@ static struct i2c_driver pcf8591_driver = {
307 .probe = pcf8591_probe, 285 .probe = pcf8591_probe,
308 .remove = pcf8591_remove, 286 .remove = pcf8591_remove,
309 .id_table = pcf8591_id, 287 .id_table = pcf8591_id,
310
311 .class = I2C_CLASS_HWMON, /* Nearest choice */
312 .detect = pcf8591_detect,
313 .address_list = normal_i2c,
314}; 288};
315 289
316static int __init pcf8591_init(void) 290static int __init pcf8591_init(void)