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 */
121 * ps2_begin_command - mark beginning of execution of a complex command
122 * @ps2dev: a PS/2 device executing the command
124 * Serializes a complex/compound command. Once command is finished
136 * ps2_end_command - mark end of execution of a complex command
137 * @ps2dev: a PS/2 device executing the command
197 * ps2_adjust_timeout() is called after receiving 1st byte of command
198 * response and tries to reduce remaining timeout to speed up command
202 unsigned int command, unsigned int timeout) in ps2_adjust_timeout() argument
204 switch (command) { in ps2_adjust_timeout()
208 * reset command, reset is thus done, so we can in ps2_adjust_timeout()
220 * the GET ID command as it were a mouse, with in ps2_adjust_timeout()
221 * a single byte. Fail the command so atkbd will in ps2_adjust_timeout()
251 * __ps2_command - send a command to PS/2 device
252 * @ps2dev: the PS/2 device that should execute the command
253 * @param: a buffer containing parameters to be sent along with the command,
254 * or place where the results of the command execution will be deposited,
256 * @command: command word that encodes the command itself, as well as number of
258 * length of the command response
263 int __ps2_command(struct ps2dev *ps2dev, u8 *param, unsigned int command) in __ps2_command() argument
266 unsigned int send = (command >> 12) & 0xf; in __ps2_command()
267 unsigned int receive = (command >> 8) & 0xf; in __ps2_command()
292 switch (command) { in __ps2_command()
295 * Some mice do not ACK the "get ID" command, prepare to in __ps2_command()
313 /* Indicate that we expect response to the command. */ in __ps2_command()
322 * ACKing the reset command, and so it can take a long in __ps2_command()
325 timeout = command == PS2_CMD_RESET_BAT ? 1000 : 200; in __ps2_command()
327 rc = ps2_do_sendbyte(ps2dev, command & 0xff, timeout, 2); in __ps2_command()
331 /* Send command parameters, if any. */ in __ps2_command()
341 * The reset command takes a long time to execute. in __ps2_command()
343 timeout = msecs_to_jiffies(command == PS2_CMD_RESET_BAT ? 4000 : 500); in __ps2_command()
350 timeout = ps2_adjust_timeout(ps2dev, command, timeout); in __ps2_command()
364 (command != PS2_CMD_RESET_BAT || ps2dev->cmdcnt != 1)) { in __ps2_command()
377 command & 0xff, send, send_param, in __ps2_command()
390 * ps2_command - send a command to PS/2 device
391 * @ps2dev: the PS/2 device that should execute the command
392 * @param: a buffer containing parameters to be sent along with the command,
393 * or place where the results of the command execution will be deposited,
395 * @command: command word that encodes the command itself, as well as number of
397 * length of the command response
399 * Note: ps2_command() serializes the command execution so that only one
400 * command can be executed at a time for either individual port or the entire
403 int ps2_command(struct ps2dev *ps2dev, u8 *param, unsigned int command) in ps2_command() argument
408 rc = __ps2_command(ps2dev, param, command); in ps2_command()
416 * ps2_sliced_command - sends an extended PS/2 command to a mouse
417 * @ps2dev: the PS/2 device that should execute the command
418 * @command: command byte
420 * The command is sent using "sliced" syntax understood by advanced devices,
421 * such as Logitech or Synaptics touchpads. The command is encoded as:
423 * is the command.
425 int ps2_sliced_command(struct ps2dev *ps2dev, u8 command) in ps2_sliced_command() argument
437 u8 d = (command >> i) & 3; in ps2_sliced_command()
444 dev_dbg(&ps2dev->serio->dev, "%02x - %d\n", command, retval); in ps2_sliced_command()
475 * ps2_handle_response() stores device's response to a command and notifies
476 * the process waiting for completion of the command. Note that there is a
499 * ps2_handle_ack() processes ACK/NAK of a command from a PS/2 device,
501 * command.
524 * Workaround for mice which don't ACK the Get ID command. in ps2_handle_ack()
538 * waiting for an ACK to the initial (first) command byte: in ps2_handle_ack()
545 * for mice not acknowledging the Get ID command only triggers in ps2_handle_ack()
592 * ps2_interrupt() invokes pre-receive handler, optionally handles command