From patchwork Wed Apr 9 10:36:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Poddar, Sourav" X-Patchwork-Id: 3954131 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 07F73BFF02 for ; Wed, 9 Apr 2014 10:37:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A5F220534 for ; Wed, 9 Apr 2014 10:37:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2DC8A20218 for ; Wed, 9 Apr 2014 10:36:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932712AbaDIKg6 (ORCPT ); Wed, 9 Apr 2014 06:36:58 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:43354 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932592AbaDIKg5 (ORCPT ); Wed, 9 Apr 2014 06:36:57 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s39Aartq023773; Wed, 9 Apr 2014 05:36:53 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s39Aaro9026735; Wed, 9 Apr 2014 05:36:53 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Wed, 9 Apr 2014 05:36:53 -0500 Received: from ula0131647.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s39Aaoig020706; Wed, 9 Apr 2014 05:36:51 -0500 From: Sourav Poddar To: , , , CC: Sourav Poddar , Felipe Balbi , Nishanth Menon Subject: [PATCHv2] i2c: omap: Disable default probing of i2c devices for omap i2c. Date: Wed, 9 Apr 2014 16:06:48 +0530 Message-ID: <1397039808-28594-1-git-send-email-sourav.poddar@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_SBL autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I2c core supports defualt probing functionality for devices not registered through dt/board files. If there are any client driver registered, i2c core will try to check if there is any device present corresponding to the address supplied by the client driver. If the device is actually present and not registered, core will register it, else the device default probe will fail and we get a omap i2c controller specific timeout messages. For example, Using multi_v7_config on omap5-uevm, CONFIG_SENSORS_LM90 and CONFIG_ICS932S401 is the driver which is enabled and gets registered. I2c core tries to find a valid corresponding device on each of the address supplied by registered driver, but could not find anyone. Hence, keep dumping the controller timeout speciic message. The patch tends to disable class based instantiation, default probing will not be attempted by the i2c-core for omap i2c. Device will always get registered through device tree(dt case) and board files(for non dt cases). Tested i2c enumeration and data transfer(using i2c utilities) with linux-next master on the following boards using omap2plus_defconfig: * Omap3 beagle-Xm (for dt and non dt case) * omap4 panda * omap5-uevm * Dra7xx * Beaglebone white * Beaglebone black * am335x-evm * AM43xx epos evm Tested i2c enumeration with linux-next master(except omap5) on the following boards using multi_v7_defconfig: * Omap3 beagle-Xm (for dt and non dt case) * omap4 panda * omap5-uevm (tested on next-20140131 tag, where i2c problem can be seen) * Dra7xx * Beaglebone white * Beaglebone black * am335x-evm * AM43xx epos evm Cc: Felipe Balbi Cc: Nishanth Menon Signed-off-by: Sourav Poddar Reported-by: Nishanth Menon --- v1->v2: add "Reported-by" attribute drivers/i2c/busses/i2c-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 85f8eac..4ec29a0 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1238,7 +1238,7 @@ omap_i2c_probe(struct platform_device *pdev) adap = &dev->adapter; i2c_set_adapdata(adap, dev); adap->owner = THIS_MODULE; - adap->class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED; + adap->class = 0; strlcpy(adap->name, "OMAP I2C adapter", sizeof(adap->name)); adap->algo = &omap_i2c_algo; adap->dev.parent = &pdev->dev;