Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1682785 > unrolled thread
| Started by | Brian Masney <masneyb@onstation.org> |
|---|---|
| First post | 2017-07-07 01:00 +0200 |
| Last post | 2017-07-09 19:20 +0200 |
| Articles | 2 — 2 participants |
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.
[PATCH v2 1/9] staging: iio: tsl2x7x: add of_match table for device tree support Brian Masney <masneyb@onstation.org> - 2017-07-07 01:00 +0200
Re: [PATCH v2 1/9] staging: iio: tsl2x7x: add of_match table for device tree support Jonathan Cameron <jic23@kernel.org> - 2017-07-09 19:20 +0200
| From | Brian Masney <masneyb@onstation.org> |
|---|---|
| Date | 2017-07-07 01:00 +0200 |
| Subject | [PATCH v2 1/9] staging: iio: tsl2x7x: add of_match table for device tree support |
| Message-ID | <u0nUB-3uc-1@gated-at.bofh.it> |
Add device tree support for the tsl2x7x IIO driver with no custom
properties. The device tree documentation is in a separate commit so
that the changes to trivial-devices.txt can go in via the device
tree subsystem.
Signed-off-by: Brian Masney <masneyb@onstation.org>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: devicetree@vger.kernel.org
---
drivers/staging/iio/light/tsl2x7x.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c
index 1467199..8148986 100644
--- a/drivers/staging/iio/light/tsl2x7x.c
+++ b/drivers/staging/iio/light/tsl2x7x.c
@@ -2026,6 +2026,21 @@ static struct i2c_device_id tsl2x7x_idtable[] = {
MODULE_DEVICE_TABLE(i2c, tsl2x7x_idtable);
+static const struct of_device_id tsl2x7x_of_match[] = {
+ { .compatible = "amstaos,tsl2571" },
+ { .compatible = "amstaos,tsl2671" },
+ { .compatible = "amstaos,tmd2671" },
+ { .compatible = "amstaos,tsl2771" },
+ { .compatible = "amstaos,tmd2771" },
+ { .compatible = "amstaos,tsl2572" },
+ { .compatible = "amstaos,tsl2672" },
+ { .compatible = "amstaos,tmd2672" },
+ { .compatible = "amstaos,tsl2772" },
+ { .compatible = "amstaos,tmd2772" },
+ {}
+};
+MODULE_DEVICE_TABLE(of, tsl2x7x_of_match);
+
static const struct dev_pm_ops tsl2x7x_pm_ops = {
.suspend = tsl2x7x_suspend,
.resume = tsl2x7x_resume,
@@ -2035,6 +2050,7 @@ static const struct dev_pm_ops tsl2x7x_pm_ops = {
static struct i2c_driver tsl2x7x_driver = {
.driver = {
.name = "tsl2x7x",
+ .of_match_table = tsl2x7x_of_match,
.pm = &tsl2x7x_pm_ops,
},
.id_table = tsl2x7x_idtable,
--
2.9.4
[toc] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2017-07-09 19:20 +0200 |
| Subject | Re: [PATCH v2 1/9] staging: iio: tsl2x7x: add of_match table for device tree support |
| Message-ID | <u1o2d-265-7@gated-at.bofh.it> |
| In reply to | #1682785 |
On Thu, 6 Jul 2017 18:56:18 -0400
Brian Masney <masneyb@onstation.org> wrote:
> Add device tree support for the tsl2x7x IIO driver with no custom
> properties. The device tree documentation is in a separate commit so
> that the changes to trivial-devices.txt can go in via the device
> tree subsystem.
>
> Signed-off-by: Brian Masney <masneyb@onstation.org>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Mark Rutland <mark.rutland@arm.com>
> CC: devicetree@vger.kernel.org
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/staging/iio/light/tsl2x7x.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c
> index 1467199..8148986 100644
> --- a/drivers/staging/iio/light/tsl2x7x.c
> +++ b/drivers/staging/iio/light/tsl2x7x.c
> @@ -2026,6 +2026,21 @@ static struct i2c_device_id tsl2x7x_idtable[] = {
>
> MODULE_DEVICE_TABLE(i2c, tsl2x7x_idtable);
>
> +static const struct of_device_id tsl2x7x_of_match[] = {
> + { .compatible = "amstaos,tsl2571" },
> + { .compatible = "amstaos,tsl2671" },
> + { .compatible = "amstaos,tmd2671" },
> + { .compatible = "amstaos,tsl2771" },
> + { .compatible = "amstaos,tmd2771" },
> + { .compatible = "amstaos,tsl2572" },
> + { .compatible = "amstaos,tsl2672" },
> + { .compatible = "amstaos,tmd2672" },
> + { .compatible = "amstaos,tsl2772" },
> + { .compatible = "amstaos,tmd2772" },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, tsl2x7x_of_match);
> +
> static const struct dev_pm_ops tsl2x7x_pm_ops = {
> .suspend = tsl2x7x_suspend,
> .resume = tsl2x7x_resume,
> @@ -2035,6 +2050,7 @@ static const struct dev_pm_ops tsl2x7x_pm_ops = {
> static struct i2c_driver tsl2x7x_driver = {
> .driver = {
> .name = "tsl2x7x",
> + .of_match_table = tsl2x7x_of_match,
> .pm = &tsl2x7x_pm_ops,
> },
> .id_table = tsl2x7x_idtable,
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web