Lines Matching refs:center

315 	s32 center;  member
736 cal_x->center = hid_field_extract(ctlr->hdev, (raw_cal + 3), 0, in joycon_read_stick_calibration()
738 cal_y->center = hid_field_extract(ctlr->hdev, (raw_cal + 4), 4, in joycon_read_stick_calibration()
745 cal_x->center = hid_field_extract(ctlr->hdev, (raw_cal + 0), 0, in joycon_read_stick_calibration()
747 cal_y->center = hid_field_extract(ctlr->hdev, (raw_cal + 1), 4, in joycon_read_stick_calibration()
759 cal_x->max = cal_x->center + x_max_above; in joycon_read_stick_calibration()
760 cal_x->min = cal_x->center - x_min_below; in joycon_read_stick_calibration()
761 cal_y->max = cal_y->center + y_max_above; in joycon_read_stick_calibration()
762 cal_y->min = cal_y->center - y_min_below; in joycon_read_stick_calibration()
802 ctlr->left_stick_cal_x.center = DFLT_STICK_CAL_CEN; in joycon_request_calibration()
806 ctlr->left_stick_cal_y.center = DFLT_STICK_CAL_CEN; in joycon_request_calibration()
821 ctlr->right_stick_cal_x.center = DFLT_STICK_CAL_CEN; in joycon_request_calibration()
825 ctlr->right_stick_cal_y.center = DFLT_STICK_CAL_CEN; in joycon_request_calibration()
835 ctlr->left_stick_cal_x.center, in joycon_request_calibration()
838 ctlr->left_stick_cal_y.center, in joycon_request_calibration()
841 ctlr->right_stick_cal_x.center, in joycon_request_calibration()
844 ctlr->right_stick_cal_y.center, in joycon_request_calibration()
980 s32 center = cal->center; in joycon_map_stick_val() local
985 if (val > center) { in joycon_map_stick_val()
986 new_val = (val - center) * JC_MAX_STICK_MAG; in joycon_map_stick_val()
987 new_val /= (max - center); in joycon_map_stick_val()
989 new_val = (center - val) * -JC_MAX_STICK_MAG; in joycon_map_stick_val()
990 new_val /= (center - min); in joycon_map_stick_val()