Re: [PATCH v7] hwmon: added kernel module for FTS BMC chip "Teutates"

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

 



On 07/18/2016 08:37 AM, Thilo Cestonaro wrote:
Am 18.07.2016 um 16:41 schrieb Guenter Roeck:
On 07/18/2016 04:51 AM, Thilo Cestonaro wrote:
From: Thilo Cestonaro <thilo@xxxxxxxxxx>

This driver implements support for the FTS BMC Chip "Teutates".

Signed-off-by: Thilo Cestonaro <thilo@xxxxxxxxxx>
---

[ ... ]

+
+/*****************************************************************************/

+/* Module initialization / remove functions                     */
+/*****************************************************************************/

+static int fts_remove(struct i2c_client *client)
+{
+    struct fts_data *data = dev_get_drvdata(&client->dev);
+
+    watchdog_unregister_device(&data->wdd);
+    return 0;
+}
+
+static int fts_probe(struct i2c_client *client, const struct
i2c_device_id *id)
+{
+    u8 revision;
+    struct fts_data *data;
+    int err;
+    s8 deviceid;

One (hopefully) last question: Effectively this means that any device
ID >=0x80
will be identified as error. Is this on purpose ? It is quite unusual.
The driver looks especially for 0x11, which means 0x10 - Baseboard
Management Controller and 0x01 Teutates. (spec. page 8, Page 0 Offset 0)
So anything not 1Xh will be an error ENODEV and then the switch filters
for X1h and all not 01h will be an error ENODEV, as this driver isn't
written for anything different to 0x11.
So "s8" is ok here.


Hmmm ... I don't really see the point of using s8 instead of int,
but I'll accept it.

Applied to -next.

Guenter

--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux