summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhil Reid <preid@electromag.com.au>2017-08-24 17:31:01 +0800
committerWolfram Sang <wsa@the-dreams.de>2017-10-28 23:42:26 +0200
commit9b9f2b8bc2ac98d91da714660c53d1cdac999e09 (patch)
tree6d04e6cf60b2b730af973daca623fa524df939b1 /include
parentbb176f67090ca54869fc1262c913aa69d2ede070 (diff)
i2c: i2c-smbus: Use threaded irq for smbalert
Prior to this commit the smbalert_irq was handling in the hard irq context. This change switch to using a thread irq which avoids the need for the work thread. Using threaded irq also removes the need for the edge_triggered flag as the enabling / disabling of the hard irq for level triggered interrupts will be handled by the irq core. Without this change have an irq connected to something like an i2c gpio resulted in a null ptr deferences. Specifically handle_nested_irq calls the threaded irq handler. There are currently 3 in tree drivers affected by this change. i2c-parport driver calls i2c_handle_smbus_alert in a hard irq context. This driver use edge trigger interrupts which skip the enable / disable calls. But it still need to handle the smbus transaction on a thread. So the work thread is kept for this driver. i2c-parport-light & i2c-thunderx-pcidrv provide the irq number in the setup which will result in the thread irq being used. i2c-parport-light is edge trigger so the enable / disable call was skipped as well. i2c-thunderx-pcidrv is getting the edge / level trigger setting from of data and was setting the flag as required. However the irq core should handle this automatically. Signed-off-by: Phil Reid <preid@electromag.com.au> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2c-smbus.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/i2c-smbus.h b/include/linux/i2c-smbus.h
index a1385023a29b..19efbd14e812 100644
--- a/include/linux/i2c-smbus.h
+++ b/include/linux/i2c-smbus.h
@@ -42,7 +42,6 @@
* properly set.
*/
struct i2c_smbus_alert_setup {
- unsigned int alert_edge_triggered:1;
int irq;
};