* [PATCH] iio: si7020: Add devicetree support and trivial bindings @ 2016-10-25 19:20 Paul Kocialkowski [not found] ` <20161025192010.11195-1-contact-W9ppeneeCTY@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Paul Kocialkowski @ 2016-10-25 19:20 UTC (permalink / raw) To: devicetree, linux-kernel, linux-iio Cc: Rob Herring, Mark Rutland, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler, Paul Kocialkowski 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 <contact@paulk.fr> --- 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, }; -- 2.10.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <20161025192010.11195-1-contact-W9ppeneeCTY@public.gmane.org>]
* Re: [PATCH] iio: si7020: Add devicetree support and trivial bindings [not found] ` <20161025192010.11195-1-contact-W9ppeneeCTY@public.gmane.org> @ 2016-10-30 16:30 ` Jonathan Cameron 2016-10-31 3:09 ` Rob Herring 1 sibling, 0 replies; 3+ messages in thread From: Jonathan Cameron @ 2016-10-30 16:30 UTC (permalink / raw) To: Paul Kocialkowski, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA Cc: Rob Herring, Mark Rutland, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler 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 <contact-W9ppeneeCTY@public.gmane.org> 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, > }; > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: si7020: Add devicetree support and trivial bindings [not found] ` <20161025192010.11195-1-contact-W9ppeneeCTY@public.gmane.org> 2016-10-30 16:30 ` Jonathan Cameron @ 2016-10-31 3:09 ` Rob Herring 1 sibling, 0 replies; 3+ messages in thread From: Rob Herring @ 2016-10-31 3:09 UTC (permalink / raw) To: Paul Kocialkowski Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA, Mark Rutland, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler On Tue, Oct 25, 2016 at 09:20:10PM +0200, 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 <contact-W9ppeneeCTY@public.gmane.org> > --- > Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 + > drivers/iio/humidity/si7020.c | 11 ++++++++++- > 2 files changed, 11 insertions(+), 1 deletion(-) Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-31 3:09 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-25 19:20 [PATCH] iio: si7020: Add devicetree support and trivial bindings Paul Kocialkowski [not found] ` <20161025192010.11195-1-contact-W9ppeneeCTY@public.gmane.org> 2016-10-30 16:30 ` Jonathan Cameron 2016-10-31 3:09 ` Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).