Lines Matching defs:read

220 #define MLXBF_I2C_MASTER_CTL_READ_BIT     BIT(19) /* Control read phase. */
237 #define MLXBF_I2C_MASTER_READ_SHIFT 4 /* Control read bytes */
243 /* Maximum bytes to read/write per SMBus transaction. */
591 * then read the cause and master status bits to determine if
697 u8 len, u8 block_en, u8 pec_en, bool read)
702 if (read) {
761 * a read sets the lock.
780 * Note that read and write operations might be handled by a
804 * We assume that read operations are performed only once per
806 * be executed twice? or return an error if we try to read more
849 * After a read operation the SMBus FSM ps (present state)
867 u8 read)
873 request->operation[0].flags |= read ? MLXBF_I2C_F_READ : 0;
877 u8 *data, bool read, bool pec_check)
885 request->operation[0].flags |= read ?
894 u8 *command, u8 *data, bool read, bool pec_check)
906 request->operation[1].flags = read ?
913 u8 *command, u8 *data, bool read, bool pec_check)
925 request->operation[1].flags = read ?
932 u8 *command, u8 *data, u8 *data_len, bool read,
944 * As specified in the standard, the max number of bytes to read/write
946 * read up to 128 bytes and write up to 127 bytes.
951 request->operation[1].flags = read ?
955 * to read/write.
961 /* Set the number of byte to read. This will be used by userspace. */
962 if (read)
968 bool read, bool pec_check)
982 request->operation[1].flags = read ?
988 /* Set the number of bytes to read. This will be used by userspace. */
989 if (read)
1594 * the byte order consistent with the value read in order to
1799 static bool mlxbf_i2c_has_coalesce(struct mlxbf_i2c_priv *priv, bool *read,
1807 *read = false;
1822 *read = true;
1862 * an external smbus master wants to read data from the BlueField.
1893 * An I2C read can consist of a WRITE bit transaction followed by
2016 bool read, write, irq_is_set;
2027 * Handle read/write transaction only. CRmaster and Iarp requests
2030 irq_is_set = mlxbf_i2c_has_coalesce(priv, &read, &write);
2031 if (!irq_is_set || (!read && !write)) {
2039 * 8 bits are set, then the master expect to read N bytes from the
2060 if (read)
2076 bool read, pec;
2081 read = (read_write == I2C_SMBUS_READ);
2086 mlxbf_i2c_smbus_quick_command(&request, read);
2092 read ? &data->byte : &command, read,
2095 read ? "read" : "write", addr);
2100 read, pec);
2102 read ? "read" : "write", command, addr);
2107 (u8 *)&data->word, read, pec);
2109 read ? "read" : "write", command, addr);
2115 &byte_cnt, read, pec);
2117 read ? "read" : "write", byte_cnt, command, addr);
2121 byte_cnt = read ? I2C_SMBUS_BLOCK_MAX : data->block[0];
2123 &byte_cnt, read, pec);
2125 read ? "read" : "write", byte_cnt, command, addr);