Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: iio: Add KX022A accelerometer

KX022A is a 3-axis Accelerometer from ROHM/Kionix. The sensor features
include variable ODRs, I2C and SPI control, FIFO/LIFO with watermark IRQ,
tap/motion detection, wake-up & back-to-sleep events, four acceleration
ranges (2, 4, 8 and 16g) and probably some other cool features.

Add the basic device tree description for the accelerometer. Only basic
accelerometer features are considered as of now - new properties may or
may not be needed in the future when rest of the features are supported.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/06f8e1ab29d02ed216db10091a269df4b6abad9a.1666614295.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Matti Vaittinen and committed by
Jonathan Cameron
b52e2f19 f7626504

+65
+65
Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/iio/accel/kionix,kx022a.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: ROHM/Kionix KX022A Accelerometer 8 + 9 + maintainers: 10 + - Matti Vaittinen <mazziesaccount@gmail.com> 11 + 12 + description: | 13 + KX022A is a 3-axis accelerometer supporting +/- 2G, 4G, 8G and 16G ranges, 14 + output data-rates from 0.78Hz to 1600Hz and a hardware-fifo buffering. 15 + KX022A can be accessed either via I2C or SPI. 16 + 17 + properties: 18 + compatible: 19 + const: kionix,kx022a 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + interrupts: 25 + minItems: 1 26 + maxItems: 2 27 + 28 + interrupt-names: 29 + minItems: 1 30 + items: 31 + - enum: [INT1, INT2] 32 + - const: INT2 33 + 34 + vdd-supply: true 35 + io-vdd-supply: true 36 + 37 + mount-matrix: 38 + description: | 39 + an optional 3x3 mounting rotation matrix. 40 + 41 + required: 42 + - compatible 43 + - reg 44 + - interrupts 45 + 46 + additionalProperties: false 47 + 48 + examples: 49 + - | 50 + #include <dt-bindings/interrupt-controller/irq.h> 51 + i2c { 52 + #address-cells = <1>; 53 + #size-cells = <0>; 54 + accel@1f { 55 + compatible = "kionix,kx022a"; 56 + reg = <0x1f>; 57 + 58 + interrupt-parent = <&gpio1>; 59 + interrupts = <29 IRQ_TYPE_LEVEL_LOW>; 60 + interrupt-names = "INT1"; 61 + 62 + io-vdd-supply = <&iovdd>; 63 + vdd-supply = <&vdd>; 64 + }; 65 + };