Re: [PATCH v2 3/5] i2c: designware-baytrail: Only check iosf_mbi_available() for shared hosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 10-12-16 15:54, Andy Shevchenko wrote:
On Sat, 2016-12-10 at 15:19 +0100, Hans de Goede wrote:
There is no need to delay the probe if iosf_mbi_available() returns
false when an i2c bus is not using the punit semaphore.

--- a/drivers/i2c/busses/i2c-designware-baytrail.c
+++ b/drivers/i2c/busses/i2c-designware-baytrail.c
@@ -139,14 +139,14 @@ int i2c_dw_eval_lock_support(struct dw_i2c_dev
*dev)
 		return 0;

 	if (shared_host) {
+		if (!iosf_mbi_available())
+			return -EPROBE_DEFER;
+

Looking to the implementation of i2c_dw_eval_lock_support() I would
rewrite this like

if (!shared_host)
  return 0;

I had the same thought when writing this patch, so ack, will fix for v3.

Regards,

Hans




 		dev_info(dev->dev, "I2C bus managed by PUNIT\n");
 		dev->acquire_lock = baytrail_i2c_acquire;
 		dev->release_lock = baytrail_i2c_release;
 		dev->pm_runtime_disabled = true;
 	}

-	if (!iosf_mbi_available())
-		return -EPROBE_DEFER;
-
 	return 0;
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux