Searched refs:i2c_common (Results 1 – 3 of 3) sorted by relevance
19 static void amd_mp2_c2p_mutex_lock(struct amd_i2c_common *i2c_common) in amd_mp2_c2p_mutex_lock() argument21 struct amd_mp2_dev *privdata = i2c_common->mp2_dev; in amd_mp2_c2p_mutex_lock()25 privdata->c2p_lock_busid = i2c_common->bus_id; in amd_mp2_c2p_mutex_lock()28 static void amd_mp2_c2p_mutex_unlock(struct amd_i2c_common *i2c_common) in amd_mp2_c2p_mutex_unlock() argument30 struct amd_mp2_dev *privdata = i2c_common->mp2_dev; in amd_mp2_c2p_mutex_unlock()32 if (unlikely(privdata->c2p_lock_busid != i2c_common->bus_id)) { in amd_mp2_c2p_mutex_unlock()35 i2c_common->bus_id, privdata->c2p_lock_busid); in amd_mp2_c2p_mutex_unlock()42 static int amd_mp2_cmd(struct amd_i2c_common *i2c_common, in amd_mp2_cmd() argument45 struct amd_mp2_dev *privdata = i2c_common->mp2_dev; in amd_mp2_cmd()48 i2c_common->reqcmd = i2c_cmd_base.s.i2c_cmd; in amd_mp2_cmd()[all …]
41 static int i2c_amd_dma_map(struct amd_i2c_common *i2c_common) in i2c_amd_dma_map() argument43 struct device *dev_pci = &i2c_common->mp2_dev->pci_dev->dev; in i2c_amd_dma_map()44 struct amd_i2c_dev *i2c_dev = amd_i2c_dev_common(i2c_common); in i2c_amd_dma_map()46 i2c_common->msg->flags & I2C_M_RD ? in i2c_amd_dma_map()49 i2c_common->dma_buf = i2c_get_dma_safe_msg_buf(i2c_common->msg, 0); in i2c_amd_dma_map()50 i2c_common->dma_addr = dma_map_single(dev_pci, i2c_common->dma_buf, in i2c_amd_dma_map()51 i2c_common->msg->len, in i2c_amd_dma_map()54 if (unlikely(dma_mapping_error(dev_pci, i2c_common->dma_addr))) { in i2c_amd_dma_map()57 i2c_common->dma_buf); in i2c_amd_dma_map()64 static void i2c_amd_dma_unmap(struct amd_i2c_common *i2c_common) in i2c_amd_dma_unmap() argument[all …]
156 void (*cmd_completion)(struct amd_i2c_common *i2c_common);164 int (*suspend)(struct amd_i2c_common *i2c_common);165 int (*resume)(struct amd_i2c_common *i2c_common);190 int amd_mp2_rw(struct amd_i2c_common *i2c_common, enum i2c_cmd reqcmd);191 int amd_mp2_bus_enable_set(struct amd_i2c_common *i2c_common, bool enable);193 void amd_mp2_process_event(struct amd_i2c_common *i2c_common);195 void amd_mp2_rw_timeout(struct amd_i2c_common *i2c_common);197 int amd_mp2_register_cb(struct amd_i2c_common *i2c_common);198 int amd_mp2_unregister_cb(struct amd_i2c_common *i2c_common);