Re: [PATCH v2 2/2] hwmon: (atxp1) Drop auto-detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/29/2015 01:27 PM, Guenter Roeck wrote:
Auto-detection for this chip is highly unreliable, and one of its
I2C addresses can also be used by EEPROMs, increasing the risk for
false positives even more. Drop auto-detection entirely to remove
the risk.

Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
---
v2: Add text describing the supported I2C addresses, and that the driver
     must be instantiated explicitly.
     Validate supported vrm values in probe function.

[ ... ]

-
  static int atxp1_probe(struct i2c_client *client,
  		       const struct i2c_device_id *id)
  {
@@ -309,6 +269,11 @@ static int atxp1_probe(struct i2c_client *client,

  	/* Get VRM */
  	data->vrm = vid_which_vrm();
+	if (data->vrm != 90 && data->vrm != 91) {
+		 dev_err(&adapter->dev, "atxp1: Not supporting VRM %d.%d\n",
+			 data->vrm / 10, data->vrm % 10);

s/&adapter->//

Compile testing is always a good idea.

Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux