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()
224 static void amd_sfh_resume(struct amd_mp2_dev *mp2) in amd_sfh_resume() argument
226 struct amdtp_cl_data *cl_data = mp2->cl_data; in amd_sfh_resume()
231 amd_sfh_clear_intr(mp2); in amd_sfh_resume()
238 mp2->mp2_ops->start(mp2, info); in amd_sfh_resume()
240 (mp2, cl_data->sensor_idx[i], ENABLE_SENSOR); in amd_sfh_resume()
245 dev_dbg(&mp2->pdev->dev, "resume sid 0x%x (%s) status 0x%x\n", in amd_sfh_resume()
252 amd_sfh_clear_intr(mp2); in amd_sfh_resume()
255 static void amd_sfh_suspend(struct amd_mp2_dev *mp2) in amd_sfh_suspend() argument
257 struct amdtp_cl_data *cl_data = mp2->cl_data; in amd_sfh_suspend()
261 amd_sfh_clear_intr(mp2); in amd_sfh_suspend()
268 mp2->mp2_ops->stop(mp2, cl_data->sensor_idx[i]); in amd_sfh_suspend()
270 (mp2, cl_data->sensor_idx[i], DISABLE_SENSOR); in amd_sfh_suspend()
275 dev_dbg(&mp2->pdev->dev, "suspend sid 0x%x (%s) status 0x%x\n", in amd_sfh_suspend()
282 amd_sfh_clear_intr(mp2); in amd_sfh_suspend()
287 struct amd_mp2_dev *mp2 = privdata; in amd_mp2_pci_remove() local
291 mp2->mp2_ops->stop_all(mp2); in amd_mp2_pci_remove()
292 pci_intx(mp2->pdev, false); in amd_mp2_pci_remove()
293 amd_sfh_clear_intr(mp2); in amd_mp2_pci_remove()
296 static void amd_sfh_set_ops(struct amd_mp2_dev *mp2) in amd_sfh_set_ops() argument
300 sfh_interface_init(mp2); in amd_sfh_set_ops()
301 mp2_ops = mp2->mp2_ops; in amd_sfh_set_ops()
309 int amd_sfh1_1_init(struct amd_mp2_dev *mp2) in amd_sfh1_1_init() argument
311 u32 phy_base = readl(mp2->mmio + amd_get_c2p_val(mp2, 22)); in amd_sfh1_1_init()
312 struct device *dev = &mp2->pdev->dev; in amd_sfh1_1_init()
322 mp2->vsbase = devm_ioremap(dev, phy_base, 128 * 1024); in amd_sfh1_1_init()
323 if (!mp2->vsbase) { in amd_sfh1_1_init()
331 memcpy_fromio(&binfo, mp2->vsbase, sizeof(struct sfh_base_info)); in amd_sfh1_1_init()
338 amd_sfh_set_ops(mp2); in amd_sfh1_1_init()
340 rc = amd_sfh_irq_init(mp2); in amd_sfh1_1_init()
347 rc = amd_sfh1_1_hid_client_init(mp2); in amd_sfh1_1_init()