Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp868120ybh; Wed, 18 Mar 2020 10:34:49 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvsJMm/auIWTmv/qNkWpK5vsQWTEdS19G8lyWD1Ec4Z3QLfrEAuvQAb7AZTpz45MMKbU1AT X-Received: by 2002:aca:ac89:: with SMTP id v131mr4117563oie.7.1584552889761; Wed, 18 Mar 2020 10:34:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584552889; cv=none; d=google.com; s=arc-20160816; b=MFMLJG02iAUcr0a/dDUrtgOcThZ9YWRsdFJWCZlgR0Ks/hSXeaGtcA95BgyDD6X7i+ E8YJnggDnUxvkqJnMrDGKdr7tUC1ch1VaE4klGHdJhfAOFmZ5YfEJTTYd4NrJ+hFLVkh duTdbI4MewZmPm/47TyjzRkye4lgWllaQUhLHAA87wdP1tjj/QOIpGNoORoJ6W+iKNaC 6SLHl9Hn9MPaX22b451aqgrF5yKUjaKZrnVRmRD7wSGMhyULFJwr9dxNO2HUaHDDIKpZ CkfugsF/9hAydN/zRnOz2hOMTyHWfe3uXIXuu0h7l8HxksaAInGZcpgeqgLeK4wu+tgv fd5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=55s4KdzIkIbrPk24SHC9GIhNl5gysbT015bgWowvoYE=; b=JxlpRvn6esQCKKs5KcUCIWMPSg7CcPMHltgAD8IBJ/6oKX2JkYtQWhiDe7roqvFDxG chxSHRDAyjAsc71vb6kG02EUNpRuyaLH0ddkBnnNdTv5dDZ6NGFSifzOoaQhwtAHTON4 XglRRBQ/+l5sZgeriGwMXM3GAaoNAcH0kqg20nLZcGyU7gpK21Np2DItjamwzpWQRoKK wC8TITQR5hWXKjs3QruXWpCJSMZWr8dbTZ7aq3/elnKQZet9+5Rz/d/YmU2N8cDdDjmq o6V42WGFcrD58wmtAZhysyCo7IfnbE1P7ecZTsNLNE6c0PenYX5N2iD42NTR0frOiynW +Pgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metafoo.de header.s=default2002 header.b=B0xM0xac; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=metafoo.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e19si3880069otp.40.2020.03.18.10.34.37; Wed, 18 Mar 2020 10:34:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@metafoo.de header.s=default2002 header.b=B0xM0xac; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=metafoo.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726783AbgCRReG (ORCPT + 99 others); Wed, 18 Mar 2020 13:34:06 -0400 Received: from www381.your-server.de ([78.46.137.84]:40248 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbgCRReG (ORCPT ); Wed, 18 Mar 2020 13:34:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=55s4KdzIkIbrPk24SHC9GIhNl5gysbT015bgWowvoYE=; b=B0xM0xac8I/sAY/v4Fy1CC5a1d IUZx+cRKdtENa8HeY/f41HzkgA37T0SiEPmsCqf92GOSYBIC/wzXZYqA+T8PsPMfgqFcqjp3Ba8Ln 0alyli/aojkBt9KY391U0dtUsPQnTvXT9zIlVsCC5bgULlR+Uxb67nKnV7kq6t7zAznYkwAQCHP7G 43VPflDV+bY3NloMR7c8wyLSE9TFDydqTX4iua24yizb7Nzb276m9+6MQ3YcwfnvGWumM1ePBMphQ yJkFBIhWW9oqEax/H4z+YZKFiaOBA0RlH0aPrSSF3OVZOaSwIFUvri2zVmlB5F9xyyYNUkcvWc7iC fCTCrmUA==; Received: from sslproxy05.your-server.de ([78.46.172.2]) by www381.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1jEcZr-0004ZL-PW; Wed, 18 Mar 2020 18:34:00 +0100 Received: from [93.104.115.49] (helo=[192.168.178.20]) by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEcZr-000P08-Fy; Wed, 18 Mar 2020 18:33:59 +0100 Subject: Re: [PATCH 2/3] iio: dac: ad5686: add of_match_table To: Michael Auchter , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler Cc: linux-pm@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200318153434.62833-1-michael.auchter@ni.com> <20200318153434.62833-2-michael.auchter@ni.com> From: Lars-Peter Clausen Message-ID: Date: Wed, 18 Mar 2020 18:33:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200318153434.62833-2-michael.auchter@ni.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.102.2/25755/Wed Mar 18 14:14:00 2020) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/18/20 4:34 PM, Michael Auchter wrote: > Add of_match_table to this driver, so devices can be probed based on > device tree contents. > > Signed-off-by: Michael Auchter > --- > drivers/iio/dac/ad5696-i2c.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/drivers/iio/dac/ad5696-i2c.c b/drivers/iio/dac/ad5696-i2c.c > index f100a5fe4219..26818bccffa2 100644 > --- a/drivers/iio/dac/ad5696-i2c.c > +++ b/drivers/iio/dac/ad5696-i2c.c > @@ -88,9 +88,28 @@ static const struct i2c_device_id ad5686_i2c_id[] = { > }; > MODULE_DEVICE_TABLE(i2c, ad5686_i2c_id); > > +static const struct of_device_id ad5686_of_match[] = { > + { .compatible = "adi,ad5311r" }, > + { .compatible = "adi,ad5671r" }, > + { .compatible = "adi,ad5675r" }, > + { .compatible = "adi,ad5691r" }, > + { .compatible = "adi,ad5692r" }, > + { .compatible = "adi,ad5693" }, > + { .compatible = "adi,ad5693r" }, > + { .compatible = "adi,ad5694" }, > + { .compatible = "adi,ad5694r" }, > + { .compatible = "adi,ad5695r" }, > + { .compatible = "adi,ad5696" }, > + { .compatible = "adi,ad5696r" }, > + { .compatible = "adi,ad5338r" }, Same here, table should be ordered. > + {} > +}; > +MODULE_DEVICE_TABLE(of, ad5686_of_match); > + > static struct i2c_driver ad5686_i2c_driver = { > .driver = { > .name = "ad5696", > + .of_match_table = of_match_ptr(ad5686_of_match), > }, > .probe = ad5686_i2c_probe, > .remove = ad5686_i2c_remove, >