Lines Matching refs:cmd
98 static int scd4x_send_command(struct scd4x_state *state, enum scd4x_cmd cmd) in scd4x_send_command() argument
107 if ((cmd != CMD_STOP_MEAS) && (cmd != CMD_START_MEAS)) { in scd4x_send_command()
117 put_unaligned_be16(cmd, buf); in scd4x_send_command()
122 if ((cmd != CMD_STOP_MEAS) && (cmd != CMD_START_MEAS)) { in scd4x_send_command()
131 static int scd4x_read(struct scd4x_state *state, enum scd4x_cmd cmd, in scd4x_read() argument
144 if ((cmd != CMD_GET_DATA_READY) && (cmd != CMD_READ_MEAS) && in scd4x_read()
145 (cmd != CMD_GET_AMB_PRESSURE)) { in scd4x_read()
157 put_unaligned_be16(cmd, buf); in scd4x_read()
174 if ((cmd != CMD_GET_DATA_READY) && (cmd != CMD_READ_MEAS) && in scd4x_read()
175 (cmd != CMD_GET_AMB_PRESSURE)) { in scd4x_read()
184 static int scd4x_write(struct scd4x_state *state, enum scd4x_cmd cmd, uint16_t arg) in scd4x_write() argument
190 put_unaligned_be16(cmd, buf); in scd4x_write()
197 if (cmd != CMD_SET_AMB_PRESSURE) { in scd4x_write()
211 if ((cmd != CMD_FRC) && (cmd != CMD_SET_AMB_PRESSURE)) { in scd4x_write()
220 static int scd4x_write_and_fetch(struct scd4x_state *state, enum scd4x_cmd cmd, in scd4x_write_and_fetch() argument