Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf5b3f43

Browse files
cristiccwsakernel
authored andcommitted
i2c: owl: Clear NACK and BUS error bits
When the NACK and BUS error bits are set by the hardware, the driver isresponsible for clearing them by writing "1" into the correspondingstatus registers.Hence perform the necessary operations in owl_i2c_interrupt().Fixes:d211e62 ("i2c: Add Actions Semiconductor Owl family S900 I2C driver")Reported-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent5a02e7c commitf5b3f43

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎drivers/i2c/busses/i2c-owl.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,19 @@ static irqreturn_t owl_i2c_interrupt(int irq, void *_dev)
176176
fifostat=readl(i2c_dev->base+OWL_I2C_REG_FIFOSTAT);
177177
if (fifostat&OWL_I2C_FIFOSTAT_RNB) {
178178
i2c_dev->err=-ENXIO;
179+
/* Clear NACK error bit by writing "1" */
180+
owl_i2c_update_reg(i2c_dev->base+OWL_I2C_REG_FIFOSTAT,
181+
OWL_I2C_FIFOSTAT_RNB, true);
179182
gotostop;
180183
}
181184

182185
/* Handle bus error */
183186
stat=readl(i2c_dev->base+OWL_I2C_REG_STAT);
184187
if (stat&OWL_I2C_STAT_BEB) {
185188
i2c_dev->err=-EIO;
189+
/* Clear BUS error bit by writing "1" */
190+
owl_i2c_update_reg(i2c_dev->base+OWL_I2C_REG_STAT,
191+
OWL_I2C_STAT_BEB, true);
186192
gotostop;
187193
}
188194

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp