linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add device tree support for kxcjk1013 accelerometer
@ 2019-03-04 15:19 Robert Yang
  2019-03-04 15:19 ` [PATCH v2 1/3] dt-bindings: Add vendor prefix for Kionix, Inc Robert Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Robert Yang @ 2019-03-04 15:19 UTC (permalink / raw)
  To: Jonathan Cameron, Rob Herring, Mark Rutland
  Cc: linux-iio, devicetree, linux-kernel, Robert Yang

- Add a vendor prefix for Kionix Inc. to device tree bindings.
  There is already one other Kionix accelerometer (kxsd9) with device tree
  bindings but this vendor prefix hasn't been documented.
- Document the kxcjk1013 device tree bindings.
- Add device tree support for Kionix kxcjk1013 accelerometer sensors.

Changelog:

v2:     - Remove SMO8500 because it's an ACPI binding.

 .../bindings/iio/accel/kionix,kxcjk1013.txt     | 17 +++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.txt     |  1 +
 drivers/iio/accel/kxcjk-1013.c                  | 10 ++++++++++
 3 files changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt

-- 
2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/3] dt-bindings: Add vendor prefix for Kionix, Inc.
  2019-03-04 15:19 [PATCH v2 0/3] Add device tree support for kxcjk1013 accelerometer Robert Yang
@ 2019-03-04 15:19 ` Robert Yang
  2019-03-09 18:13   ` Jonathan Cameron
  2019-03-12 18:36   ` Rob Herring
  2019-03-04 15:19 ` [PATCH v2 2/3] dt-bindings: iio: accel: kxcjk1013: Add device tree binding documentation Robert Yang
  2019-03-04 15:19 ` [PATCH v2 3/3] iio: accel: kxcjk1013: Add device tree support Robert Yang
  2 siblings, 2 replies; 9+ messages in thread
From: Robert Yang @ 2019-03-04 15:19 UTC (permalink / raw)
  To: Jonathan Cameron, Rob Herring, Mark Rutland
  Cc: linux-iio, devicetree, linux-kernel, Robert Yang

Kionix manufactured MEMs sensors. There are Kionix acceleromoter sensor
drivers which can be used with device tree.

Signed-off-by: Robert Yang <decatf@gmail.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index bb6f6e8a2eee..e389904ee9bf 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -210,6 +210,7 @@ kiebackpeter    Kieback & Peter GmbH
 kinetic Kinetic Technologies
 kingdisplay	King & Display Technology Co., Ltd.
 kingnovel	Kingnovel Technology Co., Ltd.
+kionix	Kionix, Inc.
 koe	Kaohsiung Opto-Electronics Inc.
 kosagi	Sutajio Ko-Usagi PTE Ltd.
 kyo	Kyocera Corporation
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/3] dt-bindings: iio: accel: kxcjk1013: Add device tree binding documentation
  2019-03-04 15:19 [PATCH v2 0/3] Add device tree support for kxcjk1013 accelerometer Robert Yang
  2019-03-04 15:19 ` [PATCH v2 1/3] dt-bindings: Add vendor prefix for Kionix, Inc Robert Yang
@ 2019-03-04 15:19 ` Robert Yang
  2019-03-09 18:15   ` Jonathan Cameron
  2019-03-12 18:36   ` Rob Herring
  2019-03-04 15:19 ` [PATCH v2 3/3] iio: accel: kxcjk1013: Add device tree support Robert Yang
  2 siblings, 2 replies; 9+ messages in thread
From: Robert Yang @ 2019-03-04 15:19 UTC (permalink / raw)
  To: Jonathan Cameron, Rob Herring, Mark Rutland
  Cc: linux-iio, devicetree, linux-kernel, Robert Yang

Document device tree bindings for Kionix KXCJK-1013 Accelerometer driver.

Signed-off-by: Robert Yang <decatf@gmail.com>
---
 .../bindings/iio/accel/kionix,kxcjk1013.txt     | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt

diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt b/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt
new file mode 100644
index 000000000000..eb76a02e2a82
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt
@@ -0,0 +1,17 @@
+Kionix KXCJK-1013 Accelerometer device tree bindings
+
+Required properties:
+
+- compatible: Must be one of:
+    "kionix,kxcjk1013"
+    "kionix,kxcj91008"
+    "kionix,kxtj21009"
+    "kionix,kxtf9"
+ - reg: i2c slave address
+
+Example:
+
+kxtf9@f {
+	compatible = "kionix,kxtf9";
+	reg = <0x0F>;
+};
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 3/3] iio: accel: kxcjk1013: Add device tree support
  2019-03-04 15:19 [PATCH v2 0/3] Add device tree support for kxcjk1013 accelerometer Robert Yang
  2019-03-04 15:19 ` [PATCH v2 1/3] dt-bindings: Add vendor prefix for Kionix, Inc Robert Yang
  2019-03-04 15:19 ` [PATCH v2 2/3] dt-bindings: iio: accel: kxcjk1013: Add device tree binding documentation Robert Yang
@ 2019-03-04 15:19 ` Robert Yang
  2019-03-09 18:16   ` Jonathan Cameron
  2 siblings, 1 reply; 9+ messages in thread
From: Robert Yang @ 2019-03-04 15:19 UTC (permalink / raw)
  To: Jonathan Cameron, Rob Herring, Mark Rutland
  Cc: linux-iio, devicetree, linux-kernel, Robert Yang

Add device tree support for kxcjk-1013 accelerometer sensors.

Signed-off-by: Robert Yang <decatf@gmail.com>
---
 drivers/iio/accel/kxcjk-1013.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
index 7096e577b23f..e4cbc443e6ed 100644
--- a/drivers/iio/accel/kxcjk-1013.c
+++ b/drivers/iio/accel/kxcjk-1013.c
@@ -1510,10 +1510,20 @@ static const struct i2c_device_id kxcjk1013_id[] = {
 
 MODULE_DEVICE_TABLE(i2c, kxcjk1013_id);
 
+static const struct of_device_id kxcjk1013_of_match[] = {
+	{ .compatible = "kionix,kxcjk1013", },
+	{ .compatible = "kionix,kxcj91008", },
+	{ .compatible = "kionix,kxtj21009", },
+	{ .compatible = "kionix,kxtf9", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, kxcjk1013_of_match);
+
 static struct i2c_driver kxcjk1013_driver = {
 	.driver = {
 		.name	= KXCJK1013_DRV_NAME,
 		.acpi_match_table = ACPI_PTR(kx_acpi_match),
+		.of_match_table = of_match_ptr(kxcjk1013_of_match),
 		.pm	= &kxcjk1013_pm_ops,
 	},
 	.probe		= kxcjk1013_probe,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: Add vendor prefix for Kionix, Inc.
  2019-03-04 15:19 ` [PATCH v2 1/3] dt-bindings: Add vendor prefix for Kionix, Inc Robert Yang
