Revert "serial: max310x: fix IO data corruption in batched operations"
This reverts commit 59b3583da1 which is
commit 3f42b142ea1171967e40e10e4b0241c0d6d28d41 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I176b89e22005da00d9208b6e5ff2898e6b5ac9ee
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
43bbe91c9f
commit
0efa1aa851
1 changed files with 2 additions and 15 deletions
|
|
@ -533,11 +533,6 @@ static bool max310x_reg_precious(struct device *dev, unsigned int reg)
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool max310x_reg_noinc(struct device *dev, unsigned int reg)
|
||||
{
|
||||
return reg == MAX310X_RHR_REG;
|
||||
}
|
||||
|
||||
static int max310x_set_baud(struct uart_port *port, int baud)
|
||||
{
|
||||
unsigned int mode = 0, div = 0, frac = 0, c = 0, F = 0;
|
||||
|
|
@ -672,14 +667,14 @@ static void max310x_batch_write(struct uart_port *port, u8 *txbuf, unsigned int
|
|||
{
|
||||
struct max310x_one *one = to_max310x_port(port);
|
||||
|
||||
regmap_noinc_write(one->regmap, MAX310X_THR_REG, txbuf, len);
|
||||
regmap_raw_write(one->regmap, MAX310X_THR_REG, txbuf, len);
|
||||
}
|
||||
|
||||
static void max310x_batch_read(struct uart_port *port, u8 *rxbuf, unsigned int len)
|
||||
{
|
||||
struct max310x_one *one = to_max310x_port(port);
|
||||
|
||||
regmap_noinc_read(one->regmap, MAX310X_RHR_REG, rxbuf, len);
|
||||
regmap_raw_read(one->regmap, MAX310X_RHR_REG, rxbuf, len);
|
||||
}
|
||||
|
||||
static void max310x_handle_rx(struct uart_port *port, unsigned int rxlen)
|
||||
|
|
@ -1513,10 +1508,6 @@ static struct regmap_config regcfg = {
|
|||
.writeable_reg = max310x_reg_writeable,
|
||||
.volatile_reg = max310x_reg_volatile,
|
||||
.precious_reg = max310x_reg_precious,
|
||||
.writeable_noinc_reg = max310x_reg_noinc,
|
||||
.readable_noinc_reg = max310x_reg_noinc,
|
||||
.max_raw_read = MAX310X_FIFO_SIZE,
|
||||
.max_raw_write = MAX310X_FIFO_SIZE,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SPI_MASTER
|
||||
|
|
@ -1602,10 +1593,6 @@ static struct regmap_config regcfg_i2c = {
|
|||
.volatile_reg = max310x_reg_volatile,
|
||||
.precious_reg = max310x_reg_precious,
|
||||
.max_register = MAX310X_I2C_REVID_EXTREG,
|
||||
.writeable_noinc_reg = max310x_reg_noinc,
|
||||
.readable_noinc_reg = max310x_reg_noinc,
|
||||
.max_raw_read = MAX310X_FIFO_SIZE,
|
||||
.max_raw_write = MAX310X_FIFO_SIZE,
|
||||
};
|
||||
|
||||
static const struct max310x_if_cfg max310x_i2c_if_cfg = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue