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:imu:st,lsm6dsx: txt to yaml conversion

Straight forward conversion, but there are a few generic properties
in here like wakeup-source which should probably have schema in a
more generic location.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/20201031184854.745828-13-jic23@kernel.org

+86 -49
+86
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/iio/imu/st,lsm6dsx.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: STM 6-axis (acc + gyro) IMU Mems sensors 8 + 9 + maintainers: 10 + - Lorenzo Bianconi <lorenzo@kernel.org> 11 + 12 + description: 13 + Devices have both I2C and SPI interfaces. 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - st,lsm6ds3 19 + - st,lsm6ds3h 20 + - st,lsm6dsl 21 + - st,lsm6dsm 22 + - st,ism330dlc 23 + - st,lsm6dso 24 + - st,asm330lhh 25 + - st,lsm6dsox 26 + - st,lsm6dsr 27 + - st,lsm6ds3tr-c 28 + - st,ism330dhcx 29 + - st,lsm9ds1-imu 30 + - st,lsm6ds0 31 + - st,lsm6dsrx 32 + - st,lsm6dst 33 + 34 + reg: 35 + maxItems: 1 36 + 37 + interrupts: 38 + minItems: 1 39 + maxItems: 2 40 + description: 41 + Supports up to 2 interrupt lines via the INT1 and INT2 pins. 42 + 43 + spi-max-frequency: true 44 + 45 + st,drdy-int-pin: 46 + $ref: '/schemas/types.yaml#/definitions/uint32' 47 + description: | 48 + The pin on the package that will be used to signal data ready 49 + enum: 50 + - 1 51 + - 2 52 + 53 + st,pullups: 54 + type: boolean 55 + description: enable/disable internal i2c controller pullup resistors. 56 + 57 + drive-open-drain: 58 + type: boolean 59 + description: 60 + The interrupt/data ready line will be configured as open drain, which 61 + is useful if several sensors share the same interrupt line. 62 + 63 + wakeup-source: 64 + $ref: /schemas/types.yaml#/definitions/flag 65 + 66 + additionalProperties: false 67 + 68 + required: 69 + - compatible 70 + - reg 71 + 72 + examples: 73 + - | 74 + #include <dt-bindings/interrupt-controller/irq.h> 75 + i2c { 76 + #address-cells = <1>; 77 + #size-cells = <0>; 78 + 79 + imu@6b { 80 + compatible = "st,lsm6dsm"; 81 + reg = <0x6b>; 82 + interrupt-parent = <&gpio0>; 83 + interrupts = <0 IRQ_TYPE_EDGE_RISING>; 84 + }; 85 + }; 86 + ...
-49
Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt
··· 1 - * ST_LSM6DSx driver for STM 6-axis (acc + gyro) imu Mems sensors 2 - 3 - Required properties: 4 - - compatible: must be one of: 5 - "st,lsm6ds3" 6 - "st,lsm6ds3h" 7 - "st,lsm6dsl" 8 - "st,lsm6dsm" 9 - "st,ism330dlc" 10 - "st,lsm6dso" 11 - "st,asm330lhh" 12 - "st,lsm6dsox" 13 - "st,lsm6dsr" 14 - "st,lsm6ds3tr-c" 15 - "st,ism330dhcx" 16 - "st,lsm9ds1-imu" 17 - "st,lsm6ds0" 18 - "st,lsm6dsrx" 19 - "st,lsm6dst" 20 - - reg: i2c address of the sensor / spi cs line 21 - 22 - Optional properties: 23 - - st,drdy-int-pin: the pin on the package that will be used to signal 24 - "data ready" (valid values: 1 or 2). 25 - - st,pullups : enable/disable internal i2c controller pullup resistors. 26 - - drive-open-drain: the interrupt/data ready line will be configured 27 - as open drain, which is useful if several sensors share the same 28 - interrupt line. This is a boolean property. 29 - (This binding is taken from pinctrl/pinctrl-bindings.txt) 30 - If the requested interrupt is configured as IRQ_TYPE_LEVEL_HIGH or 31 - IRQ_TYPE_EDGE_RISING a pull-down resistor is needed to drive the line 32 - when it is not active, whereas a pull-up one is needed when interrupt 33 - line is configured as IRQ_TYPE_LEVEL_LOW or IRQ_TYPE_EDGE_FALLING. 34 - - interrupts: interrupt mapping for IRQ. It should be configured with 35 - flags IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or 36 - IRQ_TYPE_EDGE_FALLING. 37 - - wakeup-source: Enables wake up of host system on event. 38 - 39 - Refer to interrupt-controller/interrupts.txt for generic interrupt 40 - client node bindings. 41 - 42 - Example: 43 - 44 - lsm6dsm@6b { 45 - compatible = "st,lsm6dsm"; 46 - reg = <0x6b>; 47 - interrupt-parent = <&gpio0>; 48 - interrupts = <0 IRQ_TYPE_EDGE_RISING>; 49 - };