Commit ba13993c authored by Jonathan Albrieux's avatar Jonathan Albrieux Committed by Jonathan Cameron

dt-bindings: iio: magnetometer: ak8975: reword gpios, add interrupts, fix style

Reword gpios documentation, add interrupt documentation and fix styles.
Update example to use interrupts instead of gpios.
Signed-off-by: default avatarJonathan Albrieux <jonathan.albrieux@gmail.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 603375df
...@@ -2,21 +2,28 @@ ...@@ -2,21 +2,28 @@
Required properties: Required properties:
- compatible : should be "asahi-kasei,ak8975" - compatible : should be "asahi-kasei,ak8975".
- reg : the I2C address of the magnetometer - reg : the I2C address of the magnetometer.
Optional properties: Optional properties:
- gpios : should be device tree identifier of the magnetometer DRDY pin - gpios : AK8975 has a "Data ready" pin (DRDY) which informs that data
- vdd-supply: an optional regulator that needs to be on to provide VDD is ready to be read and is possible to listen on it. If used,
- mount-matrix: an optional 3x3 mounting rotation matrix this should be active high. Prefer interrupt over this.
- interrupts : interrupt for DRDY pin. Triggered on rising edge.
- vdd-supply: an optional regulator that needs to be on to provide VDD.
- mount-matrix: an optional 3x3 mounting rotation matrix.
Example: Example:
ak8975@c { ak8975@c {
compatible = "asahi-kasei,ak8975"; compatible = "asahi-kasei,ak8975";
reg = <0x0c>; reg = <0x0c>;
gpios = <&gpj0 7 0>; interrupt-parent = <&gpio6>;
interrupts = <15 IRQ_TYPE_EDGE_RISING>;
vdd-supply = <&ldo_3v3_gnss>; vdd-supply = <&ldo_3v3_gnss>;
mount-matrix = "-0.984807753012208", /* x0 */ mount-matrix = "-0.984807753012208", /* x0 */
"0", /* y0 */ "0", /* y0 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment