Skip to content

Commit 5b6b08a

Browse files
author
Wolfram Sang
committed
Merge tag 'i2c-host-fixes-6.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current
i2c-host-fixes for v6.13-rc3 - Replaced jiffies with msec for timeout calculations. - Added a sentinel to the 'of_device_id' array in Nomadik. - Rounded up bus period calculation in RIIC.
2 parents fac04ef + de6b437 commit 5b6b08a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

drivers/i2c/busses/i2c-nomadik.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,7 @@ static const struct of_device_id nmk_i2c_eyeq_match_table[] = {
10751075
.compatible = "mobileye,eyeq6h-i2c",
10761076
.data = (void *)NMK_I2C_EYEQ_FLAG_32B_BUS,
10771077
},
1078+
{ /* sentinel */ }
10781079
};
10791080

10801081
static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id)

drivers/i2c/busses/i2c-pnx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ enum {
9595

9696
static inline int wait_timeout(struct i2c_pnx_algo_data *data)
9797
{
98-
long timeout = data->timeout;
98+
long timeout = jiffies_to_msecs(data->timeout);
9999
while (timeout > 0 &&
100100
(ioread32(I2C_REG_STS(data)) & mstatus_active)) {
101101
mdelay(1);
@@ -106,7 +106,7 @@ static inline int wait_timeout(struct i2c_pnx_algo_data *data)
106106

107107
static inline int wait_reset(struct i2c_pnx_algo_data *data)
108108
{
109-
long timeout = data->timeout;
109+
long timeout = jiffies_to_msecs(data->timeout);
110110
while (timeout > 0 &&
111111
(ioread32(I2C_REG_CTL(data)) & mcntrl_reset)) {
112112
mdelay(1);

drivers/i2c/busses/i2c-riic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static int riic_init_hw(struct riic_dev *riic)
352352
if (brl <= (0x1F + 3))
353353
break;
354354

355-
total_ticks /= 2;
355+
total_ticks = DIV_ROUND_UP(total_ticks, 2);
356356
rate /= 2;
357357
}
358358

0 commit comments

Comments
 (0)