Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1670944 > unrolled thread

Re: [PATCH v2 3/3] iio: humidity: hdc100x: add match table and device id's

Started byJonathan Cameron <jic23@kernel.org>
First post2017-06-20 18:50 +0200
Last post2017-06-20 18:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 3/3] iio: humidity: hdc100x: add match table and  device id's Jonathan Cameron <jic23@kernel.org> - 2017-06-20 18:50 +0200

#1670944 — Re: [PATCH v2 3/3] iio: humidity: hdc100x: add match table and device id's

FromJonathan Cameron <jic23@kernel.org>
Date2017-06-20 18:50 +0200
SubjectRe: [PATCH v2 3/3] iio: humidity: hdc100x: add match table and device id's
Message-ID<tUuvN-2D0-19@gated-at.bofh.it>
On Mon, 19 Jun 2017 11:01:06 -0500
Michael Stecklein <m-stecklein@ti.com> wrote:

> Add of_match_table and point it to a list of compatible device tree
> device id's.
> 
> Signed-off-by: Michael Stecklein <m-stecklein@ti.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/iio/humidity/hdc100x.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
> index 6778bc7..7851bd9 100644
> --- a/drivers/iio/humidity/hdc100x.c
> +++ b/drivers/iio/humidity/hdc100x.c
> @@ -429,9 +429,20 @@ static const struct i2c_device_id hdc100x_id[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, hdc100x_id);
>  
> +static const struct of_device_id hdc100x_dt_ids[] = {
> +	{ .compatible = "ti,hdc1000" },
> +	{ .compatible = "ti,hdc1008" },
> +	{ .compatible = "ti,hdc1010" },
> +	{ .compatible = "ti,hdc1050" },
> +	{ .compatible = "ti,hdc1080" },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, hdc100x_dt_ids);
> +
>  static struct i2c_driver hdc100x_driver = {
>  	.driver = {
>  		.name	= "hdc100x",
> +		.of_match_table = of_match_ptr(hdc100x_dt_ids),
>  	},
>  	.probe = hdc100x_probe,
>  	.remove = hdc100x_remove,

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web