Lines Matching refs:corr
46 struct js_corr corr[ABS_CNT]; member
68 static int joydev_correct(int value, struct js_corr *corr) in joydev_correct() argument
70 switch (corr->type) { in joydev_correct()
76 value = value > corr->coef[0] ? (value < corr->coef[1] ? 0 : in joydev_correct()
77 ((corr->coef[3] * (value - corr->coef[1])) >> 14)) : in joydev_correct()
78 ((corr->coef[2] * (value - corr->coef[0])) >> 14); in joydev_correct()
133 &joydev->corr[event.number]); in joydev_event()
192 joydev->abs[i] = joydev_correct(val, &joydev->corr[i]); in joydev_refresh_state()
545 if (copy_from_user(joydev->corr, argp, in joydev_ioctl_common()
546 sizeof(joydev->corr[0]) * joydev->nabs)) in joydev_ioctl_common()
551 joydev->abs[i] = joydev_correct(val, &joydev->corr[i]); in joydev_ioctl_common()
556 return copy_to_user(argp, joydev->corr, in joydev_ioctl_common()
557 sizeof(joydev->corr[0]) * joydev->nabs) ? -EFAULT : 0; in joydev_ioctl_common()
971 joydev->corr[i].type = JS_CORR_NONE; in joydev_connect()
974 joydev->corr[i].type = JS_CORR_BROKEN; in joydev_connect()
975 joydev->corr[i].prec = input_abs_get_fuzz(dev, j); in joydev_connect()
978 joydev->corr[i].coef[0] = t - input_abs_get_flat(dev, j); in joydev_connect()
979 joydev->corr[i].coef[1] = t + input_abs_get_flat(dev, j); in joydev_connect()
984 joydev->corr[i].coef[2] = (1 << 29) / t; in joydev_connect()
985 joydev->corr[i].coef[3] = (1 << 29) / t; in joydev_connect()