- 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
Kionix manufactured MEMs sensors. There are Kionix acceleromoter sensor
drivers which can be used with device tree.
Signed-off-by: Robert Yang <[email protected]>
---
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
Add device tree support for kxcjk-1013 accelerometer sensors.
Signed-off-by: Robert Yang <[email protected]>
---
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
Document device tree bindings for Kionix KXCJK-1013 Accelerometer driver.
Signed-off-by: Robert Yang <[email protected]>
---
.../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
On Mon, 4 Mar 2019 10:19:10 -0500
Robert Yang <[email protected]> wrote:
> Kionix manufactured MEMs sensors. There are Kionix acceleromoter sensor
> drivers which can be used with device tree.
>
> Signed-off-by: Robert Yang <[email protected]>
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
On Mon, 4 Mar 2019 10:19:11 -0500
Robert Yang <[email protected]> wrote:
> Document device tree bindings for Kionix KXCJK-1013 Accelerometer driver.
>
> Signed-off-by: Robert Yang <[email protected]>
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>;
> +};
On Mon, 4 Mar 2019 10:19:12 -0500
Robert Yang <[email protected]> wrote:
> Add device tree support for kxcjk-1013 accelerometer sensors.
>
> Signed-off-by: Robert Yang <[email protected]>
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,
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 <[email protected]>
> ---
> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
> 1 file changed, 1 insertion(+)
>
Reviewed-by: Rob Herring <[email protected]>
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 <[email protected]>
> ---
> .../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 <[email protected]>