@ 2019-03-09 18:13   ` Jonathan Cameron
  2019-03-12 18:36   ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Jonathan Cameron @ 2019-03-09 18:13 UTC (permalink / raw)
  To: Robert Yang
  Cc: Rob Herring, Mark Rutland, linux-iio, devicetree, linux-kernel

On Mon,  4 Mar 2019 10:19:10 -0500
Robert Yang <decatf@gmail.com> wrote:

> Kionix manufactured MEMs sensors. There are Kionix acceleromoter sensor
> drivers which can be used with device tree.
> 
> Signed-off-by: Robert Yang <decatf@gmail.com>
I'll apply these now before I forget them but if a DT person
wants to comment I won't be pushing out as non rebasing for
at least a week so plenty of time!

Applied to the togreg branch of iio.git but pushed out for
now as testing for the autobuilders to play with it.

Thanks,

Jonathan

> ---
>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index bb6f6e8a2eee..e389904ee9bf 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -210,6 +210,7 @@ kiebackpeter    Kieback & Peter GmbH
>  kinetic Kinetic Technologies
>  kingdisplay	King & Display Technology Co., Ltd.
>  kingnovel	Kingnovel Technology Co., Ltd.
> +kionix	Kionix, Inc.
>  koe	Kaohsiung Opto-Electronics Inc.
>  kosagi	Sutajio Ko-Usagi PTE Ltd.
>  kyo	Kyocera Corporation


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: iio: accel: kxcjk1013: Add device tree binding documentation
  2019-03-04 15:19 ` [PATCH v2 2/3] dt-bindings: iio: accel: kxcjk1013: Add device tree binding documentation Robert Yang
@ 2019-03-09 18:15   ` Jonathan Cameron
  2019-03-12 18:36   ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Jonathan Cameron @ 2019-03-09 18:15 UTC (permalink / raw)
  To: Robert Yang
  Cc: Rob Herring, Mark Rutland, linux-iio, devicetree, linux-kernel

On Mon,  4 Mar 2019 10:19:11 -0500
Robert Yang <decatf@gmail.com> wrote:

> Document device tree bindings for Kionix KXCJK-1013 Accelerometer driver.
> 
> Signed-off-by: Robert Yang <decatf@gmail.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

thanks,

Jonathan

> ---
>  .../bindings/iio/accel/kionix,kxcjk1013.txt     | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt b/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt
> new file mode 100644
> index 000000000000..eb76a02e2a82
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt
> @@ -0,0 +1,17 @@
> +Kionix KXCJK-1013 Accelerometer device tree bindings
> +
> +Required properties:
> +
> +- compatible: Must be one of:
> +    "kionix,kxcjk1013"
> +    "kionix,kxcj91008"
> +    "kionix,kxtj21009"
> +    "kionix,kxtf9"
> + - reg: i2c slave address
> +
> +Example:
> +
> +kxtf9@f {
> +	compatible = "kionix,kxtf9";
> +	reg = <0x0F>;
> +};


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 3/3] iio: accel: kxcjk1013: Add device tree support
  2019-03-04 15:19 ` [PATCH v2 3/3] iio: accel: kxcjk1013: Add device tree support Robert Yang
