Lines Matching full:command
37 #define PS2_FLAG_CMD BIT(1) /* Waiting for a command to finish */
38 #define PS2_FLAG_CMD1 BIT(2) /* Waiting for the first byte of command response */
39 #define PS2_FLAG_WAITID BIT(3) /* Command executing is GET ID */
123 * ps2_begin_command - mark beginning of execution of a complex command
124 * @ps2dev: a PS/2 device executing the command
126 * Serializes a complex/compound command. Once command is finished
138 * ps2_end_command - mark end of execution of a complex command
139 * @ps2dev: a PS/2 device executing the command
199 * ps2_adjust_timeout() is called after receiving 1st byte of command
200 * response and tries to reduce remaining timeout to speed up command
204 unsigned int command, unsigned int timeout) in ps2_adjust_timeout() argument
206 switch (command) { in ps2_adjust_timeout()
210 * reset command, reset is thus done, so we can in ps2_adjust_timeout()
222 * the GET ID command as it were a mouse, with in ps2_adjust_timeout()
223 * a single byte. Fail the command so atkbd will in ps2_adjust_timeout()
253 * __ps2_command - send a command to PS/2 device
254 * @ps2dev: the PS/2 device that should execute the command
255 * @param: a buffer containing parameters to be sent along with the command,
256 * or place where the results of the command execution will be deposited,
258 * @command: command word that encodes the command itself, as well as number of
260 * length of the command response
265 int __ps2_command(struct ps2dev *ps2dev, u8 *param, unsigned int command) in __ps2_command() argument
268 unsigned int send = (command >> 12) & 0xf; in __ps2_command()
269 unsigned int receive = (command >> 8) & 0xf; in __ps2_command()
290 switch (command) { in __ps2_command()
293 * Some mice do not ACK the "get ID" command, prepare to in __ps2_command()
311 /* Indicate that we expect response to the command. */ in __ps2_command()
320 * ACKing the reset command, and so it can take a long in __ps2_command()
323 timeout = command == PS2_CMD_RESET_BAT ? 1000 : 200; in __ps2_command()
325 rc = ps2_do_sendbyte(ps2dev, command & 0xff, timeout, 2); in __ps2_command()
329 /* Send command parameters, if any. */ in __ps2_command()
339 * The reset command takes a long time to execute. in __ps2_command()
341 timeout = msecs_to_jiffies(command == PS2_CMD_RESET_BAT ? 4000 : 500); in __ps2_command()
348 timeout = ps2_adjust_timeout(ps2dev, command, timeout); in __ps2_command()
362 (command != PS2_CMD_RESET_BAT || ps2dev->cmdcnt != 1)) { in __ps2_command()
375 command & 0xff, send, send_param, in __ps2_command()
388 * ps2_command - send a command to PS/2 device
389 * @ps2dev: the PS/2 device that should execute the command
390 * @param: a buffer containing parameters to be sent along with the command,
391 * or place where the results of the command execution will be deposited,
393 * @command: command word that encodes the command itself, as well as number of
395 * length of the command response
397 * Note: ps2_command() serializes the command execution so that only one
398 * command can be executed at a time for either individual port or the entire
401 int ps2_command(struct ps2dev *ps2dev, u8 *param, unsigned int command) in ps2_command() argument
406 rc = __ps2_command(ps2dev, param, command); in ps2_command()
414 * ps2_sliced_command - sends an extended PS/2 command to a mouse
415 * @ps2dev: the PS/2 device that should execute the command
416 * @command: command byte
418 * The command is sent using "sliced" syntax understood by advanced devices,
419 * such as Logitech or Synaptics touchpads. The command is encoded as:
421 * is the command.
423 int ps2_sliced_command(struct ps2dev *ps2dev, u8 command) in ps2_sliced_command() argument
435 u8 d = (command >> i) & 3; in ps2_sliced_command()
442 dev_dbg(&ps2dev->serio->dev, "%02x - %d\n", command, retval); in ps2_sliced_command()
473 * ps2_handle_response() stores device's response to a command and notifies
474 * the process waiting for completion of the command. Note that there is a
497 * ps2_handle_ack() processes ACK/NAK of a command from a PS/2 device,
499 * command.
522 * Workaround for mice which don't ACK the Get ID command. in ps2_handle_ack()
536 * waiting for an ACK to the initial (first) command byte: in ps2_handle_ack()
543 * for mice not acknowledging the Get ID command only triggers in ps2_handle_ack()
590 * ps2_interrupt() invokes pre-receive handler, optionally handles command