Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp26083pxa; Wed, 26 Aug 2020 03:55:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYeSGBgJOve61cGXU/gP92VYzG/V8bjvvm3cT/8dHVWu68GsOgXuVOsb6VgLpC81bIRafE X-Received: by 2002:a05:6402:17d8:: with SMTP id s24mr13728433edy.61.1598439330072; Wed, 26 Aug 2020 03:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598439330; cv=none; d=google.com; s=arc-20160816; b=bnbh/leEn8iDFQqcGSnGC77fCmz7wbIOY4fluwAqeS3IUgxvzTk/eqgby6mMmSQxQW 79J4+Rbxj7JbFY8SVVHFrBPcNRQilOKcQ0q6L4XN2iFGEXR/sl4nb846ypCNoEPq/ML5 rOE0euVDrpszslJSbKDA+gNMO9gbsiwhwU6MPCdt0dGV4o41rWBg1MKto1vyrnpiznu3 SHF8/JopqHERkRCWhggl0fQeS9OIp82J5ucEIxErp+lzKtK5SnoERjKOsajaPgD8u4D4 +CYLa9TjIuV7v87P55GWMHcAWf127imFyy2NXZVbW++wz4bgTH0ZaTMuRo8kEqO6ZqJN YLLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=CnhHD6f0Q8J+JcVlI5A+YGEjrJyWZ+svp+KPoa6+O3c=; b=CAIanA3NJ7sOJmVPT3ztlTzClHyYm0APf29nAq3mkpGNkMHvQB1R3F4+3J2qy3NW0W kJmAcAozunIUC1U9ixLVuC1cZ3wdOroJK4wjmanXo2iJxJFZfMpVGOE7205YzL5F7xWn xjErvs/LXkQCrkMBl2mjObmm/qcHcuZFg1kvkW877JSj9zAnJzAjSxPuiEnPaAK6v0eR r4Oa64C4F41ahltcX4ZBLLg1r8D8FxlwJTdD6mpQVV/NP/Zkh+VpoTDDNEupgt5b/bki jDBPpNdJeeJ/ugs/q8oQ/js/CnENF3Pr4McbeU6qutIXxIgSezgGKQ6iNeiusjPBQ7Xo u8+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q22si1099279edr.304.2020.08.26.03.55.06; Wed, 26 Aug 2020 03:55:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728605AbgHZKye (ORCPT + 99 others); Wed, 26 Aug 2020 06:54:34 -0400 Received: from mga11.intel.com ([192.55.52.93]:18502 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727122AbgHZKyb (ORCPT ); Wed, 26 Aug 2020 06:54:31 -0400 IronPort-SDR: Ye1IpGSoaXH7e/xOJojUxbcCgcQsGh4QcYufxD19OJqdGHRQkmm0/l0qC+H6s7gtYGoGzbUwUt jzX4SSIe6QCQ== X-IronPort-AV: E=McAfee;i="6000,8403,9724"; a="153841061" X-IronPort-AV: E=Sophos;i="5.76,355,1592895600"; d="scan'208";a="153841061" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2020 03:54:31 -0700 IronPort-SDR: mgEodjz+6d20xaZrH90nyEZMnEV3Ido8z0JxOQ8gjYPl982Y2KFBIbdrnOx+wWwfggbwMoaIbg 2IDBuNrdvfag== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,355,1592895600"; d="scan'208";a="329182251" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008.jf.intel.com with ESMTP; 26 Aug 2020 03:54:28 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kAt4U-00BXuN-RC; Wed, 26 Aug 2020 13:54:26 +0300 Date: Wed, 26 Aug 2020 13:54:26 +0300 From: Andy Shevchenko To: Sergey Senozhatsky Cc: Wolfram Sang , Mika Westerberg , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing Message-ID: <20200826105426.GJ1891694@smile.fi.intel.com> References: <20200826042938.3259-1-sergey.senozhatsky@gmail.com> <20200826050851.GA1081@ninjato> <20200826052544.GA500@jagdpanzerIV.localdomain> <20200826095356.GG1891694@smile.fi.intel.com> <20200826095617.GH1891694@smile.fi.intel.com> <20200826102411.GC8849@jagdpanzerIV.localdomain> <20200826103807.GD8849@jagdpanzerIV.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200826103807.GD8849@jagdpanzerIV.localdomain> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 26, 2020 at 07:38:07PM +0900, Sergey Senozhatsky wrote: > On (20/08/26 19:24), Sergey Senozhatsky wrote: > > > But then the question is why we have this code in the ->probe() at all? > > > ->match() is run before probe by bus core, no? > > > > That's a good question. > > Everything seem to be working OK on my test board with this patch: I'm okay with it, but I want to hear Wolfram about this. If it gets a green light to go, feel free to add Reviewed-by: Andy Shevchenko > --- > > diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c > index 5ec082e2039d..77eea5c0bc71 100644 > --- a/drivers/i2c/i2c-core-base.c > +++ b/drivers/i2c/i2c-core-base.c > @@ -475,17 +475,6 @@ static int i2c_device_probe(struct device *dev) > > driver = to_i2c_driver(dev->driver); > > - /* > - * An I2C ID table is not mandatory, if and only if, a suitable OF > - * or ACPI ID table is supplied for the probing device. > - */ > - if (!driver->id_table && > - !acpi_driver_match_device(dev, dev->driver) && > - !i2c_of_match_device(dev->driver->of_match_table, client)) { > - status = -ENODEV; > - goto put_sync_adapter; > - } > - > if (client->flags & I2C_CLIENT_WAKE) { > int wakeirq; > -- With Best Regards, Andy Shevchenko