Lines Matching refs:sw_ctl
62 static void smi_i2c_cfg(struct smi_dev *dev, u32 sw_ctl) in smi_i2c_cfg() argument
66 dwCtrl = smi_read(sw_ctl); in smi_i2c_cfg()
71 smi_write(sw_ctl, dwCtrl); in smi_i2c_cfg()
73 dwCtrl = smi_read(sw_ctl); in smi_i2c_cfg()
75 smi_write(sw_ctl, dwCtrl); in smi_i2c_cfg()
78 static void smi_i2c_setsda(struct smi_dev *dev, int state, u32 sw_ctl) in smi_i2c_setsda() argument
82 smi_clear(sw_ctl, SW_I2C_MSK_DAT_EN); in smi_i2c_setsda()
84 smi_clear(sw_ctl, SW_I2C_MSK_DAT_OUT); in smi_i2c_setsda()
86 smi_set(sw_ctl, SW_I2C_MSK_DAT_EN); in smi_i2c_setsda()
90 static void smi_i2c_setscl(void *data, int state, u32 sw_ctl) in smi_i2c_setscl() argument
96 smi_clear(sw_ctl, SW_I2C_MSK_CLK_EN); in smi_i2c_setscl()
98 smi_clear(sw_ctl, SW_I2C_MSK_CLK_OUT); in smi_i2c_setscl()
100 smi_set(sw_ctl, SW_I2C_MSK_CLK_EN); in smi_i2c_setscl()
104 static int smi_i2c_getsda(void *data, u32 sw_ctl) in smi_i2c_getsda() argument
108 smi_clear(sw_ctl, SW_I2C_MSK_DAT_EN); in smi_i2c_getsda()
110 return (smi_read(sw_ctl) & SW_I2C_MSK_DAT_IN) ? 1 : 0; in smi_i2c_getsda()
113 static int smi_i2c_getscl(void *data, u32 sw_ctl) in smi_i2c_getscl() argument
117 smi_clear(sw_ctl, SW_I2C_MSK_CLK_EN); in smi_i2c_getscl()
119 return (smi_read(sw_ctl) & SW_I2C_MSK_CLK_IN) ? 1 : 0; in smi_i2c_getscl()