From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604AbcFJGcj (ORCPT ); Fri, 10 Jun 2016 02:32:39 -0400 Received: from mga11.intel.com ([192.55.52.93]:28677 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbcFJGch (ORCPT ); Fri, 10 Jun 2016 02:32:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,449,1459839600"; d="scan'208";a="716851149" Date: Fri, 10 Jun 2016 09:32:32 +0300 From: Mika Westerberg To: Crestez Dan Leonard Cc: linux-acpi@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , linux-i2c@vger.kernel.org, Wolfram Sang , linux-kernel@vger.kernel.org, Irina Tirdea , Octavian Purdila , Daniel Baluta Subject: Re: [RFC v2 2/2] i2c: Pass i2c_device_id to probe func when using DT ids through ACPI Message-ID: <20160610063232.GR1791@lahna.fi.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 09, 2016 at 04:06:03PM +0300, Crestez Dan Leonard wrote: > When devices are instatiated through devicetree the i2c_client->name is > set to the compatible string with company name stripped out. This is > then matched to the i2c_device_id table to pass the device_id to the > probe function. This id parameter is used by some device drivers to > differentiate between model numbers. > > When using ACPI this id parameter is NULL and the driver usually needs > to do ACPI-specific differentiation. > > This patch attempts to find a valid i2c_device_id when using ACPI with > DT-like compatible strings. So I don't really understand why it would be good idea to pass i2c_device_id for devices which are matched against their ACPI/DT tables. Apparently DT is already doing that so maybe there is some reason. Anyway, why not fill in the device name when it is first enumerated if it uses DT compatible property? Just like DT does.