summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-04-02 15:54:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-02 15:54:13 -0700
commit5c8db3eb381745c010ba746373a279e92502bdc8 (patch)
tree69c1d8b8180635c6230fce57830e38e3f8d26cef /include
parent848960e576dafc8ed54c691b2f70b92e1fdea9ba (diff)
parentdf576beee53ac97fe0a413430e623e658805891d (diff)
Merge branch 'i2c/for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang: "I2C has: - using defines for bus speeds to avoid mistakes in hardcoded values; lots of small driver updates because of that. Thanks, Andy! - API change: i2c_setup_smbus_alert() was renamed to i2c_new_smbus_alert_device() and returns ERRPTR now. All in-tree users have been converted - in the core, a rare race condition when deleting the cdev has been fixed. Thanks, Kevin! - lots of driver updates. Thanks, everyone! I also want to mention: The amount of review and testing tags given was quite high this time. Thank you to these people, too. I hope we can keep it like this!" * 'i2c/for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (34 commits) i2c: rcar: clean up after refactoring i2c_timings macintosh: convert to i2c_new_scanned_device i2c: drivers: Use generic definitions for bus frequencies i2c: algo: Use generic definitions for bus frequencies i2c: stm32f7: switch to I²C generic property parsing i2c: rcar: Consolidate timings calls in rcar_i2c_clock_calculate() i2c: core: Allow override timing properties with 0 i2c: core: Provide generic definitions for bus frequencies i2c: mxs: Use dma_request_chan() instead dma_request_slave_channel() i2c: imx: remove duplicate print after platform_get_irq() i2c: designware: Fix spelling typos in the comments i2c: designware: Discard i2c_dw_read_comp_param() function i2c: designware: Detect the FIFO size in the common code i2c: dev: Fix the race between the release of i2c_dev and cdev i2c: qcom-geni: Drop of_platform.h include i2c: qcom-geni: Grow a dev pointer to simplify code i2c: qcom-geni: Let firmware specify irq trigger flags i2c: stm32f7: do not backup read-only PECR register i2c: smbus: remove outdated references to irq level triggers i2c: convert SMBus alert setup function to return an ERRPTR ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2c-smbus.h9
-rw-r--r--include/linux/i2c.h8
2 files changed, 10 insertions, 7 deletions
diff --git a/include/linux/i2c-smbus.h b/include/linux/i2c-smbus.h
index 585ad6fc3847..8c5459034f92 100644
--- a/include/linux/i2c-smbus.h
+++ b/include/linux/i2c-smbus.h
@@ -15,24 +15,19 @@
/**
* 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)
- * triggered
* @irq: IRQ number, if the smbus_alert driver should take care of interrupt
* handling
*
* If irq is not specified, the smbus_alert driver doesn't take care of
* interrupt handling. In that case it is up to the I2C bus driver to either
* handle the interrupts or to poll for alerts.
- *
- * If irq is specified then it it crucial that alert_edge_triggered is
- * properly set.
*/
struct i2c_smbus_alert_setup {
int irq;
};
-struct i2c_client *i2c_setup_smbus_alert(struct i2c_adapter *adapter,
- struct i2c_smbus_alert_setup *setup);
+struct i2c_client *i2c_new_smbus_alert_device(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)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index f6b942150631..456fc17ecb1c 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -39,6 +39,14 @@ enum i2c_slave_event;
typedef int (*i2c_slave_cb_t)(struct i2c_client *client,
enum i2c_slave_event event, u8 *val);
+/* I2C Frequency Modes */
+#define I2C_MAX_STANDARD_MODE_FREQ 100000
+#define I2C_MAX_FAST_MODE_FREQ 400000
+#define I2C_MAX_FAST_MODE_PLUS_FREQ 1000000
+#define I2C_MAX_TURBO_MODE_FREQ 1400000
+#define I2C_MAX_HIGH_SPEED_MODE_FREQ 3400000
+#define I2C_MAX_ULTRA_FAST_MODE_FREQ 5000000
+
struct module;
struct property_entry;