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:proximity:ams,as3935 yaml conversion

A straight forward conversion of this binding. I have added
a maximum SPI frequency from the datasheet.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20201031134110.724233-12-jic23@kernel.org

+71 -34
+71
Documentation/devicetree/bindings/iio/proximity/ams,as3935.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/iio/proximity/ams,as3935.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Austrian Microsystems AS3935 Franklin lightning sensor 8 + 9 + maintainers: 10 + - Matt Ranostay <matt.ranostay@konsulko.com> 11 + 12 + description: 13 + This lightening distance sensor uses an I2C or SPI interface. The 14 + binding currently only covers the SPI option. 15 + 16 + properties: 17 + compatible: 18 + const: ams,as3935 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + spi-max-frequency: 24 + maximum: 2000000 25 + 26 + spi-cpha: true 27 + 28 + interrupts: 29 + maxItems: 1 30 + 31 + ams,tuning-capacitor-pf: 32 + $ref: /schemas/types.yaml#/definitions/uint32 33 + description: 34 + Calibration tuning capacitor stepping value. This will require using 35 + the calibration data from the manufacturer. 36 + minimum: 0 37 + maximum: 120 38 + 39 + ams,nflwdth: 40 + $ref: /schemas/types.yaml#/definitions/uint32 41 + description: 42 + Set the noise and watchdog threshold register on startup. This will 43 + need to set according to the noise from the MCU board, and possibly 44 + the local environment. Refer to the datasheet for the threshold settings. 45 + 46 + required: 47 + - compatible 48 + - reg 49 + - spi-cpha 50 + - interrupts 51 + 52 + additionalProperties: false 53 + 54 + examples: 55 + - | 56 + spi { 57 + #address-cells = <1>; 58 + #size-cells = <0>; 59 + 60 + lightning@0 { 61 + compatible = "ams,as3935"; 62 + reg = <0>; 63 + spi-max-frequency = <400000>; 64 + spi-cpha; 65 + interrupt-parent = <&gpio1>; 66 + interrupts = <16 1>; 67 + ams,tuning-capacitor-pf = <80>; 68 + ams,nflwdth = <0x44>; 69 + }; 70 + }; 71 + ...
-34
Documentation/devicetree/bindings/iio/proximity/as3935.txt
··· 1 - Austrian Microsystems AS3935 Franklin lightning sensor device driver 2 - 3 - Required properties: 4 - - compatible: must be "ams,as3935" 5 - - reg: SPI chip select number for the device 6 - - spi-max-frequency: specifies maximum SPI clock frequency 7 - - spi-cpha: SPI Mode 1. Refer to spi/spi-bus.txt for generic SPI 8 - slave node bindings. 9 - - interrupts : the sole interrupt generated by the device 10 - 11 - Refer to interrupt-controller/interrupts.txt for generic 12 - interrupt client node bindings. 13 - 14 - Optional properties: 15 - - ams,tuning-capacitor-pf: Calibration tuning capacitor stepping 16 - value 0 - 120pF. This will require using the calibration data from 17 - the manufacturer. 18 - - ams,nflwdth: Set the noise and watchdog threshold register on 19 - startup. This will need to set according to the noise from the 20 - MCU board, and possibly the local environment. Refer to the 21 - datasheet for the threshold settings. 22 - 23 - Example: 24 - 25 - as3935@0 { 26 - compatible = "ams,as3935"; 27 - reg = <0>; 28 - spi-max-frequency = <400000>; 29 - spi-cpha; 30 - interrupt-parent = <&gpio1>; 31 - interrupts = <16 1>; 32 - ams,tuning-capacitor-pf = <80>; 33 - ams,nflwdth = <0x44>; 34 - };