Lines Matching full:accel
207 struct cmpc_accel *accel; in cmpc_accel_sensitivity_show_v4() local
211 accel = dev_get_drvdata(&inputdev->dev); in cmpc_accel_sensitivity_show_v4()
213 return sprintf(buf, "%d\n", accel->sensitivity); in cmpc_accel_sensitivity_show_v4()
222 struct cmpc_accel *accel; in cmpc_accel_sensitivity_store_v4() local
228 accel = dev_get_drvdata(&inputdev->dev); in cmpc_accel_sensitivity_store_v4()
238 accel->sensitivity = sensitivity; in cmpc_accel_sensitivity_store_v4()
256 struct cmpc_accel *accel; in cmpc_accel_g_select_show_v4() local
260 accel = dev_get_drvdata(&inputdev->dev); in cmpc_accel_g_select_show_v4()
262 return sprintf(buf, "%d\n", accel->g_select); in cmpc_accel_g_select_show_v4()
271 struct cmpc_accel *accel; in cmpc_accel_g_select_store_v4() local
277 accel = dev_get_drvdata(&inputdev->dev); in cmpc_accel_g_select_store_v4()
287 accel->g_select = g_select; in cmpc_accel_g_select_store_v4()
302 struct cmpc_accel *accel; in cmpc_accel_open_v4() local
305 accel = dev_get_drvdata(&input->dev); in cmpc_accel_open_v4()
307 cmpc_accel_set_sensitivity_v4(acpi->handle, accel->sensitivity); in cmpc_accel_open_v4()
308 cmpc_accel_set_g_select_v4(acpi->handle, accel->g_select); in cmpc_accel_open_v4()
311 accel->inputdev_state = CMPC_ACCEL_DEV_STATE_OPEN; in cmpc_accel_open_v4()
320 struct cmpc_accel *accel; in cmpc_accel_close_v4() local
323 accel = dev_get_drvdata(&input->dev); in cmpc_accel_close_v4()
326 accel->inputdev_state = CMPC_ACCEL_DEV_STATE_CLOSED; in cmpc_accel_close_v4()
343 struct cmpc_accel *accel; in cmpc_accel_suspend_v4() local
346 accel = dev_get_drvdata(&inputdev->dev); in cmpc_accel_suspend_v4()
348 if (accel->inputdev_state == CMPC_ACCEL_DEV_STATE_OPEN) in cmpc_accel_suspend_v4()
357 struct cmpc_accel *accel; in cmpc_accel_resume_v4() local
360 accel = dev_get_drvdata(&inputdev->dev); in cmpc_accel_resume_v4()
362 if (accel->inputdev_state == CMPC_ACCEL_DEV_STATE_OPEN) { in cmpc_accel_resume_v4()
364 accel->sensitivity); in cmpc_accel_resume_v4()
366 accel->g_select); in cmpc_accel_resume_v4()
380 struct cmpc_accel *accel; in cmpc_accel_add_v4() local
382 accel = kmalloc(sizeof(*accel), GFP_KERNEL); in cmpc_accel_add_v4()
383 if (!accel) in cmpc_accel_add_v4()
386 accel->inputdev_state = CMPC_ACCEL_DEV_STATE_CLOSED; in cmpc_accel_add_v4()
388 accel->sensitivity = CMPC_ACCEL_SENSITIVITY_DEFAULT; in cmpc_accel_add_v4()
389 cmpc_accel_set_sensitivity_v4(acpi->handle, accel->sensitivity); in cmpc_accel_add_v4()
395 accel->g_select = CMPC_ACCEL_G_SELECT_DEFAULT; in cmpc_accel_add_v4()
396 cmpc_accel_set_g_select_v4(acpi->handle, accel->g_select); in cmpc_accel_add_v4()
408 dev_set_drvdata(&inputdev->dev, accel); in cmpc_accel_add_v4()
417 kfree(accel); in cmpc_accel_add_v4()
550 struct cmpc_accel *accel; in cmpc_accel_sensitivity_show() local
554 accel = dev_get_drvdata(&inputdev->dev); in cmpc_accel_sensitivity_show()
556 return sprintf(buf, "%d\n", accel->sensitivity); in cmpc_accel_sensitivity_show()
565 struct cmpc_accel *accel; in cmpc_accel_sensitivity_store() local
571 accel = dev_get_drvdata(&inputdev->dev); in cmpc_accel_sensitivity_store()
577 accel->sensitivity = sensitivity; in cmpc_accel_sensitivity_store()
621 struct cmpc_accel *accel; in cmpc_accel_add() local
623 accel = kmalloc(sizeof(*accel), GFP_KERNEL); in cmpc_accel_add()
624 if (!accel) in cmpc_accel_add()
627 accel->sensitivity = CMPC_ACCEL_SENSITIVITY_DEFAULT; in cmpc_accel_add()
628 cmpc_accel_set_sensitivity(acpi->handle, accel->sensitivity); in cmpc_accel_add()
640 dev_set_drvdata(&inputdev->dev, accel); in cmpc_accel_add()
647 kfree(accel); in cmpc_accel_add()