Home
last modified time | relevance | path

Searched refs:axes (Results 1 - 25 of 34) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/input/joystick/
H A Dadc-joystick.c26 struct adc_joystick_axis *axes; member
74 input_report_abs(joy->input, joy->axes[i].code, val); in adc_joystick_handle()
109 struct adc_joystick_axis *axes; in adc_joystick_set_axes() local
125 axes = devm_kmalloc_array(dev, num_axes, sizeof(*axes), GFP_KERNEL); in adc_joystick_set_axes()
126 if (!axes) in adc_joystick_set_axes()
143 &axes[i].code); in adc_joystick_set_axes()
150 axes[i].range, 2); in adc_joystick_set_axes()
156 fwnode_property_read_u32(child, "abs-fuzz", &axes[i].fuzz); in adc_joystick_set_axes()
157 fwnode_property_read_u32(child, "abs-flat", &axes[ in adc_joystick_set_axes()
[all...]
H A Dspaceorb.c63 int axes[6]; in spaceorb_process_packet() local
82 axes[0] = ( data[2] << 3) | (data[ 3] >> 4); in spaceorb_process_packet()
83 axes[1] = ((data[3] & 0x0f) << 6) | (data[ 4] >> 1); in spaceorb_process_packet()
84 axes[2] = ((data[4] & 0x01) << 9) | (data[ 5] << 2) | (data[4] >> 5); in spaceorb_process_packet()
85 axes[3] = ((data[6] & 0x1f) << 5) | (data[ 7] >> 2); in spaceorb_process_packet()
86 axes[4] = ((data[7] & 0x03) << 8) | (data[ 8] << 1) | (data[7] >> 6); in spaceorb_process_packet()
87 axes[5] = ((data[9] & 0x3f) << 4) | (data[10] >> 3); in spaceorb_process_packet()
89 input_report_abs(dev, spaceorb_axes[i], axes[i] - ((axes[i] & 0x200) ? 1024 : 0)); in spaceorb_process_packet()
H A Danalog.c116 int axes[4]; member
186 static void analog_decode(struct analog *analog, int *axes, int *initial, int buttons) in analog_decode() argument
193 if (axes[3] < ((initial[3] * ((i << 1) + 1)) >> 3)) { in analog_decode()
207 input_report_key(dev, analog_pads[0], axes[2] < (initial[2] >> 1)); in analog_decode()
209 input_report_key(dev, analog_pads[1], axes[3] < (initial[3] >> 1)); in analog_decode()
211 input_report_key(dev, analog_pads[2], axes[2] > (initial[2] + (initial[2] >> 1))); in analog_decode()
213 input_report_key(dev, analog_pads[3], axes[3] > (initial[3] + (initial[3] >> 1))); in analog_decode()
217 input_report_abs(dev, analog_axes[j++], axes[i]); in analog_decode()
278 port->axes[j] = (delta(start, time[i]) << ANALOG_FUZZ_BITS) / port->loop; in analog_cooked_read()
325 port->bads -= gameport_cooked_read(port->gameport, port->axes, in analog_poll()
[all...]
H A Da3d.c42 int axes[4]; member
116 a3d->axes[0] = ((signed char)((data[11] << 6) | (data[12] << 3) | (data[13]))) + 128; in a3d_read()
117 a3d->axes[1] = ((signed char)((data[14] << 6) | (data[15] << 3) | (data[16]))) + 128; in a3d_read()
118 a3d->axes[2] = ((signed char)((data[17] << 6) | (data[18] << 3) | (data[19]))) + 128; in a3d_read()
119 a3d->axes[3] = ((signed char)((data[20] << 6) | (data[21] << 3) | (data[22]))) + 128; in a3d_read()
181 static int a3d_adc_cooked_read(struct gameport *gameport, int *axes, int *buttons) in a3d_adc_cooked_read() argument
187 axes[i] = (a3d->axes[i] < 254) ? a3d->axes[i] : -1; in a3d_adc_cooked_read()
306 int axes[] in a3d_connect() local
[all...]
H A Djoydump.c37 int axes[4], buttons; in joydump_connect() local
57 gameport_cooked_read(gameport, axes, &buttons); in joydump_connect()
60 printk(KERN_INFO "joydump: | Axis %d: %4d. |\n", i, axes[i]); in joydump_connect()
H A Dtmdc.c83 const signed char *axes; member
282 port->abs = model->axes; in tmdc_setup_port()
/kernel/linux/linux-6.6/drivers/input/joystick/
H A Dadc-joystick.c26 struct adc_joystick_axis *axes; member
41 input_report_abs(input, joy->axes[i].code, val); in adc_joystick_poll()
89 input_report_abs(joy->input, joy->axes[i].code, val); in adc_joystick_handle()
124 struct adc_joystick_axis *axes; in adc_joystick_set_axes() local
140 axes = devm_kmalloc_array(dev, num_axes, sizeof(*axes), GFP_KERNEL); in adc_joystick_set_axes()
141 if (!axes) in adc_joystick_set_axes()
158 &axes[i].code); in adc_joystick_set_axes()
165 axes[i].range, 2); in adc_joystick_set_axes()
171 fwnode_property_read_u32(child, "abs-fuzz", &axes[ in adc_joystick_set_axes()
[all...]
H A Dspaceorb.c60 int axes[6]; in spaceorb_process_packet() local
79 axes[0] = ( data[2] << 3) | (data[ 3] >> 4); in spaceorb_process_packet()
80 axes[1] = ((data[3] & 0x0f) << 6) | (data[ 4] >> 1); in spaceorb_process_packet()
81 axes[2] = ((data[4] & 0x01) << 9) | (data[ 5] << 2) | (data[4] >> 5); in spaceorb_process_packet()
82 axes[3] = ((data[6] & 0x1f) << 5) | (data[ 7] >> 2); in spaceorb_process_packet()
83 axes[4] = ((data[7] & 0x03) << 8) | (data[ 8] << 1) | (data[7] >> 6); in spaceorb_process_packet()
84 axes[5] = ((data[9] & 0x3f) << 4) | (data[10] >> 3); in spaceorb_process_packet()
86 input_report_abs(dev, spaceorb_axes[i], axes[i] - ((axes[i] & 0x200) ? 1024 : 0)); in spaceorb_process_packet()
H A Danalog.c109 int axes[4]; member
119 static void analog_decode(struct analog *analog, int *axes, int *initial, int buttons) in analog_decode() argument
126 if (axes[3] < ((initial[3] * ((i << 1) + 1)) >> 3)) { in analog_decode()
140 input_report_key(dev, analog_pads[0], axes[2] < (initial[2] >> 1)); in analog_decode()
142 input_report_key(dev, analog_pads[1], axes[3] < (initial[3] >> 1)); in analog_decode()
144 input_report_key(dev, analog_pads[2], axes[2] > (initial[2] + (initial[2] >> 1))); in analog_decode()
146 input_report_key(dev, analog_pads[3], axes[3] > (initial[3] + (initial[3] >> 1))); in analog_decode()
150 input_report_abs(dev, analog_axes[j++], axes[i]); in analog_decode()
211 port->axes[j] = ((u32)ktime_sub(time[i], start) << ANALOG_FUZZ_BITS) / port->loop; in analog_cooked_read()
258 port->bads -= gameport_cooked_read(port->gameport, port->axes, in analog_poll()
[all...]
H A Da3d.c39 int axes[4]; member
113 a3d->axes[0] = ((signed char)((data[11] << 6) | (data[12] << 3) | (data[13]))) + 128; in a3d_read()
114 a3d->axes[1] = ((signed char)((data[14] << 6) | (data[15] << 3) | (data[16]))) + 128; in a3d_read()
115 a3d->axes[2] = ((signed char)((data[17] << 6) | (data[18] << 3) | (data[19]))) + 128; in a3d_read()
116 a3d->axes[3] = ((signed char)((data[20] << 6) | (data[21] << 3) | (data[22]))) + 128; in a3d_read()
178 static int a3d_adc_cooked_read(struct gameport *gameport, int *axes, int *buttons) in a3d_adc_cooked_read() argument
184 axes[i] = (a3d->axes[i] < 254) ? a3d->axes[i] : -1; in a3d_adc_cooked_read()
303 int axes[] in a3d_connect() local
[all...]
H A Djoydump.c34 int axes[4], buttons; in joydump_connect() local
54 gameport_cooked_read(gameport, axes, &buttons); in joydump_connect()
57 printk(KERN_INFO "joydump: | Axis %d: %4d. |\n", i, axes[i]); in joydump_connect()
/kernel/linux/linux-5.10/drivers/input/gameport/
H A Dlightning.c60 static int l4_cooked_read(struct gameport *gameport, int *axes, int *buttons) in l4_cooked_read() argument
78 axes[i] = inb(L4_PORT); in l4_cooked_read()
79 if (axes[i] > 252) axes[i] = -1; in l4_cooked_read()
180 static int l4_calibrate(struct gameport *gameport, int *axes, int *max) in l4_calibrate() argument
192 axes[i] = (axes[i] < 0) ? -1 : (axes[i] * cal[i]) / t; in l4_calibrate()
193 axes[i] = (axes[ in l4_calibrate()
[all...]
H A Dfm801-gp.c29 static int fm801_gp_cooked_read(struct gameport *gameport, int *axes, int *buttons) in fm801_gp_cooked_read() argument
35 axes[0] = (w == 0xffff) ? -1 : ((w & 0x1fff) << 5); in fm801_gp_cooked_read()
37 axes[1] = (w == 0xffff) ? -1 : ((w & 0x1fff) << 5); in fm801_gp_cooked_read()
40 axes[2] = (w == 0xffff) ? -1 : ((w & 0x1fff) << 5); in fm801_gp_cooked_read()
42 axes[3] = (w == 0xffff) ? -1 : ((w & 0x1fff) << 5); in fm801_gp_cooked_read()
/kernel/linux/linux-6.6/drivers/input/gameport/
H A Dlightning.c57 static int l4_cooked_read(struct gameport *gameport, int *axes, int *buttons) in l4_cooked_read() argument
75 axes[i] = inb(L4_PORT); in l4_cooked_read()
76 if (axes[i] > 252) axes[i] = -1; in l4_cooked_read()
177 static int l4_calibrate(struct gameport *gameport, int *axes, int *max) in l4_calibrate() argument
189 axes[i] = (axes[i] < 0) ? -1 : (axes[i] * cal[i]) / t; in l4_calibrate()
190 axes[i] = (axes[ in l4_calibrate()
[all...]
H A Dfm801-gp.c29 static int fm801_gp_cooked_read(struct gameport *gameport, int *axes, int *buttons) in fm801_gp_cooked_read() argument
35 axes[0] = (w == 0xffff) ? -1 : ((w & 0x1fff) << 5); in fm801_gp_cooked_read()
37 axes[1] = (w == 0xffff) ? -1 : ((w & 0x1fff) << 5); in fm801_gp_cooked_read()
40 axes[2] = (w == 0xffff) ? -1 : ((w & 0x1fff) << 5); in fm801_gp_cooked_read()
42 axes[3] = (w == 0xffff) ? -1 : ((w & 0x1fff) << 5); in fm801_gp_cooked_read()
/kernel/linux/linux-5.10/sound/pci/au88x0/
H A Dau88x0_game.c43 vortex_game_cooked_read(struct gameport *gameport, int *axes, int *buttons) in vortex_game_cooked_read() argument
51 axes[i] = in vortex_game_cooked_read()
53 if (axes[i] == AXIS_RANGE) in vortex_game_cooked_read()
54 axes[i] = -1; in vortex_game_cooked_read()
/kernel/linux/linux-6.6/sound/pci/au88x0/
H A Dau88x0_game.c43 vortex_game_cooked_read(struct gameport *gameport, int *axes, int *buttons) in vortex_game_cooked_read() argument
51 axes[i] = in vortex_game_cooked_read()
53 if (axes[i] == AXIS_RANGE) in vortex_game_cooked_read()
54 axes[i] = -1; in vortex_game_cooked_read()
/kernel/linux/linux-5.10/include/linux/
H A Dgameport.h182 static inline int gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) in gameport_cooked_read() argument
185 return gameport->cooked_read(gameport, axes, buttons); in gameport_cooked_read()
190 static inline int gameport_calibrate(struct gameport *gameport, int *axes, int *max) in gameport_calibrate() argument
193 return gameport->calibrate(gameport, axes, max); in gameport_calibrate()
/kernel/linux/linux-6.6/include/linux/
H A Dgameport.h175 static inline int gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) in gameport_cooked_read() argument
178 return gameport->cooked_read(gameport, axes, buttons); in gameport_cooked_read()
183 static inline int gameport_calibrate(struct gameport *gameport, int *axes, int *max) in gameport_calibrate() argument
186 return gameport->calibrate(gameport, axes, max); in gameport_calibrate()
/kernel/linux/linux-5.10/sound/pci/
H A Dazt3328.c287 u16 axes[4]; member
1731 int *axes, in snd_azf3328_gameport_cooked_read()
1759 for (i = 0; i < ARRAY_SIZE(chip->axes); ++i) { in snd_azf3328_gameport_cooked_read()
1764 chip->axes[i] = snd_azf3328_game_inw( in snd_azf3328_gameport_cooked_read()
1770 /* trigger next sampling of axes, to be evaluated the next time we in snd_azf3328_gameport_cooked_read()
1774 * Measurement Ready monitoring for all axes here, in snd_azf3328_gameport_cooked_read()
1776 val = 0x03; /* we're able to monitor axes 1 and 2 only */ in snd_azf3328_gameport_cooked_read()
1782 for (i = 0; i < ARRAY_SIZE(chip->axes); i++) { in snd_azf3328_gameport_cooked_read()
1783 axes[i] = chip->axes[ in snd_azf3328_gameport_cooked_read()
1730 snd_azf3328_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons ) snd_azf3328_gameport_cooked_read() argument
[all...]
H A Dcs4281.c1185 int *axes, int *buttons) in snd_cs4281_gameport_cooked_read()
1199 axes[0] = ((js1 & JSC1_Y1V_MASK) >> JSC1_Y1V_SHIFT) & 0xFFFF; in snd_cs4281_gameport_cooked_read()
1200 axes[1] = ((js1 & JSC1_X1V_MASK) >> JSC1_X1V_SHIFT) & 0xFFFF; in snd_cs4281_gameport_cooked_read()
1201 axes[2] = ((js2 & JSC2_Y2V_MASK) >> JSC2_Y2V_SHIFT) & 0xFFFF; in snd_cs4281_gameport_cooked_read()
1202 axes[3] = ((js2 & JSC2_X2V_MASK) >> JSC2_X2V_SHIFT) & 0xFFFF; in snd_cs4281_gameport_cooked_read()
1205 if (axes[jst] == 0xFFFF) axes[jst] = -1; in snd_cs4281_gameport_cooked_read()
1184 snd_cs4281_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) snd_cs4281_gameport_cooked_read() argument
/kernel/linux/linux-6.6/sound/pci/
H A Dazt3328.c286 u16 axes[4]; member
1722 int *axes, in snd_azf3328_gameport_cooked_read()
1750 for (i = 0; i < ARRAY_SIZE(chip->axes); ++i) { in snd_azf3328_gameport_cooked_read()
1755 chip->axes[i] = snd_azf3328_game_inw( in snd_azf3328_gameport_cooked_read()
1761 /* trigger next sampling of axes, to be evaluated the next time we in snd_azf3328_gameport_cooked_read()
1765 * Measurement Ready monitoring for all axes here, in snd_azf3328_gameport_cooked_read()
1767 val = 0x03; /* we're able to monitor axes 1 and 2 only */ in snd_azf3328_gameport_cooked_read()
1773 for (i = 0; i < ARRAY_SIZE(chip->axes); i++) { in snd_azf3328_gameport_cooked_read()
1774 axes[i] = chip->axes[ in snd_azf3328_gameport_cooked_read()
1721 snd_azf3328_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons ) snd_azf3328_gameport_cooked_read() argument
[all...]
H A Dcs4281.c1189 int *axes, int *buttons) in snd_cs4281_gameport_cooked_read()
1203 axes[0] = ((js1 & JSC1_Y1V_MASK) >> JSC1_Y1V_SHIFT) & 0xFFFF; in snd_cs4281_gameport_cooked_read()
1204 axes[1] = ((js1 & JSC1_X1V_MASK) >> JSC1_X1V_SHIFT) & 0xFFFF; in snd_cs4281_gameport_cooked_read()
1205 axes[2] = ((js2 & JSC2_Y2V_MASK) >> JSC2_Y2V_SHIFT) & 0xFFFF; in snd_cs4281_gameport_cooked_read()
1206 axes[3] = ((js2 & JSC2_X2V_MASK) >> JSC2_X2V_SHIFT) & 0xFFFF; in snd_cs4281_gameport_cooked_read()
1209 if (axes[jst] == 0xFFFF) axes[jst] = -1; in snd_cs4281_gameport_cooked_read()
1188 snd_cs4281_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) snd_cs4281_gameport_cooked_read() argument
/kernel/linux/linux-5.10/drivers/platform/x86/
H A Dhdaps.c178 /* hdaps_invert is a bitvector to negate the axes */ in __hdaps_read_pair()
487 #define HDAPS_DMI_MATCH_INVERT(vendor, model, axes) { \
490 .driver_data = (void *)axes, \
623 "2 invert y-axis, 3 invert both axes.");
/kernel/linux/linux-6.6/drivers/platform/x86/
H A Dhdaps.c178 /* hdaps_invert is a bitvector to negate the axes */ in __hdaps_read_pair()
487 #define HDAPS_DMI_MATCH_INVERT(vendor, model, axes) { \
490 .driver_data = (void *)axes, \
623 "2 invert y-axis, 3 invert both axes.");

Completed in 25 milliseconds

12