aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r--drivers/i2c/i2c-core.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 45aa0e54e297..b55097d57b7a 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -706,10 +706,6 @@ int i2c_probe(struct i2c_adapter *adapter,
706 int i, err; 706 int i, err;
707 int adap_id = i2c_adapter_id(adapter); 707 int adap_id = i2c_adapter_id(adapter);
708 708
709 /* Forget it if we can't probe using SMBUS_QUICK */
710 if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_QUICK))
711 return -1;
712
713 /* Force entries are done first, and are not affected by ignore 709 /* Force entries are done first, and are not affected by ignore
714 entries */ 710 entries */
715 if (address_data->forces) { 711 if (address_data->forces) {
@@ -736,6 +732,17 @@ int i2c_probe(struct i2c_adapter *adapter,
736 } 732 }
737 } 733 }
738 734
735 /* Stop here if we can't use SMBUS_QUICK */
736 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) {
737 if (address_data->probe[0] == I2C_CLIENT_END
738 && address_data->normal_i2c[0] == I2C_CLIENT_END)
739 return 0;
740
741 dev_warn(&adapter->dev, "SMBus Quick command not supported, "
742 "can't probe for chips\n");
743 return -1;
744 }
745
739 /* Probe entries are done second, and are not affected by ignore 746 /* Probe entries are done second, and are not affected by ignore
740 entries either */ 747 entries either */
741 for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) { 748 for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) {