Merge tag 'acpi-4.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[platform/kernel/linux-starfive.git] / drivers / i2c / busses / i2c-designware-core.h
index 152bf56..b4a0b2b 100644 (file)
  * @hs_lcnt: high speed LCNT value
  * @acquire_lock: function to acquire a hardware lock on the bus
  * @release_lock: function to release a hardware lock on the bus
- * @pm_disabled: true if power-management should be disabled for this i2c-bus
+ * @shared_with_punit: true if this bus is shared with the SoCs PUNIT
  * @disable: function to disable the controller
  * @disable_int: function to disable all interrupts
  * @init: function to initialize the I2C hardware
 struct dw_i2c_dev {
        struct device           *dev;
        void __iomem            *base;
+       void __iomem            *ext;
        struct completion       cmd_complete;
        struct clk              *clk;
        struct reset_control    *rst;
@@ -262,10 +263,11 @@ struct dw_i2c_dev {
        u16                     hs_lcnt;
        int                     (*acquire_lock)(void);
        void                    (*release_lock)(void);
-       bool                    pm_disabled;
+       bool                    shared_with_punit;
        void                    (*disable)(struct dw_i2c_dev *dev);
        void                    (*disable_int)(struct dw_i2c_dev *dev);
        int                     (*init)(struct dw_i2c_dev *dev);
+       int                     (*set_sda_hold_time)(struct dw_i2c_dev *dev);
        int                     mode;
        struct i2c_bus_recovery_info rinfo;
 };
@@ -273,8 +275,11 @@ struct dw_i2c_dev {
 #define ACCESS_SWAP            0x00000001
 #define ACCESS_16BIT           0x00000002
 #define ACCESS_INTR_MASK       0x00000004
+#define ACCESS_NO_IRQ_SUSPEND  0x00000008
 
 #define MODEL_CHERRYTRAIL      0x00000100
+#define MODEL_MSCC_OCELOT      0x00000200
+#define MODEL_MASK             0x00000f00
 
 u32 dw_readl(struct dw_i2c_dev *dev, int offset);
 void dw_writel(struct dw_i2c_dev *dev, u32 b, int offset);