Lines Matching refs:mp2

18 static int amd_sfh_get_sensor_num(struct amd_mp2_dev *mp2, u8 *sensor_id)  in amd_sfh_get_sensor_num()  argument
25 memcpy_fromio(&binfo, mp2->vsbase, sizeof(struct sfh_base_info)); in amd_sfh_get_sensor_num()
44 static u32 amd_sfh_wait_for_response(struct amd_mp2_dev *mp2, u8 sid, u32 cmd_id) in amd_sfh_wait_for_response() argument
46 if (mp2->mp2_ops->response) in amd_sfh_wait_for_response()
47 return mp2->mp2_ops->response(mp2, sid, cmd_id); in amd_sfh_wait_for_response()
208 static void amd_sfh_resume(struct amd_mp2_dev *mp2) in amd_sfh_resume() argument
210 struct amdtp_cl_data *cl_data = mp2->cl_data; in amd_sfh_resume()
217 mp2->mp2_ops->start(mp2, info); in amd_sfh_resume()
219 (mp2, cl_data->sensor_idx[i], ENABLE_SENSOR); in amd_sfh_resume()
224 dev_dbg(&mp2->pdev->dev, "resume sid 0x%x (%s) status 0x%x\n", in amd_sfh_resume()
231 amd_sfh_clear_intr(mp2); in amd_sfh_resume()
234 static void amd_sfh_suspend(struct amd_mp2_dev *mp2) in amd_sfh_suspend() argument
236 struct amdtp_cl_data *cl_data = mp2->cl_data; in amd_sfh_suspend()
242 mp2->mp2_ops->stop(mp2, cl_data->sensor_idx[i]); in amd_sfh_suspend()
244 (mp2, cl_data->sensor_idx[i], DISABLE_SENSOR); in amd_sfh_suspend()
249 dev_dbg(&mp2->pdev->dev, "suspend sid 0x%x (%s) status 0x%x\n", in amd_sfh_suspend()
256 amd_sfh_clear_intr(mp2); in amd_sfh_suspend()
261 struct amd_mp2_dev *mp2 = privdata; in amd_mp2_pci_remove() local
264 mp2->mp2_ops->stop_all(mp2); in amd_mp2_pci_remove()
265 pci_intx(mp2->pdev, false); in amd_mp2_pci_remove()
266 amd_sfh_clear_intr(mp2); in amd_mp2_pci_remove()
269 static void amd_sfh_set_ops(struct amd_mp2_dev *mp2) in amd_sfh_set_ops() argument
273 sfh_interface_init(mp2); in amd_sfh_set_ops()
274 mp2_ops = mp2->mp2_ops; in amd_sfh_set_ops()
282 int amd_sfh1_1_init(struct amd_mp2_dev *mp2) in amd_sfh1_1_init() argument
284 u32 phy_base = readl(mp2->mmio + AMD_C2P_MSG(22)); in amd_sfh1_1_init()
285 struct device *dev = &mp2->pdev->dev; in amd_sfh1_1_init()
295 mp2->vsbase = devm_ioremap(dev, phy_base, 128 * 1024); in amd_sfh1_1_init()
296 if (!mp2->vsbase) { in amd_sfh1_1_init()
304 memcpy_fromio(&binfo, mp2->vsbase, sizeof(struct sfh_base_info)); in amd_sfh1_1_init()
311 amd_sfh_set_ops(mp2); in amd_sfh1_1_init()
313 rc = amd_sfh_irq_init(mp2); in amd_sfh1_1_init()
319 rc = amd_sfh1_1_hid_client_init(mp2); in amd_sfh1_1_init()