Lines Matching defs: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 */
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)
206 switch (command) {
210 * reset command, reset is thus done, so we can
222 * the GET ID command as it were a mouse, with
223 * a single byte. Fail the command so atkbd will
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)
268 unsigned int send = (command >> 12) & 0xf;
269 unsigned int receive = (command >> 8) & 0xf;
290 switch (command) {
293 * Some mice do not ACK the "get ID" command, prepare to
311 /* Indicate that we expect response to the command. */
320 * ACKing the reset command, and so it can take a long
323 timeout = command == PS2_CMD_RESET_BAT ? 1000 : 200;
325 rc = ps2_do_sendbyte(ps2dev, command & 0xff, timeout, 2);
329 /* Send command parameters, if any. */
339 * The reset command takes a long time to execute.
341 timeout = msecs_to_jiffies(command == PS2_CMD_RESET_BAT ? 4000 : 500);
348 timeout = ps2_adjust_timeout(ps2dev, command, timeout);
362 (command != PS2_CMD_RESET_BAT || ps2dev->cmdcnt != 1)) {
375 command & 0xff, send, send_param,
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)
406 rc = __ps2_command(ps2dev, param, 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)
435 u8 d = (command >> i) & 3;
442 dev_dbg(&ps2dev->serio->dev, "%02x - %d\n", command, retval);
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.
536 * waiting for an ACK to the initial (first) command byte:
543 * for mice not acknowledging the Get ID command only triggers
590 * ps2_interrupt() invokes pre-receive handler, optionally handles command