Home
last modified time | relevance | path

Searched refs:ps2dev (Results 1 – 19 of 19) sorted by relevance

/linux-6.12.1/drivers/input/serio/
Dlibps2.c43 static int ps2_do_sendbyte(struct ps2dev *ps2dev, u8 byte, in ps2_do_sendbyte() argument
45 __releases(&ps2dev->serio->lock) __acquires(&ps2dev->serio->lock) in ps2_do_sendbyte()
50 lockdep_assert_held(&ps2dev->serio->lock); in ps2_do_sendbyte()
53 ps2dev->nak = 1; in ps2_do_sendbyte()
54 ps2dev->flags |= PS2_FLAG_ACK; in ps2_do_sendbyte()
56 serio_continue_rx(ps2dev->serio); in ps2_do_sendbyte()
58 error = serio_write(ps2dev->serio, byte); in ps2_do_sendbyte()
60 dev_dbg(&ps2dev->serio->dev, in ps2_do_sendbyte()
63 wait_event_timeout(ps2dev->wait, in ps2_do_sendbyte()
64 !(ps2dev->flags & PS2_FLAG_ACK), in ps2_do_sendbyte()
[all …]
/linux-6.12.1/include/linux/
Dlibps2.h16 struct ps2dev;
30 typedef enum ps2_disposition (*ps2_pre_receive_handler_t)(struct ps2dev *, u8,
32 typedef void (*ps2_receive_handler_t)(struct ps2dev *, u8);
48 struct ps2dev { struct
61 void ps2_init(struct ps2dev *ps2dev, struct serio *serio, argument
64 int ps2_sendbyte(struct ps2dev *ps2dev, u8 byte, unsigned int timeout);
65 void ps2_drain(struct ps2dev *ps2dev, size_t maxbytes, unsigned int timeout);
66 void ps2_begin_command(struct ps2dev *ps2dev);
67 void ps2_end_command(struct ps2dev *ps2dev);
68 int __ps2_command(struct ps2dev *ps2dev, u8 *param, unsigned int command);
[all …]
/linux-6.12.1/drivers/input/mouse/
Dsentelic.c73 struct ps2dev *ps2dev = &psmouse->ps2dev; in fsp_reg_read() local
86 ps2_begin_command(ps2dev); in fsp_reg_read()
88 if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) in fsp_reg_read()
92 ps2_sendbyte(ps2dev, 0x66, FSP_CMD_TIMEOUT2); in fsp_reg_read()
94 ps2_sendbyte(ps2dev, 0x88, FSP_CMD_TIMEOUT2); in fsp_reg_read()
96 if (ps2_sendbyte(ps2dev, 0xf3, FSP_CMD_TIMEOUT) < 0) in fsp_reg_read()
100 ps2_sendbyte(ps2dev, 0x68, FSP_CMD_TIMEOUT2); in fsp_reg_read()
103 ps2_sendbyte(ps2dev, 0xcc, FSP_CMD_TIMEOUT2); in fsp_reg_read()
107 ps2_sendbyte(ps2dev, 0x66, FSP_CMD_TIMEOUT2); in fsp_reg_read()
111 ps2_sendbyte(ps2dev, addr, FSP_CMD_TIMEOUT); in fsp_reg_read()
[all …]
Dlogips2pp.c117 error = ps2_sliced_command(&psmouse->ps2dev, command); in ps2pp_cmd()
121 error = ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_POLL | 0x0300); in ps2pp_cmd()
138 struct ps2dev *ps2dev = &psmouse->ps2dev; in ps2pp_set_smartscroll() local
144 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); in ps2pp_set_smartscroll()
145 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); in ps2pp_set_smartscroll()
146 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); in ps2pp_set_smartscroll()
149 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); in ps2pp_set_smartscroll()
189 struct ps2dev *ps2dev = &psmouse->ps2dev; in ps2pp_set_resolution() local
192 ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11); in ps2pp_set_resolution()
193 ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11); in ps2pp_set_resolution()
[all …]
Dtrackpoint.c33 static int trackpoint_power_on_reset(struct ps2dev *ps2dev) in trackpoint_power_on_reset() argument
38 err = ps2_command(ps2dev, param, MAKE_PS2_CMD(1, 2, TP_COMMAND)); in trackpoint_power_on_reset()
52 static int trackpoint_read(struct ps2dev *ps2dev, u8 loc, u8 *results) in trackpoint_read() argument
56 return ps2_command(ps2dev, results, MAKE_PS2_CMD(1, 1, TP_COMMAND)); in trackpoint_read()
59 static int trackpoint_write(struct ps2dev *ps2dev, u8 loc, u8 val) in trackpoint_write() argument
63 return ps2_command(ps2dev, param, MAKE_PS2_CMD(3, 0, TP_COMMAND)); in trackpoint_write()
66 static int trackpoint_toggle_bit(struct ps2dev *ps2dev, u8 loc, u8 mask) in trackpoint_toggle_bit() argument
74 return ps2_command(ps2dev, param, MAKE_PS2_CMD(3, 0, TP_COMMAND)); in trackpoint_toggle_bit()
77 static int trackpoint_update_bit(struct ps2dev *ps2dev, in trackpoint_update_bit() argument
83 retval = trackpoint_read(ps2dev, loc, &data); in trackpoint_update_bit()
[all …]
Dfocaltech.c267 struct ps2dev *ps2dev = &psmouse->ps2dev; in focaltech_switch_protocol() local
271 if (ps2_command(ps2dev, param, 0x10f8)) in focaltech_switch_protocol()
274 if (ps2_command(ps2dev, param, 0x10f8)) in focaltech_switch_protocol()
277 if (ps2_command(ps2dev, param, 0x10f8)) in focaltech_switch_protocol()
281 if (ps2_command(ps2dev, param, 0x10f8)) in focaltech_switch_protocol()
284 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETSCALE11)) in focaltech_switch_protocol()
287 if (ps2_command(ps2dev, param, PSMOUSE_CMD_ENABLE)) in focaltech_switch_protocol()
295 ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS); in focaltech_reset()
347 static int focaltech_read_register(struct ps2dev *ps2dev, int reg, in focaltech_read_register() argument
350 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETSCALE11)) in focaltech_read_register()
[all …]
Dpsmouse-base.c121 struct ps2dev *ps2dev = serio_get_drvdata(serio); in psmouse_from_serio() local
123 return container_of(ps2dev, struct psmouse, ps2dev); in psmouse_from_serio()
257 psmouse->ps2dev.flags = 0; in __psmouse_set_state()
268 serio_pause_rx(psmouse->ps2dev.serio); in psmouse_set_state()
270 serio_continue_rx(psmouse->ps2dev.serio); in psmouse_set_state()
292 serio_reconnect(psmouse->ps2dev.serio); in psmouse_handle_byte()
339 static enum ps2_disposition psmouse_pre_receive_byte(struct ps2dev *ps2dev, in psmouse_pre_receive_byte() argument
343 struct psmouse *psmouse = container_of(ps2dev, struct psmouse, ps2dev); in psmouse_pre_receive_byte()
368 static void psmouse_receive_byte(struct ps2dev *ps2dev, u8 data) in psmouse_receive_byte() argument
370 struct psmouse *psmouse = container_of(ps2dev, struct psmouse, ps2dev); in psmouse_receive_byte()
[all …]
Dalps.c1412 psmouse->ps2dev.serio->phys, in alps_do_register_bare_ps2_mouse()
1426 dev3->dev.parent = &psmouse->ps2dev.serio->dev; in alps_do_register_bare_ps2_mouse()
1588 serio_pause_rx(psmouse->ps2dev.serio); in alps_flush_packet()
1609 serio_continue_rx(psmouse->ps2dev.serio); in alps_flush_packet()
1694 struct ps2dev *ps2dev = &psmouse->ps2dev; in alps_command_mode_send_nibble() local
1706 if (ps2_command(ps2dev, param, command)) in alps_command_mode_send_nibble()
1714 struct ps2dev *ps2dev = &psmouse->ps2dev; in alps_command_mode_set_addr() local
1718 if (ps2_command(ps2dev, NULL, priv->addr_command)) in alps_command_mode_set_addr()
1732 struct ps2dev *ps2dev = &psmouse->ps2dev; in __alps_command_mode_read_reg() local
1735 if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) in __alps_command_mode_read_reg()
[all …]
Dhgpk.c494 struct ps2dev *ps2dev = &psmouse->ps2dev; in hgpk_select_mode() local
520 if (ps2_command(ps2dev, NULL, advanced_init[i])) in hgpk_select_mode()
527 if (ps2_command(ps2dev, NULL, cmd)) in hgpk_select_mode()
610 struct ps2dev *ps2dev = &psmouse->ps2dev; in hgpk_reset_device() local
613 if (ps2_command(ps2dev, NULL, 0xf5) || in hgpk_reset_device()
614 ps2_command(ps2dev, NULL, 0xf5) || in hgpk_reset_device()
615 ps2_command(ps2dev, NULL, 0xe6) || in hgpk_reset_device()
616 ps2_command(ps2dev, NULL, 0xf5)) { in hgpk_reset_device()
694 struct ps2dev *ps2dev = &psmouse->ps2dev; in hgpk_toggle_powersave() local
713 if (!ps2_sendbyte(ps2dev, PSMOUSE_CMD_DISABLE, 20)) in hgpk_toggle_powersave()
[all …]
Dbyd.c257 serio_pause_rx(psmouse->ps2dev.serio); in byd_clear_touch()
262 serio_continue_rx(psmouse->ps2dev.serio); in byd_clear_touch()
341 struct ps2dev *ps2dev = &psmouse->ps2dev; in byd_reset_touchpad() local
390 if (ps2_command(ps2dev, param, seq[i].command)) in byd_reset_touchpad()
437 struct ps2dev *ps2dev = &psmouse->ps2dev; in byd_detect() local
440 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES)) in byd_detect()
442 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES)) in byd_detect()
444 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES)) in byd_detect()
446 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES)) in byd_detect()
448 if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) in byd_detect()
Dlifebook.c201 struct ps2dev *ps2dev = &psmouse->ps2dev; in lifebook_absolute_mode() local
215 ps2_command(ps2dev, &param, PSMOUSE_CMD_SETRES); in lifebook_absolute_mode()
222 struct ps2dev *ps2dev = &psmouse->ps2dev; in lifebook_relative_mode() local
225 ps2_command(ps2dev, &param, PSMOUSE_CMD_SETRES); in lifebook_relative_mode()
237 ps2_command(&psmouse->ps2dev, &p, PSMOUSE_CMD_SETRES); in lifebook_set_resolution()
259 strcmp(psmouse->ps2dev.serio->phys, desired_serio_phys)) in lifebook_detect()
283 "%s/input1", psmouse->ps2dev.serio->phys); in lifebook_create_relative_device()
291 dev2->dev.parent = &psmouse->ps2dev.serio->dev; in lifebook_create_relative_device()
Dpsmouse.h92 struct ps2dev ps2dev; member
201 dev_dbg(&(psmouse)->ps2dev.serio->dev, \
204 dev_info(&(psmouse)->ps2dev.serio->dev, \
207 dev_warn(&(psmouse)->ps2dev.serio->dev, \
210 dev_err(&(psmouse)->ps2dev.serio->dev, \
213 dev_notice(&(psmouse)->ps2dev.serio->dev, \
217 &(psmouse)->ps2dev.serio->dev, \
Delantech.c38 if (ps2_sliced_command(&psmouse->ps2dev, c) || in synaptics_send_cmd()
39 ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_GETINFO)) { in synaptics_send_cmd()
53 struct ps2dev *ps2dev = &psmouse->ps2dev; in elantech_send_cmd() local
55 if (ps2_command(ps2dev, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_send_cmd()
56 ps2_command(ps2dev, NULL, c) || in elantech_send_cmd()
57 ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) { in elantech_send_cmd()
71 struct ps2dev *ps2dev = &psmouse->ps2dev; in elantech_ps2_command() local
77 rc = ps2_command(ps2dev, param, command); in elantech_ps2_command()
151 if (ps2_sliced_command(&psmouse->ps2dev, ETP_REGISTER_READ) || in elantech_read_reg()
152 ps2_sliced_command(&psmouse->ps2dev, reg) || in elantech_read_reg()
[all …]
Dsynaptics.c84 error = ps2_sliced_command(&psmouse->ps2dev, mode); in synaptics_mode_cmd()
89 error = ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_SETRATE); in synaptics_mode_cmd()
98 struct ps2dev *ps2dev = &psmouse->ps2dev; in synaptics_detect() local
101 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); in synaptics_detect()
102 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); in synaptics_detect()
103 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); in synaptics_detect()
104 ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); in synaptics_detect()
105 ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO); in synaptics_detect()
213 error = ps2_sliced_command(&psmouse->ps2dev, cmd); in synaptics_send_cmd()
217 error = ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_GETINFO); in synaptics_send_cmd()
[all …]
Dcypress_ps2.c40 struct ps2dev *ps2dev = &psmouse->ps2dev; in cypress_ps2_sendbyte() local
43 error = ps2_sendbyte(ps2dev, cmd, CYTP_CMD_TIMEOUT); in cypress_ps2_sendbyte()
47 cmd, ps2dev->nak, error); in cypress_ps2_sendbyte()
60 struct ps2dev *ps2dev = &psmouse->ps2dev; in cypress_ps2_ext_cmd() local
64 ps2_begin_command(ps2dev); in cypress_ps2_ext_cmd()
89 ps2_end_command(ps2dev); in cypress_ps2_ext_cmd()
142 error = ps2_command(&psmouse->ps2dev, param, ps2_cmd); in cypress_send_ext_cmd()
588 ps2_command(&psmouse->ps2dev, &rate_param, PSMOUSE_CMD_SETRATE); in cypress_set_rate()
Dpsmouse-smbus.c56 serio_rescan(smbdev->psmouse->ps2dev.serio); in psmouse_smbus_check_adapter()
81 &smbdev->psmouse->ps2dev.serio->dev); in psmouse_smbus_detach_i2c_client()
82 serio_rescan(smbdev->psmouse->ps2dev.serio); in psmouse_smbus_detach_i2c_client()
182 &psmouse->ps2dev.serio->dev); in psmouse_smbus_disconnect()
280 &psmouse->ps2dev.serio->dev, in psmouse_smbus_init()
Dvmmouse.c424 psmouse->ps2dev.serio->phys); in vmmouse_init()
435 abs_dev->dev.parent = &psmouse->ps2dev.serio->dev; in vmmouse_init()
Dtouchkit_ps2.c66 if (ps2_command(&psmouse->ps2dev, param, command)) in touchkit_ps2_detect()
/linux-6.12.1/drivers/input/keyboard/
Datkbd.c204 struct ps2dev ps2dev; member
314 struct ps2dev *ps2dev = serio_get_drvdata(serio); in atkbd_from_serio() local
316 return container_of(ps2dev, struct atkbd, ps2dev); in atkbd_from_serio()
406 static bool __maybe_unused atkbd_handle_frame_error(struct ps2dev *ps2dev, in atkbd_handle_frame_error() argument
409 struct atkbd *atkbd = container_of(ps2dev, struct atkbd, ps2dev); in atkbd_handle_frame_error()
410 struct serio *serio = ps2dev->serio; in atkbd_handle_frame_error()
427 static enum ps2_disposition atkbd_pre_receive_byte(struct ps2dev *ps2dev, in atkbd_pre_receive_byte() argument
430 struct serio *serio = ps2dev->serio; in atkbd_pre_receive_byte()
435 if (atkbd_handle_frame_error(ps2dev, data, flags)) in atkbd_pre_receive_byte()
442 static void atkbd_receive_byte(struct ps2dev *ps2dev, u8 data) in atkbd_receive_byte() argument
[all …]