Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4456037imu; Sat, 19 Jan 2019 09:46:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN5QEgWcDXAX0WptWiB5eAjrRPemW3bPJGzkeyZEi9JbBa4lkpJ65CmrBJvvvrqdLeJ9aSIM X-Received: by 2002:a17:902:45:: with SMTP id 63mr22841587pla.272.1547919965039; Sat, 19 Jan 2019 09:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547919965; cv=none; d=google.com; s=arc-20160816; b=jhrHfhhlR64txUtEdeY1eQfbudH7iYB7/kJzKtG90IsnRMkPPz6HdjAOAwkPxjek2o YiMatreieq+ii1UhBYz65ZepbCQzzBKb4jsnPUYPwxfokJC1vAakYy3F+5bFvyIZpctr MvJ13EPuJ0OWBec192IbUStKdVrbHoB8ByK8NYYFi477CjuZJ4+Pt9PR2VSy9yaoAMtH Bx2prTDdmMUJDHVmJHzBpm6ZuKldE/4Aiaw/JFIyw2pFb4hoErGElP4tvIUgbibtInPw IxthbjM5cHi0CqZw3gJoGkgMZJyqwSATzLGU9g1tSzHayficpEwrlSd3P8bEeq8bJN+J GuAw== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=pp3FtJ12uL+ZGkfbYb1UhGY1ToBVr5CmURTqg7GsvWs=; b=FeDGAbhfLsQRbpmLqD2SACSFbYncHjfJcaccwpLmUNTy+yPTlcxAqpUh7SKPb6Yyoh 0tedbxnCHtW/shn0U+LyI8v6NwGPaRlA+AI5JRim47qGbkSuHy+COb4CNHBkcxvd4ilH s1yHRkLaQBtRZi4ltE0UcJWpn3hdZxYCRFpyWgcrWAtQRH3qq41C09u3c278C4MMh89n c+EVPlgaZe3YSplXcbT7BwLW7vnPgXCBOjz7bJB0JwWA3r9JTk2oiTwdrNJppBUGaOzH YNxRkrMDbf4dV1r+/CiqaQXQg7+OL8fzoEcr5poRsHyViJEnNLdMTGhEERhpKVPEbuxI RX9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pXGykSWY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j35si798080pgl.223.2019.01.19.09.45.46; Sat, 19 Jan 2019 09:46:05 -0800 (PST) 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=pass header.i=@kernel.org header.s=default header.b=pXGykSWY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728855AbfASRoZ (ORCPT + 99 others); Sat, 19 Jan 2019 12:44:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:58068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728658AbfASRoZ (ORCPT ); Sat, 19 Jan 2019 12:44:25 -0500 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 33E9D2084F; Sat, 19 Jan 2019 17:44:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547919864; bh=TM35aWnH5m8UtndAVmOGbGnPUwbzCNoxZUtWLpUhstI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pXGykSWYvUkn1McjbodDAjjZ/gQc7yMwc3Og6TARvpKkuFv762UXr+k/BZEK045aA sYMQgStQMqFxgZrSe9gDA6Tj0QovDq6NEkDhj4nZxmBo7Ti4O5fxCtOtJOlEmNDF+v FRDQnNU4lmNxp1llVmrRSP5knDz0r+6ZKqvr4Icc= Date: Sat, 19 Jan 2019 17:44:18 +0000 From: Jonathan Cameron To: Himanshu Jha Cc: Sebastien Bourdelin , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, mark.rutland@arm.com, robh+dt@kernel.org, pmeerw@pmeerw.net, lars@metafoo.de, knaack.h@gmx.de Subject: Re: [PATCH v3 1/2] iio: chemical: bme680: Add device-tree support Message-ID: <20190119174418.32cb9a3f@archlinux> In-Reply-To: <20190115184713.GC10186@himanshu-Vostro-3559> References: <20190114201914.24572-1-sebastien.bourdelin@gmail.com> <20190115184713.GC10186@himanshu-Vostro-3559> 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=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Jan 2019 00:17:13 +0530 Himanshu Jha wrote: > On Mon, Jan 14, 2019 at 03:19:13PM -0500, Sebastien Bourdelin wrote: > > This commit allow the driver to work with device-tree. > > > > Signed-off-by: Sebastien Bourdelin > > --- > > Acked-by: Himanshu Jha Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it and see if we missed anything. Thanks, Jonathan > > Thanks! > > > v2 -> v3: > > - remove of_match_ptr: Suggested by Jonathan Cameron > > - minor style fixup > > - rebase on master > > v1 -> v2: > > - add missing of.h header in bme680_spi.c > > --- > > drivers/iio/chemical/bme680_i2c.c | 7 +++++++ > > drivers/iio/chemical/bme680_spi.c | 8 ++++++++ > > 2 files changed, 15 insertions(+) > > > > diff --git a/drivers/iio/chemical/bme680_i2c.c b/drivers/iio/chemical/bme680_i2c.c > > index 06d4be539d2e..b2f805b6b36a 100644 > > --- a/drivers/iio/chemical/bme680_i2c.c > > +++ b/drivers/iio/chemical/bme680_i2c.c > > @@ -70,10 +70,17 @@ static const struct acpi_device_id bme680_acpi_match[] = { > > }; > > MODULE_DEVICE_TABLE(acpi, bme680_acpi_match); > > > > +static const struct of_device_id bme680_of_i2c_match[] = { > > + { .compatible = "bosch,bme680", }, > > + {}, > > +}; > > +MODULE_DEVICE_TABLE(of, bme680_of_i2c_match); > > + > > static struct i2c_driver bme680_i2c_driver = { > > .driver = { > > .name = "bme680_i2c", > > .acpi_match_table = ACPI_PTR(bme680_acpi_match), > > + .of_match_table = bme680_of_i2c_match, > > }, > > .probe = bme680_i2c_probe, > > .id_table = bme680_i2c_id, > > diff --git a/drivers/iio/chemical/bme680_spi.c b/drivers/iio/chemical/bme680_spi.c > > index c9fb05e8d0b9..d0b7bdd3f066 100644 > > --- a/drivers/iio/chemical/bme680_spi.c > > +++ b/drivers/iio/chemical/bme680_spi.c > > @@ -6,6 +6,7 @@ > > */ > > #include > > #include > > +#include > > #include > > #include > > > > @@ -110,10 +111,17 @@ static const struct acpi_device_id bme680_acpi_match[] = { > > }; > > MODULE_DEVICE_TABLE(acpi, bme680_acpi_match); > > > > +static const struct of_device_id bme680_of_spi_match[] = { > > + { .compatible = "bosch,bme680", }, > > + {}, > > +}; > > +MODULE_DEVICE_TABLE(of, bme680_of_spi_match); > > + > > static struct spi_driver bme680_spi_driver = { > > .driver = { > > .name = "bme680_spi", > > .acpi_match_table = ACPI_PTR(bme680_acpi_match), > > + .of_match_table = bme680_of_spi_match, > > }, > > .probe = bme680_spi_probe, > > .id_table = bme680_spi_id, > > -- > > 2.20.1 > > >