f7_msg 296 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg f7_msg; f7_msg 666 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 669 drivers/i2c/busses/i2c-stm32f7.c if (f7_msg->count) { f7_msg 670 drivers/i2c/busses/i2c-stm32f7.c writeb_relaxed(*f7_msg->buf++, base + STM32F7_I2C_TXDR); f7_msg 671 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count--; f7_msg 677 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 680 drivers/i2c/busses/i2c-stm32f7.c if (f7_msg->count) { f7_msg 681 drivers/i2c/busses/i2c-stm32f7.c *f7_msg->buf++ = readb_relaxed(base + STM32F7_I2C_RXDR); f7_msg 682 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count--; f7_msg 691 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 695 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count -= STM32F7_I2C_MAX_LEN; f7_msg 700 drivers/i2c/busses/i2c-stm32f7.c if (f7_msg->count > STM32F7_I2C_MAX_LEN) { f7_msg 704 drivers/i2c/busses/i2c-stm32f7.c cr2 |= STM32F7_I2C_CR2_NBYTES(f7_msg->count); f7_msg 712 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 725 drivers/i2c/busses/i2c-stm32f7.c val = f7_msg->buf - sizeof(u8); f7_msg 726 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = *val; f7_msg 729 drivers/i2c/busses/i2c-stm32f7.c cr2 |= STM32F7_I2C_CR2_NBYTES(f7_msg->count); f7_msg 773 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 778 drivers/i2c/busses/i2c-stm32f7.c f7_msg->addr = msg->addr; f7_msg 779 drivers/i2c/busses/i2c-stm32f7.c f7_msg->buf = msg->buf; f7_msg 780 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = msg->len; f7_msg 781 drivers/i2c/busses/i2c-stm32f7.c f7_msg->result = 0; f7_msg 782 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = (i2c_dev->msg_id >= i2c_dev->msg_num - 1); f7_msg 798 drivers/i2c/busses/i2c-stm32f7.c cr2 |= STM32F7_I2C_CR2_SADD10(f7_msg->addr); f7_msg 802 drivers/i2c/busses/i2c-stm32f7.c cr2 |= STM32F7_I2C_CR2_SADD7(f7_msg->addr); f7_msg 807 drivers/i2c/busses/i2c-stm32f7.c if (f7_msg->count > STM32F7_I2C_MAX_LEN) { f7_msg 811 drivers/i2c/busses/i2c-stm32f7.c cr2 |= STM32F7_I2C_CR2_NBYTES(f7_msg->count); f7_msg 824 drivers/i2c/busses/i2c-stm32f7.c if (i2c_dev->dma && f7_msg->count >= STM32F7_I2C_DMA_LEN_MIN) { f7_msg 827 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count, f7_msg->buf, f7_msg 862 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 868 drivers/i2c/busses/i2c-stm32f7.c f7_msg->result = 0; f7_msg 876 drivers/i2c/busses/i2c-stm32f7.c if (f7_msg->read_write) f7_msg 881 drivers/i2c/busses/i2c-stm32f7.c cr2 |= STM32F7_I2C_CR2_SADD7(f7_msg->addr); f7_msg 883 drivers/i2c/busses/i2c-stm32f7.c f7_msg->smbus_buf[0] = command; f7_msg 884 drivers/i2c/busses/i2c-stm32f7.c switch (f7_msg->size) { f7_msg 886 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = true; f7_msg 887 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = 0; f7_msg 890 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = true; f7_msg 891 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = 1; f7_msg 894 drivers/i2c/busses/i2c-stm32f7.c if (f7_msg->read_write) { f7_msg 895 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = false; f7_msg 896 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = 1; f7_msg 899 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = true; f7_msg 900 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = 2; f7_msg 901 drivers/i2c/busses/i2c-stm32f7.c f7_msg->smbus_buf[1] = data->byte; f7_msg 905 drivers/i2c/busses/i2c-stm32f7.c if (f7_msg->read_write) { f7_msg 906 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = false; f7_msg 907 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = 1; f7_msg 910 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = true; f7_msg 911 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = 3; f7_msg 912 drivers/i2c/busses/i2c-stm32f7.c f7_msg->smbus_buf[1] = data->word & 0xff; f7_msg 913 drivers/i2c/busses/i2c-stm32f7.c f7_msg->smbus_buf[2] = data->word >> 8; f7_msg 917 drivers/i2c/busses/i2c-stm32f7.c if (f7_msg->read_write) { f7_msg 918 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = false; f7_msg 919 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = 1; f7_msg 922 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = true; f7_msg 929 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = data->block[0] + 2; f7_msg 930 drivers/i2c/busses/i2c-stm32f7.c for (i = 1; i < f7_msg->count; i++) f7_msg 931 drivers/i2c/busses/i2c-stm32f7.c f7_msg->smbus_buf[i] = data->block[i - 1]; f7_msg 935 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = false; f7_msg 936 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = 3; f7_msg 937 drivers/i2c/busses/i2c-stm32f7.c f7_msg->smbus_buf[1] = data->word & 0xff; f7_msg 938 drivers/i2c/busses/i2c-stm32f7.c f7_msg->smbus_buf[2] = data->word >> 8; f7_msg 940 drivers/i2c/busses/i2c-stm32f7.c f7_msg->read_write = I2C_SMBUS_READ; f7_msg 943 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = false; f7_msg 949 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = data->block[0] + 2; f7_msg 950 drivers/i2c/busses/i2c-stm32f7.c for (i = 1; i < f7_msg->count; i++) f7_msg 951 drivers/i2c/busses/i2c-stm32f7.c f7_msg->smbus_buf[i] = data->block[i - 1]; f7_msg 953 drivers/i2c/busses/i2c-stm32f7.c f7_msg->read_write = I2C_SMBUS_READ; f7_msg 959 drivers/i2c/busses/i2c-stm32f7.c dev_err(dev, "Unsupported smbus protocol %d\n", f7_msg->size); f7_msg 963 drivers/i2c/busses/i2c-stm32f7.c f7_msg->buf = f7_msg->smbus_buf; f7_msg 966 drivers/i2c/busses/i2c-stm32f7.c if ((flags & I2C_CLIENT_PEC) && f7_msg->size != I2C_SMBUS_QUICK) { f7_msg 969 drivers/i2c/busses/i2c-stm32f7.c if (!f7_msg->read_write) f7_msg 970 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count++; f7_msg 978 drivers/i2c/busses/i2c-stm32f7.c cr2 |= STM32F7_I2C_CR2_NBYTES(f7_msg->count); f7_msg 990 drivers/i2c/busses/i2c-stm32f7.c if (i2c_dev->dma && f7_msg->count >= STM32F7_I2C_DMA_LEN_MIN) { f7_msg 993 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count, f7_msg->buf, f7_msg 1028 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 1039 drivers/i2c/busses/i2c-stm32f7.c switch (f7_msg->size) { f7_msg 1041 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = 1; f7_msg 1045 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = 2; f7_msg 1049 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count = 1; f7_msg 1054 drivers/i2c/busses/i2c-stm32f7.c f7_msg->buf = f7_msg->smbus_buf; f7_msg 1055 drivers/i2c/busses/i2c-stm32f7.c f7_msg->stop = true; f7_msg 1059 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count++; f7_msg 1063 drivers/i2c/busses/i2c-stm32f7.c cr2 |= STM32F7_I2C_CR2_NBYTES(f7_msg->count); f7_msg 1080 drivers/i2c/busses/i2c-stm32f7.c if (i2c_dev->dma && f7_msg->count >= STM32F7_I2C_DMA_LEN_MIN && f7_msg 1081 drivers/i2c/busses/i2c-stm32f7.c f7_msg->size != I2C_SMBUS_BLOCK_DATA && f7_msg 1082 drivers/i2c/busses/i2c-stm32f7.c f7_msg->size != I2C_SMBUS_BLOCK_PROC_CALL) { f7_msg 1085 drivers/i2c/busses/i2c-stm32f7.c f7_msg->count, f7_msg->buf, f7_msg 1110 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 1115 drivers/i2c/busses/i2c-stm32f7.c switch (f7_msg->size) { f7_msg 1118 drivers/i2c/busses/i2c-stm32f7.c received_pec = f7_msg->smbus_buf[1]; f7_msg 1122 drivers/i2c/busses/i2c-stm32f7.c received_pec = f7_msg->smbus_buf[2]; f7_msg 1126 drivers/i2c/busses/i2c-stm32f7.c count = f7_msg->smbus_buf[0]; f7_msg 1127 drivers/i2c/busses/i2c-stm32f7.c received_pec = f7_msg->smbus_buf[count]; f7_msg 1387 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 1412 drivers/i2c/busses/i2c-stm32f7.c f7_msg->result = -ENXIO; f7_msg 1437 drivers/i2c/busses/i2c-stm32f7.c if (f7_msg->stop) { f7_msg 1442 drivers/i2c/busses/i2c-stm32f7.c } else if (f7_msg->smbus) { f7_msg 1452 drivers/i2c/busses/i2c-stm32f7.c if (f7_msg->smbus) f7_msg 1464 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 1478 drivers/i2c/busses/i2c-stm32f7.c f7_msg->result = -ETIMEDOUT; f7_msg 1484 drivers/i2c/busses/i2c-stm32f7.c if (f7_msg->smbus) { f7_msg 1502 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 1515 drivers/i2c/busses/i2c-stm32f7.c f7_msg->result = -EIO; f7_msg 1522 drivers/i2c/busses/i2c-stm32f7.c f7_msg->result = -EAGAIN; f7_msg 1528 drivers/i2c/busses/i2c-stm32f7.c f7_msg->result = -EINVAL; f7_msg 1557 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 1565 drivers/i2c/busses/i2c-stm32f7.c f7_msg->smbus = false; f7_msg 1579 drivers/i2c/busses/i2c-stm32f7.c ret = f7_msg->result; f7_msg 1602 drivers/i2c/busses/i2c-stm32f7.c struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg; f7_msg 1608 drivers/i2c/busses/i2c-stm32f7.c f7_msg->addr = addr; f7_msg 1609 drivers/i2c/busses/i2c-stm32f7.c f7_msg->size = size; f7_msg 1610 drivers/i2c/busses/i2c-stm32f7.c f7_msg->read_write = read_write; f7_msg 1611 drivers/i2c/busses/i2c-stm32f7.c f7_msg->smbus = true; f7_msg 1627 drivers/i2c/busses/i2c-stm32f7.c ret = f7_msg->result; f7_msg 1632 drivers/i2c/busses/i2c-stm32f7.c dev_dbg(dev, "Access to slave 0x%x timed out\n", f7_msg->addr); f7_msg 1650 drivers/i2c/busses/i2c-stm32f7.c data->byte = f7_msg->smbus_buf[0]; f7_msg 1654 drivers/i2c/busses/i2c-stm32f7.c data->word = f7_msg->smbus_buf[0] | f7_msg 1655 drivers/i2c/busses/i2c-stm32f7.c (f7_msg->smbus_buf[1] << 8); f7_msg 1659 drivers/i2c/busses/i2c-stm32f7.c for (i = 0; i <= f7_msg->smbus_buf[0]; i++) f7_msg 1660 drivers/i2c/busses/i2c-stm32f7.c data->block[i] = f7_msg->smbus_buf[i];