@@ -60,3 +60,12 @@ static inline void i2c_acpi_remove_space_handler(struct i2c_adapter *adapter) {
static inline void of_i2c_register_devices(struct i2c_adapter *adap) { }
#endif
extern struct notifier_block i2c_of_notifier;
+
+#if IS_ENABLED(CONFIG_I2C_SMBUS) && IS_ENABLED(CONFIG_OF)
+int of_i2c_setup_smbus_alert(struct i2c_adapter *adap);
+#else
+static inline int of_i2c_setup_smbus_alert(struct i2c_adapter *adap)
+{
+ return 0;
+}
+#endif
@@ -25,6 +25,8 @@
#include <linux/slab.h>
#include <linux/workqueue.h>
+#include "i2c-core.h"
+
struct i2c_smbus_alert {
struct work_struct alert;
struct i2c_client *ara; /* Alert response address */
@@ -123,7 +125,6 @@ static void smbalert_work(struct work_struct *work)
alert = container_of(work, struct i2c_smbus_alert, alert);
smbus_alert(0, alert);
-
}
/* Setup SMBALERT# infrastructure */
@@ -26,7 +26,6 @@
#include <linux/spinlock.h>
#include <linux/workqueue.h>
-
/**
* i2c_smbus_alert_setup - platform data for the smbus_alert i2c client
* @alert_edge_triggered: whether the alert interrupt is edge (1) or level (0)
@@ -49,13 +48,4 @@ struct i2c_client *i2c_setup_smbus_alert(struct i2c_adapter *adapter,
struct i2c_smbus_alert_setup *setup);
int i2c_handle_smbus_alert(struct i2c_client *ara);
-#if IS_ENABLED(CONFIG_I2C_SMBUS) && IS_ENABLED(CONFIG_OF)
-int of_i2c_setup_smbus_alert(struct i2c_adapter *adap);
-#else
-static inline int of_i2c_setup_smbus_alert(struct i2c_adapter *adap)
-{
- return 0;
-}
-#endif
-
#endif /* _LINUX_I2C_SMBUS_H */
This declaration isn't used by anything outside of the i2c-core at present. In preparation for moving the smbus_alert code from it's own module into the i2c-core move to i2c-core.h Signed-off-by: Phil Reid <preid@electromag.com.au> --- drivers/i2c/i2c-core.h | 9 +++++++++ drivers/i2c/i2c-smbus.c | 3 ++- include/linux/i2c-smbus.h | 10 ---------- 3 files changed, 11 insertions(+), 11 deletions(-)