Commit 5b6b08af authored by Wolfram Sang's avatar Wolfram Sang
Browse files

Merge tag 'i2c-host-fixes-6.13-rc3' of...

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.
parents fac04efc de6b4379
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1075,6 +1075,7 @@ static const struct of_device_id nmk_i2c_eyeq_match_table[] = {
		.compatible = "mobileye,eyeq6h-i2c",
		.data = (void *)NMK_I2C_EYEQ_FLAG_32B_BUS,
	},
	{ /* sentinel */ }
};

static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id)
+2 −2
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ enum {

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

static inline int wait_reset(struct i2c_pnx_algo_data *data)
{
	long timeout = data->timeout;
	long timeout = jiffies_to_msecs(data->timeout);
	while (timeout > 0 &&
			(ioread32(I2C_REG_CTL(data)) & mcntrl_reset)) {
		mdelay(1);
+1 −1
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ static int riic_init_hw(struct riic_dev *riic)
		if (brl <= (0x1F + 3))
			break;

		total_ticks /= 2;
		total_ticks = DIV_ROUND_UP(total_ticks, 2);
		rate /= 2;
	}