Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __I2C_OMAP_H__
0003 #define __I2C_OMAP_H__
0004 
0005 #include <linux/platform_device.h>
0006 
0007 /*
0008  * Version 2 of the I2C peripheral unit has a different register
0009  * layout and extra registers.  The ID register in the V2 peripheral
0010  * unit on the OMAP4430 reports the same ID as the V1 peripheral
0011  * unit on the OMAP3530, so we must inform the driver which IP
0012  * version we know it is running on from platform / cpu-specific
0013  * code using these constants in the hwmod class definition.
0014  */
0015 
0016 #define OMAP_I2C_IP_VERSION_1 1
0017 #define OMAP_I2C_IP_VERSION_2 2
0018 
0019 /* struct omap_i2c_bus_platform_data .flags meanings */
0020 
0021 #define OMAP_I2C_FLAG_NO_FIFO           BIT(0)
0022 #define OMAP_I2C_FLAG_SIMPLE_CLOCK      BIT(1)
0023 #define OMAP_I2C_FLAG_16BIT_DATA_REG        BIT(2)
0024 #define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK BIT(5)
0025 #define OMAP_I2C_FLAG_FORCE_19200_INT_CLK   BIT(6)
0026 /* how the CPU address bus must be translated for I2C unit access */
0027 #define OMAP_I2C_FLAG_BUS_SHIFT_NONE 0
0028 #define OMAP_I2C_FLAG_BUS_SHIFT_1       BIT(7)
0029 #define OMAP_I2C_FLAG_BUS_SHIFT_2       BIT(8)
0030 #define OMAP_I2C_FLAG_BUS_SHIFT__SHIFT 7
0031 
0032 struct omap_i2c_bus_platform_data {
0033     u32     clkrate;
0034     u32     rev;
0035     u32     flags;
0036     void        (*set_mpu_wkup_lat)(struct device *dev, long set);
0037 };
0038 
0039 #endif