From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751498AbcEJE5T (ORCPT ); Tue, 10 May 2016 00:57:19 -0400 Received: from lists.s-osg.org ([54.187.51.154]:38260 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750907AbcEJE5S (ORCPT ); Tue, 10 May 2016 00:57:18 -0400 Subject: Re: [PATCHv5 2/8] i2c: Add the ability to match device to compatible string without an of_node To: Kieran Bingham , Wolfram Sang , Lee Jones References: <1462374888-22888-1-git-send-email-kieran@bingham.xyz> <1462374888-22888-3-git-send-email-kieran@bingham.xyz> Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, grant.likely@linaro.org, sameo@linux.intel.com From: Javier Martinez Canillas Message-ID: <1f3d282d-bf2e-6622-59f6-ea3b42c095b9@osg.samsung.com> Date: Tue, 10 May 2016 00:57:07 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1462374888-22888-3-git-send-email-kieran@bingham.xyz> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/04/2016 11:14 AM, Kieran Bingham wrote: > From: Lee Jones > > A great deal of I2C devices are currently matched via DT node name, and > as such the compatible naming convention of ',' has gone > somewhat awry - some nodes don't supply one, some supply an arbitrary > string and others the correct device name with an arbitrary vendor prefix. > > In an effort to correct this problem we have to supply a mechanism to > match a device by compatible string AND by simple device name. This > function strips off the ',' part of a supplied compatible string > and attempts to match without it. > > The plan is to remove this function once all of the compatible strings > for each device have been brought into line. > > Acked-by: Grant Likely > Signed-off-by: Lee Jones > [Kieran: strnicmp to strncasecmp] > Signed-off-by: Kieran Bingham > Tested-by: Kieran Bingham > --- Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America