The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/device-tree/Bindings/iio/iio-bindings.txt

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 This binding is derived from clock bindings, and based on suggestions
    2 from Lars-Peter Clausen [1].
    3 
    4 Sources of IIO channels can be represented by any node in the device
    5 tree. Those nodes are designated as IIO providers. IIO consumer
    6 nodes use a phandle and IIO specifier pair to connect IIO provider
    7 outputs to IIO inputs. Similar to the gpio specifiers, an IIO
    8 specifier is an array of one or more cells identifying the IIO
    9 output on a device. The length of an IIO specifier is defined by the
   10 value of a #io-channel-cells property in the IIO provider node.
   11 
   12 [1] https://marc.info/?l=linux-iio&m=135902119507483&w=2
   13 
   14 ==IIO providers==
   15 
   16 Required properties:
   17 #io-channel-cells: Number of cells in an IIO specifier; Typically 0 for nodes
   18                    with a single IIO output and 1 for nodes with multiple
   19                    IIO outputs.
   20 
   21 Optional properties:
   22 label:             A symbolic name for the device.
   23 
   24 
   25 Example for a simple configuration with no trigger:
   26 
   27         adc: voltage-sensor@35 {
   28                 compatible = "maxim,max1139";
   29                 reg = <0x35>;
   30                 #io-channel-cells = <1>;
   31                 label = "voltage_feedback_group1";
   32         };
   33 
   34 Example for a configuration with trigger:
   35 
   36         adc@35 {
   37                 compatible = "some-vendor,some-adc";
   38                 reg = <0x35>;
   39 
   40                 adc1: iio-device@0 {
   41                         #io-channel-cells = <1>;
   42                         /* other properties */
   43                 };
   44                 adc2: iio-device@1 {
   45                         #io-channel-cells = <1>;
   46                         /* other properties */
   47                 };
   48         };
   49 
   50 ==IIO consumers==
   51 
   52 Required properties:
   53 io-channels:    List of phandle and IIO specifier pairs, one pair
   54                 for each IIO input to the device. Note: if the
   55                 IIO provider specifies '0' for #io-channel-cells,
   56                 then only the phandle portion of the pair will appear.
   57 
   58 Optional properties:
   59 io-channel-names:
   60                 List of IIO input name strings sorted in the same
   61                 order as the io-channels property. Consumers drivers
   62                 will use io-channel-names to match IIO input names
   63                 with IIO specifiers.
   64 io-channel-ranges:
   65                 Empty property indicating that child nodes can inherit named
   66                 IIO channels from this node. Useful for bus nodes to provide
   67                 and IIO channel to their children.
   68 
   69 For example:
   70 
   71         device {
   72                 io-channels = <&adc 1>, <&ref 0>;
   73                 io-channel-names = "vcc", "vdd";
   74         };
   75 
   76 This represents a device with two IIO inputs, named "vcc" and "vdd".
   77 The vcc channel is connected to output 1 of the &adc device, and the
   78 vdd channel is connected to output 0 of the &ref device.
   79 
   80 ==Example==
   81 
   82         adc: max1139@35 {
   83                 compatible = "maxim,max1139";
   84                 reg = <0x35>;
   85                 #io-channel-cells = <1>;
   86         };
   87 
   88         ...
   89 
   90         iio-hwmon {
   91                 compatible = "iio-hwmon";
   92                 io-channels = <&adc 0>, <&adc 1>, <&adc 2>,
   93                         <&adc 3>, <&adc 4>, <&adc 5>,
   94                         <&adc 6>, <&adc 7>, <&adc 8>,
   95                         <&adc 9>;
   96         };
   97 
   98         some_consumer {
   99                 compatible = "some-consumer";
  100                 io-channels = <&adc 10>, <&adc 11>;
  101                 io-channel-names = "adc1", "adc2";
  102         };

Cache object: a738c1ba2de6adda8670092f73ec1b34


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.