diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2016-06-09 16:53:47 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-06-17 12:41:25 +0200 |
commit | b4f210541fc319bd643ad9a4fdbfe2ce31be6cfc (patch) | |
tree | 2357245596d833d1de83be817a08bbd2ba410966 /drivers/hwmon/lm90.c | |
parent | 33c77abcf4aa5e9679f702a2f979d44a470f6e6e (diff) | |
download | talos-obmc-linux-b4f210541fc319bd643ad9a4fdbfe2ce31be6cfc.tar.gz talos-obmc-linux-b4f210541fc319bd643ad9a4fdbfe2ce31be6cfc.zip |
i2c: add a protocol parameter to the alert callback
.alert() is meant to be generic, but there is currently no way
for the device driver to know which protocol generated the alert.
Add a parameter in .alert() to help the device driver to understand
what is given in data.
This patch is required to have the support of SMBus Host Notify protocol
through .alert().
Tested-by: Andrew Duggan <aduggan@synaptics.com>
For hwmon:
Acked-by: Guenter Roeck <linux@roeck-us.net>
For IPMI:
Acked-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/hwmon/lm90.c')
-rw-r--r-- | drivers/hwmon/lm90.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index e30a5939dc0d..5b62c57e8bfc 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c @@ -1624,10 +1624,14 @@ static int lm90_remove(struct i2c_client *client) return 0; } -static void lm90_alert(struct i2c_client *client, unsigned int flag) +static void lm90_alert(struct i2c_client *client, enum i2c_alert_protocol type, + unsigned int flag) { u16 alarms; + if (type != I2C_PROTOCOL_SMBUS_ALERT) + return; + if (lm90_is_tripped(client, &alarms)) { /* * Disable ALERT# output, because these chips don't implement |