Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1511020 > unrolled thread
| Started by | Brian Masney <masneyb@onstation.org> |
|---|---|
| First post | 2016-10-28 12:10 +0200 |
| Last post | 2016-10-31 07:10 +0100 |
| Articles | 4 — 3 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 01/10] staging: iio: tsl2583: add of_match table for device tree support Brian Masney <masneyb@onstation.org> - 2016-10-28 12:10 +0200
Re: [PATCH 01/10] staging: iio: tsl2583: add of_match table for device tree support Jonathan Cameron <jic23@kernel.org> - 2016-10-30 18:50 +0100
Re: [PATCH 01/10] staging: iio: tsl2583: add of_match table for device tree support Jonathan Cameron <jic23@kernel.org> - 2016-10-30 18:50 +0100
Re: [PATCH 01/10] staging: iio: tsl2583: add of_match table for device tree support Rob Herring <robh@kernel.org> - 2016-10-31 07:10 +0100
| From | Brian Masney <masneyb@onstation.org> |
|---|---|
| Date | 2016-10-28 12:10 +0200 |
| Subject | [PATCH 01/10] staging: iio: tsl2583: add of_match table for device tree support |
| Message-ID | <sxcgN-6SN-1@gated-at.bofh.it> |
Add device tree support for the tsl2583 IIO driver with no custom
properties.
Signed-off-by: Brian Masney <masneyb@onstation.org>
---
.../devicetree/bindings/iio/light/tsl2583.txt | 26 ++++++++++++++++++++++
drivers/staging/iio/light/tsl2583.c | 13 +++++++++++
2 files changed, 39 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/light/tsl2583.txt
diff --git a/Documentation/devicetree/bindings/iio/light/tsl2583.txt b/Documentation/devicetree/bindings/iio/light/tsl2583.txt
new file mode 100644
index 0000000..8e2066c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/tsl2583.txt
@@ -0,0 +1,26 @@
+* TAOS TSL 2580/2581/2583 ALS sensor
+
+Required properties:
+
+ - compatible: Should be one of
+ "amstaos,tsl2580"
+ "amstaos,tsl2581"
+ "amstaos,tsl2583"
+ - reg: the I2C address of the device
+
+Optional properties:
+
+ - interrupt-parent: should be the phandle for the interrupt controller
+ - interrupts: the sole interrupt generated by the device
+
+ Refer to interrupt-controller/interrupts.txt for generic interrupt client
+ node bindings.
+
+ - vcc-supply: phandle to the regulator that provides power to the sensor.
+
+Example:
+
+tsl2581@29 {
+ compatible = "amstaos,tsl2581";
+ reg = <0x29>;
+};
diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
index 08f1583..fd4b6ef 100644
--- a/drivers/staging/iio/light/tsl2583.c
+++ b/drivers/staging/iio/light/tsl2583.c
@@ -947,11 +947,24 @@ static struct i2c_device_id taos_idtable[] = {
};
MODULE_DEVICE_TABLE(i2c, taos_idtable);
+#ifdef CONFIG_OF
+static const struct of_device_id taos2583_of_match[] = {
+ { .compatible = "amstaos,tsl2580", },
+ { .compatible = "amstaos,tsl2581", },
+ { .compatible = "amstaos,tsl2583", },
+ { },
+};
+MODULE_DEVICE_TABLE(of, taos2583_of_match);
+#else
+#define taos2583_of_match NULL
+#endif
+
/* Driver definition */
static struct i2c_driver taos_driver = {
.driver = {
.name = "tsl2583",
.pm = TAOS_PM_OPS,
+ .of_match_table = taos2583_of_match,
},
.id_table = taos_idtable,
.probe = taos_probe,
--
2.7.4
[toc] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2016-10-30 18:50 +0100 |
| Subject | Re: [PATCH 01/10] staging: iio: tsl2583: add of_match table for device tree support |
| Message-ID | <sy2p3-7HR-5@gated-at.bofh.it> |
| In reply to | #1511020 |
On 30/10/16 17:43, Jonathan Cameron wrote:
> On 28/10/16 11:00, Brian Masney wrote:
>> Add device tree support for the tsl2583 IIO driver with no custom
>> properties.
>>
>> Signed-off-by: Brian Masney <masneyb@onstation.org>
> Trivial enough that I feel I can take this without an explicit devicetree
> ack. Of course one is always welcome if anyone gets a chance to look at it.
> I won't have it exposed in a non rebasing tree until perhaps the second half
> of the week.
oops. Forgot to say - applied to the togreg branch of iio.git - initially pushed
out as testing for the autobuilders to play with it.
Thanks,
Jonathan
>> ---
>> .../devicetree/bindings/iio/light/tsl2583.txt | 26 ++++++++++++++++++++++
>> drivers/staging/iio/light/tsl2583.c | 13 +++++++++++
>> 2 files changed, 39 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/iio/light/tsl2583.txt
>>
>> diff --git a/Documentation/devicetree/bindings/iio/light/tsl2583.txt b/Documentation/devicetree/bindings/iio/light/tsl2583.txt
>> new file mode 100644
>> index 0000000..8e2066c
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/light/tsl2583.txt
>> @@ -0,0 +1,26 @@
>> +* TAOS TSL 2580/2581/2583 ALS sensor
>> +
>> +Required properties:
>> +
>> + - compatible: Should be one of
>> + "amstaos,tsl2580"
>> + "amstaos,tsl2581"
>> + "amstaos,tsl2583"
>> + - reg: the I2C address of the device
>> +
>> +Optional properties:
>> +
>> + - interrupt-parent: should be the phandle for the interrupt controller
>> + - interrupts: the sole interrupt generated by the device
>> +
>> + Refer to interrupt-controller/interrupts.txt for generic interrupt client
>> + node bindings.
>> +
>> + - vcc-supply: phandle to the regulator that provides power to the sensor.
>> +
>> +Example:
>> +
>> +tsl2581@29 {
>> + compatible = "amstaos,tsl2581";
>> + reg = <0x29>;
>> +};
>> diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
>> index 08f1583..fd4b6ef 100644
>> --- a/drivers/staging/iio/light/tsl2583.c
>> +++ b/drivers/staging/iio/light/tsl2583.c
>> @@ -947,11 +947,24 @@ static struct i2c_device_id taos_idtable[] = {
>> };
>> MODULE_DEVICE_TABLE(i2c, taos_idtable);
>>
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id taos2583_of_match[] = {
>> + { .compatible = "amstaos,tsl2580", },
>> + { .compatible = "amstaos,tsl2581", },
>> + { .compatible = "amstaos,tsl2583", },
>> + { },
>> +};
>> +MODULE_DEVICE_TABLE(of, taos2583_of_match);
>> +#else
>> +#define taos2583_of_match NULL
>> +#endif
>> +
>> /* Driver definition */
>> static struct i2c_driver taos_driver = {
>> .driver = {
>> .name = "tsl2583",
>> .pm = TAOS_PM_OPS,
>> + .of_match_table = taos2583_of_match,
>> },
>> .id_table = taos_idtable,
>> .probe = taos_probe,
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2016-10-30 18:50 +0100 |
| Subject | Re: [PATCH 01/10] staging: iio: tsl2583: add of_match table for device tree support |
| Message-ID | <sy2p3-7HR-7@gated-at.bofh.it> |
| In reply to | #1511020 |
On 28/10/16 11:00, Brian Masney wrote:
> Add device tree support for the tsl2583 IIO driver with no custom
> properties.
>
> Signed-off-by: Brian Masney <masneyb@onstation.org>
Trivial enough that I feel I can take this without an explicit devicetree
ack. Of course one is always welcome if anyone gets a chance to look at it.
I won't have it exposed in a non rebasing tree until perhaps the second half
of the week.
> ---
> .../devicetree/bindings/iio/light/tsl2583.txt | 26 ++++++++++++++++++++++
> drivers/staging/iio/light/tsl2583.c | 13 +++++++++++
> 2 files changed, 39 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/light/tsl2583.txt
>
> diff --git a/Documentation/devicetree/bindings/iio/light/tsl2583.txt b/Documentation/devicetree/bindings/iio/light/tsl2583.txt
> new file mode 100644
> index 0000000..8e2066c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/tsl2583.txt
> @@ -0,0 +1,26 @@
> +* TAOS TSL 2580/2581/2583 ALS sensor
> +
> +Required properties:
> +
> + - compatible: Should be one of
> + "amstaos,tsl2580"
> + "amstaos,tsl2581"
> + "amstaos,tsl2583"
> + - reg: the I2C address of the device
> +
> +Optional properties:
> +
> + - interrupt-parent: should be the phandle for the interrupt controller
> + - interrupts: the sole interrupt generated by the device
> +
> + Refer to interrupt-controller/interrupts.txt for generic interrupt client
> + node bindings.
> +
> + - vcc-supply: phandle to the regulator that provides power to the sensor.
> +
> +Example:
> +
> +tsl2581@29 {
> + compatible = "amstaos,tsl2581";
> + reg = <0x29>;
> +};
> diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
> index 08f1583..fd4b6ef 100644
> --- a/drivers/staging/iio/light/tsl2583.c
> +++ b/drivers/staging/iio/light/tsl2583.c
> @@ -947,11 +947,24 @@ static struct i2c_device_id taos_idtable[] = {
> };
> MODULE_DEVICE_TABLE(i2c, taos_idtable);
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id taos2583_of_match[] = {
> + { .compatible = "amstaos,tsl2580", },
> + { .compatible = "amstaos,tsl2581", },
> + { .compatible = "amstaos,tsl2583", },
> + { },
> +};
> +MODULE_DEVICE_TABLE(of, taos2583_of_match);
> +#else
> +#define taos2583_of_match NULL
> +#endif
> +
> /* Driver definition */
> static struct i2c_driver taos_driver = {
> .driver = {
> .name = "tsl2583",
> .pm = TAOS_PM_OPS,
> + .of_match_table = taos2583_of_match,
> },
> .id_table = taos_idtable,
> .probe = taos_probe,
>
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2016-10-31 07:10 +0100 |
| Subject | Re: [PATCH 01/10] staging: iio: tsl2583: add of_match table for device tree support |
| Message-ID | <sydXc-6Z3-3@gated-at.bofh.it> |
| In reply to | #1511020 |
On Fri, Oct 28, 2016 at 06:00:12AM -0400, Brian Masney wrote: > Add device tree support for the tsl2583 IIO driver with no custom > properties. > > Signed-off-by: Brian Masney <masneyb@onstation.org> > --- > .../devicetree/bindings/iio/light/tsl2583.txt | 26 ++++++++++++++++++++++ > drivers/staging/iio/light/tsl2583.c | 13 +++++++++++ > 2 files changed, 39 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/light/tsl2583.txt Acked-by: Rob Herring <robh@kernel.org>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web