Lines Matching defs:read
227 #define MLXBF_I2C_MASTER_CTL_READ_BIT BIT(19) /* Control read phase. */
244 #define MLXBF_I2C_MASTER_READ_SHIFT 4 /* Control read bytes shift. */
250 /* Maximum bytes to read/write per SMBus transaction. */
577 * then read the cause and master status bits to determine if
672 u8 len, u8 block_en, u8 pec_en, bool read)
677 if (read) {
736 * a read sets the lock.
755 * Note that read and write operations might be handled by a
779 * We assume that read operations are performed only once per
781 * be executed twice? or return an error if we try to read more
824 * After a read operation the SMBus FSM ps (present state)
842 u8 read)
848 request->operation[0].flags |= read ? MLXBF_I2C_F_READ : 0;
852 u8 *data, bool read, bool pec_check)
860 request->operation[0].flags |= read ?
869 u8 *command, u8 *data, bool read, bool pec_check)
881 request->operation[1].flags = read ?
888 u8 *command, u8 *data, bool read, bool pec_check)
900 request->operation[1].flags = read ?
907 u8 *command, u8 *data, u8 *data_len, bool read,
919 * As specified in the standard, the max number of bytes to read/write
921 * read up to 128 bytes and write up to 127 bytes.
926 request->operation[1].flags = read ?
930 * to read/write.
936 /* Set the number of byte to read. This will be used by userspace. */
937 if (read)
943 bool read, bool pec_check)
957 request->operation[1].flags = read ?
963 /* Set the number of bytes to read. This will be used by userspace. */
964 if (read)
1577 * the byte order consistent with the value read in order to
1665 * the byte order consistent with the value read in order to
1816 static bool mlxbf_i2c_has_coalesce(struct mlxbf_i2c_priv *priv, bool *read,
1824 *read = false;
1839 *read = true;
1902 * I2C read transactions may start by a WRITE followed by a READ.
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);