Commit f383069b authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

dt-bindings:iio:magnetometer:pni,rm3100: txt to yaml conversion.



Simple binding format conversion.

Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Cc: Song Qiang <songqiang1304521@gmail.com>
Link: https://lore.kernel.org/r/20201031184854.745828-28-jic23@kernel.org
parent 2bb6f3e8
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
* PNI RM3100 3-axis magnetometer sensor

Required properties:

- compatible : should be "pni,rm3100"
- reg : the I2C address or SPI chip select number of the sensor.

Optional properties:

- interrupts: data ready (DRDY) from the chip.
  The interrupts can be triggered on level high.

Example:

rm3100: rm3100@20 {
	compatible = "pni,rm3100";
	reg = <0x20>;
	interrupt-parent = <&gpio0>;
	interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
};
+42 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/magnetometer/pni,rm3100.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: PNI RM3100 3-axis magnetometer sensor

maintainers:
  - Song Qiang <songqiang1304521@gmail.com>

properties:
  compatible:
    const: pni,rm3100

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

additionalProperties: false

required:
  - compatible
  - reg

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        magnetometer@20 {
            compatible = "pni,rm3100";
            reg = <0x20>;
            interrupt-parent = <&gpio0>;
            interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
        };
    };
...