Commit 151167d8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull i2c fixes from Wolfram Sang:
 "i2c host fixes: PNX used the wrong unit for timeouts, Nomadik was
  missing a sentinel, and RIIC was missing rounding up"

* tag 'i2c-for-6.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: riic: Always round-up when calculating bus period
  i2c: nomadik: Add missing sentinel to match table
  i2c: pnx: Fix timeout in wait functions
parents dccbe204 5b6b08af
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;
	}