:orphan:
.. raw:: html
.. dtcompatible:: analog-axis
.. _dtbinding_analog_axis:
analog-axis
###########
Vendor: :ref:`Generic or vendor-independent `
Description
***********
.. code-block:: none
ADC based analog axis input device
Implement an input device generating absolute axis events by periodically
reading from some ADC channels.
Example configuration:
#include
analog_axis {
compatible = "analog-axis";
poll-period-ms = <15>;
axis-x {
io-channels = <&adc 0>;
out-deadzone = <8>;
in-min = <100>;
in-max = <800>;
zephyr,axis = ;
};
};
Properties
**********
Top level properties
====================
These property descriptions apply to "analog-axis"
nodes themselves. This page also describes child node
properties in the following sections.
.. tabs::
.. group-tab:: Node specific properties
Properties not inherited from the base binding file.
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``poll-period-ms``
- ``int``
- .. code-block:: none
How often to get new ADC samples for the various configured axes in
milliseconds. Defaults to 15ms if unspecified.
Default value: ``15``
.. group-tab:: Deprecated node specific properties
Deprecated properties not inherited from the base binding file.
(None)
.. group-tab:: Base properties
Properties inherited from the base binding file, which defines
common properties that may be set on many nodes. Not all of these
may apply to the "analog-axis" compatible.
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``status``
- ``string``
- .. code-block:: none
indicates the operational status of a device
Legal values: ``'ok'``, ``'okay'``, ``'disabled'``, ``'reserved'``, ``'fail'``, ``'fail-sss'``
See :ref:`zephyr:dt-important-props` for more information.
* - ``compatible``
- ``string-array``
- .. code-block:: none
compatible strings
This property is **required**.
See :ref:`zephyr:dt-important-props` for more information.
* - ``reg``
- ``array``
- .. code-block:: none
register space
See :ref:`zephyr:dt-important-props` for more information.
* - ``reg-names``
- ``string-array``
- .. code-block:: none
name of each register space
* - ``interrupts``
- ``array``
- .. code-block:: none
interrupts for device
See :ref:`zephyr:dt-important-props` for more information.
* - ``interrupts-extended``
- ``compound``
- .. code-block:: none
extended interrupt specifier for device
* - ``interrupt-names``
- ``string-array``
- .. code-block:: none
name of each interrupt
* - ``interrupt-parent``
- ``phandle``
- .. code-block:: none
phandle to interrupt controller node
* - ``label``
- ``string``
- .. code-block:: none
Human readable string describing the device (used as device_get_binding() argument)
See :ref:`zephyr:dt-important-props` for more information.
This property is **deprecated**.
* - ``clocks``
- ``phandle-array``
- .. code-block:: none
Clock gate information
* - ``clock-names``
- ``string-array``
- .. code-block:: none
name of each clock
* - ``#address-cells``
- ``int``
- .. code-block:: none
number of address cells in reg property
* - ``#size-cells``
- ``int``
- .. code-block:: none
number of size cells in reg property
* - ``dmas``
- ``phandle-array``
- .. code-block:: none
DMA channels specifiers
* - ``dma-names``
- ``string-array``
- .. code-block:: none
Provided names of DMA channel specifiers
* - ``io-channels``
- ``phandle-array``
- .. code-block:: none
IO channels specifiers
* - ``io-channel-names``
- ``string-array``
- .. code-block:: none
Provided names of IO channel specifiers
* - ``mboxes``
- ``phandle-array``
- .. code-block:: none
mailbox / IPM channels specifiers
* - ``mbox-names``
- ``string-array``
- .. code-block:: none
Provided names of mailbox / IPM channel specifiers
* - ``wakeup-source``
- ``boolean``
- .. code-block:: none
Property to identify that a device can be used as wake up source.
When this property is provided a specific flag is set into the
device that tells the system that the device is capable of
wake up the system.
Wake up capable devices are disabled (interruptions will not wake up
the system) by default but they can be enabled at runtime if necessary.
* - ``power-domain``
- ``phandle``
- .. code-block:: none
Power domain the device belongs to.
The device will be notified when the power domain it belongs to is either
suspended or resumed.
* - ``zephyr,pm-device-runtime-auto``
- ``boolean``
- .. code-block:: none
Automatically configure the device for runtime power management after the
init function runs.
Child node properties
=====================
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``io-channels``
- ``phandle-array``
- .. code-block:: none
ADC IO channel to use.
This property is **required**.
* - ``out-min``
- ``int``
- .. code-block:: none
Minimum value to output on input events. Defaults to 0 if unspecified.
* - ``out-max``
- ``int``
- .. code-block:: none
Maximum value to output on input events. Defaults to 255 if
unspecified.
Default value: ``255``
* - ``out-deadzone``
- ``int``
- .. code-block:: none
Deadzone for the output center value. If specified output values
between the center of the range plus or minus this value will be
reported as center. Defaults to 0, no deadzone.
* - ``in-min``
- ``int``
- .. code-block:: none
Input value that corresponds to the minimum output value.
This property is **required**.
* - ``in-max``
- ``int``
- .. code-block:: none
Input value that corresponds to the maximum output value.
This property is **required**.
* - ``zephyr,axis``
- ``int``
- .. code-block:: none
The input code for the axis to report for the device, typically any of
INPUT_ABS_*.
This property is **required**.
* - ``invert``
- ``boolean``
- .. code-block:: none
If set, invert the raw ADC value before processing it. Useful for
differential channels.