@ 2019-03-09 18:16   ` Jonathan Cameron
  0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Cameron @ 2019-03-09 18:16 UTC (permalink / raw)
  To: Robert Yang
  Cc: Rob Herring, Mark Rutland, linux-iio, devicetree, linux-kernel

On Mon,  4 Mar 2019 10:19:12 -0500
Robert Yang <decatf@gmail.com> wrote:

> Add device tree support for kxcjk-1013 accelerometer sensors.
> 
> Signed-off-by: Robert Yang <decatf@gmail.com>
One comment below. 

Applied with that minor tweak to the togreg branch of iio.git
and pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

> ---
>  drivers/iio/accel/kxcjk-1013.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
> index 7096e577b23f..e4cbc443e6ed 100644
> --- a/drivers/iio/accel/kxcjk-1013.c
> +++ b/drivers/iio/accel/kxcjk-1013.c
> @@ -1510,10 +1510,20 @@ static const struct i2c_device_id kxcjk1013_id[] = {
>  
>  MODULE_DEVICE_TABLE(i2c, kxcjk1013_id);
>  
> +static const struct of_device_id kxcjk1013_of_match[] = {
> +	{ .compatible = "kionix,kxcjk1013", },
> +	{ .compatible = "kionix,kxcj91008", },
> +	{ .compatible = "kionix,kxtj21009", },
> +	{ .compatible = "kionix,kxtf9", },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, kxcjk1013_of_match);
> +
>  static struct i2c_driver kxcjk1013_driver = {
>  	.driver = {
>  		.name	= KXCJK1013_DRV_NAME,
>  		.acpi_match_table = ACPI_PTR(kx_acpi_match),
> +		.of_match_table = of_match_ptr(kxcjk1013_of_match),
Sorry. I'd missed this before, but general preference is to not
use of_match_table any more because it stops people using the
somewhat odd ACPI object that lets you used dt bindings
via ACPI.

I'll drop it.

>  		.pm	= &kxcjk1013_pm_ops,
>  	},
>  	.probe		= kxcjk1013_probe,


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: Add vendor prefix for Kionix, Inc.
  2019-03-04 15:19 ` [PATCH v2 1/3] dt-bindings: Add vendor prefix for Kionix, Inc Robert Yang
  2019-03-09 18:13   ` Jonathan Cameron
@ 2019-03-12 18:36   ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Rob Herring @ 2019-03-12 18:36 UTC (permalink / raw)
  To: Robert Yang
  Cc: Jonathan Cameron, Mark Rutland, linux-iio, devicetree,
	linux-kernel, Robert Yang

On Mon,  4 Mar 2019 10:19:10 -0500, Robert Yang wrote:
> Kionix manufactured MEMs sensors. There are Kionix acceleromoter sensor
> drivers which can be used with device tree.
> 
> Signed-off-by: Robert Yang <decatf@gmail.com>
> ---
>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: iio: accel: kxcjk1013: Add device tree binding documentation
  2019-03-04 15:19 ` [PATCH v2 2/3] dt-bindings: iio: accel: kxcjk1013: Add device tree binding documentation Robert Yang
  2019-03-09 18:15   ` Jonathan Cameron
@ 2019-03-12 18:36   ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Rob Herring @ 2019-03-12 18:36 UTC (permalink / raw)
  To: Robert Yang
  Cc: Jonathan Cameron, Mark Rutland, linux-iio, devicetree,
	linux-kernel, Robert Yang

On Mon,  4 Mar 2019 10:19:11 -0500, Robert Yang wrote:
> Document device tree bindings for Kionix KXCJK-1013 Accelerometer driver.
> 
> Signed-off-by: Robert Yang <decatf@gmail.com>
> ---
>  .../bindings/iio/accel/kionix,kxcjk1013.txt     | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-12 18:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 15:19 [PATCH v2 0/3] Add device tree support for kxcjk1013 accelerometer Robert Yang
2019-03-04 15:19 ` [PATCH v2 1/3] dt-bindings: Add vendor prefix for Kionix, Inc Robert Yang
2019-03-09 18:13   ` Jonathan Cameron
2019-03-12 18:36   ` Rob Herring
2019-03-04 15:19 ` [PATCH v2 2/3] dt-bindings: iio: accel: kxcjk1013: Add device tree binding documentation Robert Yang
2019-03-09 18:15   ` Jonathan Cameron
2019-03-12 18:36   ` Rob Herring
2019-03-04 15:19 ` [PATCH v2 3/3] iio: accel: kxcjk1013: Add device tree support Robert Yang
2019-03-09 18:16   ` Jonathan Cameron

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).