From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68256C072AD for ; Sun, 19 May 2019 17:07:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3DCD4205ED for ; Sun, 19 May 2019 17:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558285643; bh=EWgtkwVlfGD1NpiyhG72Pl8PdGw5ndsf4DuG+VXBfoQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=uT9o2Kp1PBK/RtTER+Hn3aXp9Mb5MTuZJNDIpDnQn4803WhZZG7GwIvanSL3Z4/c+ vJ2IMaCAwYrt/deVJ92M24gZKmgCFf0xpB61yu90mgQ29cUNZQa44p/psgIzLDPyak XAszn40we2xdktdAgg5KIHNqr0r2TGUSnql91I/Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726976AbfESRHW (ORCPT ); Sun, 19 May 2019 13:07:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:58244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbfESRHV (ORCPT ); Sun, 19 May 2019 13:07:21 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 261A121773; Sun, 19 May 2019 11:09:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558264144; bh=EWgtkwVlfGD1NpiyhG72Pl8PdGw5ndsf4DuG+VXBfoQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SU6WiHoGoZwJA0tSPSr8Ct/WNAg1LtBoU6srRdyCmijlkebPylyz4FaGaB3XPni5e 3IYxkD1ZBKMrCjjzwLIpMg3xsk8CW+vwXEt/hC9rVDq4QVdm95e5JGj05RMiX1jJZn KruLdpWUU8gLN7dBNDKMrc8SYGvZisuKG077+660= Date: Sun, 19 May 2019 12:09:00 +0100 From: Jonathan Cameron To: =?UTF-8?B?Sm/Do28=?= Seckler Cc: Lars-Peter Clausen , Michael Hennerich , Stefan Popa , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: iio: ad7746: add device tree support Message-ID: <20190519120900.3bef9481@archlinux> In-Reply-To: <20190519120250.4644c255@archlinux> References: <20190518222733.2ttcgvy7fct4awra@smtp.gmail.com> <20190519120250.4644c255@archlinux> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 19 May 2019 12:02:50 +0100 Jonathan Cameron wrote: > On Sat, 18 May 2019 19:27:33 -0300 > Jo=C3=A3o Seckler wrote: >=20 > > Add a of_device_id struct variable and subsequent call to > > MODULE_DEVICE_TABLE macro to support device tree. > >=20 > > Signed-off-by: Jo=C3=A3o Seckler > > Signed-off-by: Lucas Oshiro > > Co-developed-by: Lucas Oshiro =20 > Applied to the togreg branch of iio.git and pushed out as testing > for the autobuilders to play with it. >=20 > For a future improvement, try to explain the 'why' rather than > 'what' of a patch in the description. This particular change > is so common I don't mind that much, but it is a good habit to > get into! Ah, you do say to support device tree at the end, but more detail on that would have been good! Thanks, J >=20 > Thanks, >=20 > Jonathan > > --- > > drivers/staging/iio/cdc/ad7746.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > >=20 > > diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc= /ad7746.c > > index 47610d863908..21527d84f940 100644 > > --- a/drivers/staging/iio/cdc/ad7746.c > > +++ b/drivers/staging/iio/cdc/ad7746.c > > @@ -748,9 +748,19 @@ static const struct i2c_device_id ad7746_id[] =3D { > > =20 > > MODULE_DEVICE_TABLE(i2c, ad7746_id); > > =20 > > +static const struct of_device_id ad7746_of_match[] =3D { > > + { .compatible =3D "adi,ad7745" }, > > + { .compatible =3D "adi,ad7746" }, > > + { .compatible =3D "adi,ad7747" }, > > + { }, > > +}; > > + > > +MODULE_DEVICE_TABLE(of, ad7746_of_match); > > + > > static struct i2c_driver ad7746_driver =3D { > > .driver =3D { > > .name =3D KBUILD_MODNAME, > > + .of_match_table =3D ad7746_of_match, > > }, > > .probe =3D ad7746_probe, > > .id_table =3D ad7746_id, =20 >=20