mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 00:26:47 +07:00
i2c: designware-baytrail: Only check iosf_mbi_available() for shared hosts
If (!shared_host) simply return 0, this avoids delaying the probe if iosf_mbi_available() returns false when an i2c bus is not using the punit semaphore. Also move the if (!iosf_mbi_available()) check to above the dev_info, so that we do not repeat the dev_info on every probe until iosf_mbi_available() returns true. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Tested-by: Takashi Iwai <tiwai@suse.de> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-6-hdegoede@redhat.com
This commit is contained in:
parent
62aee93753
commit
e234ed2f06
@ -138,15 +138,16 @@ int i2c_dw_eval_lock_support(struct dw_i2c_dev *dev)
|
||||
if (ACPI_FAILURE(status))
|
||||
return 0;
|
||||
|
||||
if (shared_host) {
|
||||
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 (!shared_host)
|
||||
return 0;
|
||||
|
||||
if (!iosf_mbi_available())
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
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;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user