Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757081AbcJ3QaN (ORCPT ); Sun, 30 Oct 2016 12:30:13 -0400 Received: from saturn.retrosnub.co.uk ([178.18.118.26]:42827 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756748AbcJ3QaK (ORCPT ); Sun, 30 Oct 2016 12:30:10 -0400 Subject: Re: [PATCH] iio: si7020: Add devicetree support and trivial bindings To: Paul Kocialkowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org References: <20161025192010.11195-1-contact@paulk.fr> Cc: Rob Herring , Mark Rutland , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler From: Jonathan Cameron Message-ID: <5c6795ad-85ce-3dd5-638b-f87f8240775a@kernel.org> Date: Sun, 30 Oct 2016 16:30:07 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161025192010.11195-1-contact@paulk.fr> 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 Content-Length: 2121 Lines: 53 On 25/10/16 20:20, Paul Kocialkowski wrote: > This adds devicetree support for the si7020 iio driver. Since it works > well without requiring any additional property, its compatible string is > added to the trivial i2c devices bindings list. > > Signed-off-by: Paul Kocialkowski Applied to the togreg branch of iio.git - initially pushed out as tesitng for the autobuilders to play with it. Thanks, Jonathan > --- > Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 + > drivers/iio/humidity/si7020.c | 11 ++++++++++- > 2 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt > index 5c70ce9..6afba26 100644 > --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt > +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt > @@ -145,6 +145,7 @@ ricoh,rv5c387a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC > samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power) > sgx,vz89x SGX Sensortech VZ89X Sensors > sii,s35390a 2-wire CMOS real-time clock > +silabs,si7020 Relative Humidity and Temperature Sensors > skyworks,sky81452 Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply > st,24c256 i2c serial eeprom (24cxx) > st,m41t00 Serial real-time clock (RTC) > diff --git a/drivers/iio/humidity/si7020.c b/drivers/iio/humidity/si7020.c > index ffc2ccf..345a765 100644 > --- a/drivers/iio/humidity/si7020.c > +++ b/drivers/iio/humidity/si7020.c > @@ -154,8 +154,17 @@ static const struct i2c_device_id si7020_id[] = { > }; > MODULE_DEVICE_TABLE(i2c, si7020_id); > > +static const struct of_device_id si7020_dt_ids[] = { > + { .compatible = "silabs,si7020" }, > + { } > +}; > +MODULE_DEVICE_TABLE(of, si7020_dt_ids); > + > static struct i2c_driver si7020_driver = { > - .driver.name = "si7020", > + .driver = { > + .name = "si7020", > + .of_match_table = of_match_ptr(si7020_dt_ids), > + }, > .probe = si7020_probe, > .id_table = si7020_id, > }; >