Path: blob/master/Documentation/devicetree/bindings/iio/magnetometer/asahi-kasei,ak8975.yaml
26309 views
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/iio/magnetometer/asahi-kasei,ak8975.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: AsahiKASEI AK8975 magnetometer sensor78maintainers:9- Jonathan Albrieux <jonathan.albrieux@gmail.com>1011properties:12compatible:13oneOf:14- enum:15- asahi-kasei,ak897516- asahi-kasei,ak896317- asahi-kasei,ak0991118- asahi-kasei,ak0991219- asahi-kasei,ak0991620- items:21# ak09918 is register compatible with ak09912.22- const: asahi-kasei,ak0991823- const: asahi-kasei,ak0991224- enum:25- ak897526- ak896327- ak0991128- ak0991229deprecated: true3031reg:32maxItems: 13334gpios:35maxItems: 136description: |37AK8975 has a "Data ready" pin (DRDY) which informs that data38is ready to be read and is possible to listen on it. If used,39this should be active high. Prefer interrupt over this.4041interrupts:42maxItems: 143description: interrupt for DRDY pin. Triggered on rising edge.4445vdd-supply:46description: |47an optional regulator that needs to be on to provide VDD power to48the sensor.4950vid-supply:51description: |52an optional regulator that needs to be on to provide VID power to53the sensor.5455mount-matrix:56description: an optional 3x3 mounting rotation matrix.5758reset-gpios:59maxItems: 160description: |61an optional pin needed for AK09911 to set the reset state. This should62be usually active low6364required:65- compatible66- reg6768additionalProperties: false6970examples:71- |72#include <dt-bindings/interrupt-controller/irq.h>73#include <dt-bindings/gpio/gpio.h>74i2c {75#address-cells = <1>;76#size-cells = <0>;7778magnetometer@c {79compatible = "asahi-kasei,ak8975";80reg = <0x0c>;81interrupt-parent = <&gpio6>;82interrupts = <15 IRQ_TYPE_EDGE_RISING>;83vdd-supply = <&ldo_3v3_gnss>;84reset-gpios = <&msmgpio 111 GPIO_ACTIVE_LOW>;85mount-matrix = "-0.984807753012208", /* x0 */86"0", /* y0 */87"-0.173648177666930", /* z0 */88"0", /* x1 */89"-1", /* y1 */90"0", /* z1 */91"-0.173648177666930", /* x2 */92"0", /* y2 */93"0.984807753012208"; /* z2 */94};95};969798