mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
Char/Misc and other driver changes for 6.11-rc1
Here is the "big" set of char/misc and other driver subsystem changes for 6.11-rc1. Nothing major in here, just loads of new drivers and updates. Included in here are: - IIO api updates and new drivers added - wait_interruptable_timeout() api cleanups for some drivers - MODULE_DESCRIPTION() additions for loads of drivers - parport out-of-bounds fix - interconnect driver updates and additions - mhi driver updates and additions - w1 driver fixes - binder speedups and fixes - eeprom driver updates - coresight driver updates - counter driver update - new misc driver additions - other minor api updates All of these, EXCEPT for the final Kconfig build fix for 32bit systems, have been in linux-next for a while with no reported issues. The Kconfig fixup went in 29 hours ago, so might have missed the latest linux-next, but was acked by everyone involved. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZppR4w8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ykwoQCeIaW3nbOiNTmOupvEnZwrN3yVNs8An3Q5L+Br 1LpTASaU6A8pN81Z1m5g =6U1z -----END PGP SIGNATURE----- Merge tag 'char-misc-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc and other driver updates from Greg KH: "Here is the "big" set of char/misc and other driver subsystem changes for 6.11-rc1. Nothing major in here, just loads of new drivers and updates. Included in here are: - IIO api updates and new drivers added - wait_interruptable_timeout() api cleanups for some drivers - MODULE_DESCRIPTION() additions for loads of drivers - parport out-of-bounds fix - interconnect driver updates and additions - mhi driver updates and additions - w1 driver fixes - binder speedups and fixes - eeprom driver updates - coresight driver updates - counter driver update - new misc driver additions - other minor api updates All of these, EXCEPT for the final Kconfig build fix for 32bit systems, have been in linux-next for a while with no reported issues. The Kconfig fixup went in 29 hours ago, so might have missed the latest linux-next, but was acked by everyone involved" * tag 'char-misc-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (330 commits) misc: Kconfig: exclude mrvl-cn10k-dpi compilation for 32-bit systems misc: delete Makefile.rej binder: fix hang of unregistered readers misc: Kconfig: add a new dependency for MARVELL_CN10K_DPI virtio: add missing MODULE_DESCRIPTION() macro agp: uninorth: add missing MODULE_DESCRIPTION() macro spmi: add missing MODULE_DESCRIPTION() macros dev/parport: fix the array out-of-bounds risk samples: configfs: add missing MODULE_DESCRIPTION() macro misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver misc: keba: Fix missing AUXILIARY_BUS dependency slimbus: Fix struct and documentation alignment in stream.c MAINTAINERS: CC dri-devel list on Qualcomm FastRPC patches misc: fastrpc: use coherent pool for untranslated Compute Banks misc: fastrpc: support complete DMA pool access to the DSP misc: fastrpc: add missing MODULE_DESCRIPTION() macro misc: fastrpc: Add missing dev_err newlines misc: fastrpc: Use memdup_user() nvmem: core: Implement force_ro sysfs attribute nvmem: Use sysfs_emit() for type attribute ...
This commit is contained in:
commit
acc5965b9f
@ -1,6 +1,23 @@
|
||||
What: /sys/bus/nvmem/devices/.../force_ro
|
||||
Date: June 2024
|
||||
KernelVersion: 6.11
|
||||
Contact: Marek Vasut <marex@denx.de>
|
||||
Description:
|
||||
This read/write attribute allows users to set read-write
|
||||
devices as read-only and back to read-write from userspace.
|
||||
This can be used to unlock and relock write-protection of
|
||||
devices which are generally locked, except during sporadic
|
||||
programming operation.
|
||||
Read returns '0' or '1' for read-write or read-only modes
|
||||
respectively.
|
||||
Write parses one of 'YyTt1NnFf0', or [oO][NnFf] for "on"
|
||||
and "off", i.e. what kstrbool() supports.
|
||||
Note: This file is only present if CONFIG_NVMEM_SYSFS
|
||||
is enabled.
|
||||
|
||||
What: /sys/bus/nvmem/devices/.../nvmem
|
||||
Date: July 2015
|
||||
KernelVersion: 4.2
|
||||
KernelVersion: 4.2
|
||||
Contact: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
||||
Description:
|
||||
This file allows user to read/write the raw NVMEM contents.
|
||||
@ -20,3 +37,14 @@ Description:
|
||||
...
|
||||
*
|
||||
0001000
|
||||
|
||||
What: /sys/bus/nvmem/devices/.../type
|
||||
Date: November 2018
|
||||
KernelVersion: 5.0
|
||||
Contact: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
Description:
|
||||
This read-only attribute allows user to read the NVMEM
|
||||
device type. Supported types are "Unknown", "EEPROM",
|
||||
"OTP", "Battery backed", "FRAM".
|
||||
Note: This file is only present if CONFIG_NVMEM_SYSFS
|
||||
is enabled.
|
||||
|
25
Documentation/ABI/stable/sysfs-driver-misc-cp500
Normal file
25
Documentation/ABI/stable/sysfs-driver-misc-cp500
Normal file
@ -0,0 +1,25 @@
|
||||
What: /sys/devices/pciXXXX:XX/0000:XX:XX.X/0000:XX:XX.X/version
|
||||
Date: June 2024
|
||||
KernelVersion: 6.11
|
||||
Contact: Gerhard Engleder <eg@keba.com>
|
||||
Description: Version of the FPGA configuration bitstream as printable string.
|
||||
This file is read only.
|
||||
Users: KEBA
|
||||
|
||||
What: /sys/devices/pciXXXX:XX/0000:XX:XX.X/0000:XX:XX.X/keep_cfg
|
||||
Date: June 2024
|
||||
KernelVersion: 6.11
|
||||
Contact: Gerhard Engleder <eg@keba.com>
|
||||
Description: Flag which signals if FPGA shall keep or reload configuration
|
||||
bitstream on reset. Normal FPGA behavior and default is to keep
|
||||
configuration bitstream and to only reset the configured logic.
|
||||
|
||||
Reloading configuration on reset enables an update of the
|
||||
configuration bitstream with a simple reboot. Otherwise it is
|
||||
necessary to power cycle the device to reload the new
|
||||
configuration bitstream.
|
||||
|
||||
This file is read/write. The values are as follows:
|
||||
1 = keep configuration bitstream on reset, default
|
||||
0 = reload configuration bitstream on reset
|
||||
Users: KEBA
|
18
Documentation/ABI/testing/sysfs-bus-iio-inv_icm42600
Normal file
18
Documentation/ABI/testing/sysfs-bus-iio-inv_icm42600
Normal file
@ -0,0 +1,18 @@
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_accel_power_mode
|
||||
KernelVersion: 6.11
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Accelerometer power mode. Setting this attribute will set the
|
||||
requested power mode to use if the ODR support it. If ODR
|
||||
support only 1 mode, power mode will be enforced.
|
||||
Reading this attribute will return the current accelerometer
|
||||
power mode if the sensor is on, or the requested value if the
|
||||
sensor is off. The value between real and requested value can
|
||||
be different for ODR supporting only 1 mode.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_accel_power_mode_available
|
||||
KernelVersion: 6.11
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
List of available accelerometer power modes that can be set in
|
||||
in_accel_power_mode attribute.
|
@ -11,7 +11,9 @@ maintainers:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: ti,am3352-eqep
|
||||
enum:
|
||||
- ti,am3352-eqep
|
||||
- ti,am62-eqep
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@ -21,19 +23,35 @@ properties:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
description: The clock that determines the SYSCLKOUT rate for the eQEP
|
||||
peripheral.
|
||||
description: The functional and interface clock that determines the clock
|
||||
rate for the eQEP peripheral.
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
const: sysclkout
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- ti,am62-eqep
|
||||
then:
|
||||
properties:
|
||||
clock-names: false
|
||||
|
||||
required:
|
||||
- power-domains
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
@ -43,7 +61,6 @@ examples:
|
||||
compatible = "ti,am3352-eqep";
|
||||
reg = <0x180 0x80>;
|
||||
clocks = <&l4ls_gclk>;
|
||||
clock-names = "sysclkout";
|
||||
interrupts = <79>;
|
||||
};
|
||||
|
||||
|
@ -38,6 +38,25 @@ properties:
|
||||
The first value specifies the positive input pin, the second
|
||||
specifies the negative input pin.
|
||||
|
||||
single-channel:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
When devices combine single-ended and differential channels, allow the
|
||||
channel for a single element to be specified, independent of reg (as for
|
||||
differential channels). If this and diff-channels are not present reg
|
||||
shall be used instead.
|
||||
|
||||
common-mode-channel:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
Some ADCs have differential input pins that can be used to measure
|
||||
single-ended or pseudo-differential inputs. This property can be used
|
||||
in addition to single-channel to signal software that this channel is
|
||||
not differential but still specify two inputs.
|
||||
|
||||
The input pair is specified by setting single-channel to the positive
|
||||
input pin and common-mode-channel to the negative pin.
|
||||
|
||||
settling-time-us:
|
||||
description:
|
||||
Time between enabling the channel and first stable readings.
|
||||
@ -50,4 +69,15 @@ properties:
|
||||
device design and can interact with other characteristics such as
|
||||
settling time.
|
||||
|
||||
anyOf:
|
||||
- oneOf:
|
||||
- required:
|
||||
- reg
|
||||
- diff-channels
|
||||
- required:
|
||||
- reg
|
||||
- single-channel
|
||||
- required:
|
||||
- reg
|
||||
|
||||
additionalProperties: true
|
||||
|
@ -19,7 +19,18 @@ description: |
|
||||
primarily for measurement of signals close to DC but also delivers
|
||||
outstanding performance with input bandwidths out to ~10kHz.
|
||||
|
||||
Analog Devices AD411x ADC's:
|
||||
The AD411X family encompasses a series of low power, low noise, 24-bit,
|
||||
sigma-delta analog-to-digital converters that offer a versatile range of
|
||||
specifications. They integrate an analog front end suitable for processing
|
||||
fully differential/single-ended and bipolar voltage inputs.
|
||||
|
||||
Datasheets for supported chips:
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD4114.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD4115.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD4116.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-2.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-4.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7173-8.pdf
|
||||
@ -31,6 +42,11 @@ description: |
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,ad4111
|
||||
- adi,ad4112
|
||||
- adi,ad4114
|
||||
- adi,ad4115
|
||||
- adi,ad4116
|
||||
- adi,ad7172-2
|
||||
- adi,ad7172-4
|
||||
- adi,ad7173-8
|
||||
@ -129,10 +145,56 @@ patternProperties:
|
||||
maximum: 15
|
||||
|
||||
diff-channels:
|
||||
description: |
|
||||
This property is used for defining the inputs of a differential
|
||||
voltage channel. The first value is the positive input and the second
|
||||
value is the negative input of the channel.
|
||||
|
||||
Family AD411x supports a dedicated VINCOM voltage input.
|
||||
To select it set the second channel to 16.
|
||||
(VIN2, VINCOM) -> diff-channels = <2 16>
|
||||
|
||||
There are special values that can be selected besides the voltage
|
||||
analog inputs:
|
||||
21: REF+
|
||||
22: REF−
|
||||
|
||||
Supported only by AD7172-2, AD7172-4, AD7175-2, AD7175-8, AD7177-2,
|
||||
must be paired together and can be used to monitor the power supply
|
||||
of the ADC:
|
||||
19: ((AVDD1 − AVSS)/5)+
|
||||
20: ((AVDD1 − AVSS)/5)−
|
||||
|
||||
items:
|
||||
minimum: 0
|
||||
maximum: 31
|
||||
|
||||
single-channel:
|
||||
description: |
|
||||
This property is used for defining a current channel or the positive
|
||||
input of a voltage channel (single-ended or pseudo-differential).
|
||||
|
||||
Models AD4111 and AD4112 support current channels.
|
||||
Example: (IIN2+, IIN2−) -> single-channel = <2>
|
||||
To correctly configure a current channel set the "adi,current-channel"
|
||||
property to true.
|
||||
|
||||
To configure a single-ended/pseudo-differential channel set the
|
||||
"common-mode-channel" property to the desired negative voltage input.
|
||||
|
||||
When used as a voltage channel, special inputs are valid as well.
|
||||
minimum: 0
|
||||
maximum: 31
|
||||
|
||||
common-mode-channel:
|
||||
description:
|
||||
This property is used for defining the negative input of a
|
||||
single-ended or pseudo-differential voltage channel.
|
||||
|
||||
Special inputs are valid as well.
|
||||
minimum: 0
|
||||
maximum: 31
|
||||
|
||||
adi,reference-select:
|
||||
description: |
|
||||
Select the reference source to use when converting on
|
||||
@ -154,9 +216,31 @@ patternProperties:
|
||||
- avdd
|
||||
default: refout-avss
|
||||
|
||||
adi,current-channel:
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
description: |
|
||||
Signal that the selected inputs are current channels.
|
||||
Only available on AD4111 and AD4112.
|
||||
|
||||
required:
|
||||
- reg
|
||||
- diff-channels
|
||||
|
||||
allOf:
|
||||
- oneOf:
|
||||
- required: [single-channel]
|
||||
properties:
|
||||
diff-channels: false
|
||||
- required: [diff-channels]
|
||||
properties:
|
||||
single-channel: false
|
||||
adi,current-channel: false
|
||||
common-mode-channel: false
|
||||
|
||||
- if:
|
||||
required: [common-mode-channel]
|
||||
then:
|
||||
properties:
|
||||
adi,current-channel: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
@ -166,7 +250,6 @@ allOf:
|
||||
- $ref: /schemas/spi/spi-peripheral-props.yaml#
|
||||
|
||||
# Only ad7172-4, ad7173-8 and ad7175-8 support vref2
|
||||
# Other models have [0-3] channel registers
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
@ -187,6 +270,37 @@ allOf:
|
||||
- vref
|
||||
- refout-avss
|
||||
- avdd
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- adi,ad4114
|
||||
- adi,ad4115
|
||||
- adi,ad4116
|
||||
- adi,ad7173-8
|
||||
- adi,ad7175-8
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel@[0-9a-f]$":
|
||||
properties:
|
||||
reg:
|
||||
maximum: 15
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- adi,ad7172-2
|
||||
- adi,ad7175-2
|
||||
- adi,ad7176-2
|
||||
- adi,ad7177-2
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel@[0-9a-f]$":
|
||||
properties:
|
||||
reg:
|
||||
maximum: 3
|
||||
|
||||
@ -210,6 +324,34 @@ allOf:
|
||||
required:
|
||||
- adi,reference-select
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- adi,ad4111
|
||||
- adi,ad4112
|
||||
- adi,ad4114
|
||||
- adi,ad4115
|
||||
- adi,ad4116
|
||||
then:
|
||||
properties:
|
||||
avdd2-supply: false
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
not:
|
||||
contains:
|
||||
enum:
|
||||
- adi,ad4111
|
||||
- adi,ad4112
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel@[0-9a-f]$":
|
||||
properties:
|
||||
adi,current-channel: false
|
||||
|
||||
- if:
|
||||
anyOf:
|
||||
- required: [clock-names]
|
||||
@ -221,6 +363,7 @@ allOf:
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
# Example AD7173-8 with external reference connected to REF+/REF-:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
@ -277,3 +420,50 @@ examples:
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Example AD4111 with current channel and single-ended channel:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
adc@0 {
|
||||
compatible = "adi,ad4111";
|
||||
reg = <0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupt-names = "rdy";
|
||||
interrupt-parent = <&gpio>;
|
||||
spi-max-frequency = <5000000>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
#clock-cells = <0>;
|
||||
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
bipolar;
|
||||
diff-channels = <4 5>;
|
||||
};
|
||||
|
||||
// Single ended channel VIN2/VINCOM
|
||||
channel@1 {
|
||||
reg = <1>;
|
||||
bipolar;
|
||||
single-channel = <2>;
|
||||
common-mode-channel = <16>;
|
||||
};
|
||||
|
||||
// Current channel IN2+/IN2-
|
||||
channel@2 {
|
||||
reg = <2>;
|
||||
single-channel = <2>;
|
||||
adi,current-channel;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -21,8 +21,15 @@ properties:
|
||||
- adi,ad7190
|
||||
- adi,ad7192
|
||||
- adi,ad7193
|
||||
- adi,ad7194
|
||||
- adi,ad7195
|
||||
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
@ -41,6 +48,11 @@ properties:
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
aincom-supply:
|
||||
description: |
|
||||
AINCOM voltage supply. Analog inputs AINx are referenced to this input
|
||||
when configured for pseudo-differential operation.
|
||||
|
||||
dvdd-supply:
|
||||
description: DVdd voltage supply
|
||||
|
||||
@ -84,6 +96,42 @@ properties:
|
||||
description: see Documentation/devicetree/bindings/iio/adc/adc.yaml
|
||||
type: boolean
|
||||
|
||||
patternProperties:
|
||||
"^channel@[0-9a-f]+$":
|
||||
type: object
|
||||
$ref: adc.yaml
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
reg:
|
||||
description: The channel index.
|
||||
minimum: 0
|
||||
maximum: 271
|
||||
|
||||
diff-channels:
|
||||
description:
|
||||
Both inputs can be connected to pins AIN1 to AIN16 by choosing the
|
||||
appropriate value from 1 to 16.
|
||||
items:
|
||||
minimum: 1
|
||||
maximum: 16
|
||||
|
||||
single-channel:
|
||||
description:
|
||||
Positive input can be connected to pins AIN1 to AIN16 by choosing the
|
||||
appropriate value from 1 to 16. Negative input is connected to AINCOM.
|
||||
items:
|
||||
minimum: 1
|
||||
maximum: 16
|
||||
|
||||
oneOf:
|
||||
- required:
|
||||
- reg
|
||||
- diff-channels
|
||||
- required:
|
||||
- reg
|
||||
- single-channel
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
@ -98,6 +146,17 @@ required:
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/spi/spi-peripheral-props.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,ad7190
|
||||
- adi,ad7192
|
||||
- adi,ad7193
|
||||
- adi,ad7195
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel@[0-9a-f]+$": false
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
@ -117,6 +176,7 @@ examples:
|
||||
clock-names = "mclk";
|
||||
interrupts = <25 0x2>;
|
||||
interrupt-parent = <&gpio>;
|
||||
aincom-supply = <&aincom>;
|
||||
dvdd-supply = <&dvdd>;
|
||||
avdd-supply = <&avdd>;
|
||||
vref-supply = <&vref>;
|
||||
@ -127,3 +187,38 @@ examples:
|
||||
adi,burnout-currents-enable;
|
||||
};
|
||||
};
|
||||
- |
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
adc@0 {
|
||||
compatible = "adi,ad7194";
|
||||
reg = <0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
spi-max-frequency = <1000000>;
|
||||
spi-cpol;
|
||||
spi-cpha;
|
||||
clocks = <&ad7192_mclk>;
|
||||
clock-names = "mclk";
|
||||
interrupts = <25 0x2>;
|
||||
interrupt-parent = <&gpio>;
|
||||
aincom-supply = <&aincom>;
|
||||
dvdd-supply = <&dvdd>;
|
||||
avdd-supply = <&avdd>;
|
||||
vref-supply = <&vref>;
|
||||
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
diff-channels = <1 6>;
|
||||
};
|
||||
|
||||
channel@1 {
|
||||
reg = <1>;
|
||||
single-channel = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
148
Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
Normal file
148
Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
Normal file
@ -0,0 +1,148 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/adc/adi,ad7380.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Analog Devices Simultaneous Sampling Analog to Digital Converters
|
||||
|
||||
maintainers:
|
||||
- Michael Hennerich <Michael.Hennerich@analog.com>
|
||||
- Nuno Sá <nuno.sa@analog.com>
|
||||
|
||||
description: |
|
||||
* https://www.analog.com/en/products/ad7380.html
|
||||
* https://www.analog.com/en/products/ad7381.html
|
||||
* https://www.analog.com/en/products/ad7383.html
|
||||
* https://www.analog.com/en/products/ad7384.html
|
||||
* https://www.analog.com/en/products/ad7380-4.html
|
||||
* https://www.analog.com/en/products/ad7381-4.html
|
||||
* https://www.analog.com/en/products/ad7383-4.html
|
||||
* https://www.analog.com/en/products/ad7384-4.html
|
||||
|
||||
$ref: /schemas/spi/spi-peripheral-props.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,ad7380
|
||||
- adi,ad7381
|
||||
- adi,ad7383
|
||||
- adi,ad7384
|
||||
- adi,ad7380-4
|
||||
- adi,ad7381-4
|
||||
- adi,ad7383-4
|
||||
- adi,ad7384-4
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
spi-max-frequency:
|
||||
maximum: 80000000
|
||||
spi-cpol: true
|
||||
spi-cpha: true
|
||||
|
||||
vcc-supply:
|
||||
description: A 3V to 3.6V supply that powers the chip.
|
||||
|
||||
vlogic-supply:
|
||||
description:
|
||||
A 1.65V to 3.6V supply for the logic pins.
|
||||
|
||||
refio-supply:
|
||||
description:
|
||||
A 2.5V to 3.3V supply for the external reference voltage. When omitted,
|
||||
the internal 2.5V reference is used.
|
||||
|
||||
aina-supply:
|
||||
description:
|
||||
The common mode voltage supply for the AINA- pin on pseudo-differential
|
||||
chips.
|
||||
|
||||
ainb-supply:
|
||||
description:
|
||||
The common mode voltage supply for the AINB- pin on pseudo-differential
|
||||
chips.
|
||||
|
||||
ainc-supply:
|
||||
description:
|
||||
The common mode voltage supply for the AINC- pin on pseudo-differential
|
||||
chips.
|
||||
|
||||
aind-supply:
|
||||
description:
|
||||
The common mode voltage supply for the AIND- pin on pseudo-differential
|
||||
chips.
|
||||
|
||||
interrupts:
|
||||
description:
|
||||
When the device is using 1-wire mode, this property is used to optionally
|
||||
specify the ALERT interrupt.
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- vcc-supply
|
||||
- vlogic-supply
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
allOf:
|
||||
# pseudo-differential chips require common mode voltage supplies,
|
||||
# true differential chips don't use them
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,ad7383
|
||||
- adi,ad7384
|
||||
- adi,ad7383-4
|
||||
- adi,ad7384-4
|
||||
then:
|
||||
required:
|
||||
- aina-supply
|
||||
- ainb-supply
|
||||
else:
|
||||
properties:
|
||||
aina-supply: false
|
||||
ainb-supply: false
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,ad7383-4
|
||||
- adi,ad7384-4
|
||||
then:
|
||||
required:
|
||||
- ainc-supply
|
||||
- aind-supply
|
||||
else:
|
||||
properties:
|
||||
ainc-supply: false
|
||||
aind-supply: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
adc@0 {
|
||||
compatible = "adi,ad7380";
|
||||
reg = <0>;
|
||||
|
||||
spi-cpol;
|
||||
spi-cpha;
|
||||
spi-max-frequency = <80000000>;
|
||||
|
||||
interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
|
||||
vcc-supply = <&supply_3_3V>;
|
||||
vlogic-supply = <&supply_3_3V>;
|
||||
refio-supply = <&supply_2_5V>;
|
||||
};
|
||||
};
|
@ -11,6 +11,7 @@ maintainers:
|
||||
|
||||
description: |
|
||||
Analog Devices AD7606 Simultaneous Sampling ADC
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7605-4.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf
|
||||
@ -19,9 +20,9 @@ properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,ad7605-4
|
||||
- adi,ad7606-8
|
||||
- adi,ad7606-6
|
||||
- adi,ad7606-4
|
||||
- adi,ad7606-6
|
||||
- adi,ad7606-8 # Referred to as AD7606 (without -8) in the datasheet
|
||||
- adi,ad7606b
|
||||
- adi,ad7616
|
||||
|
||||
|
@ -66,6 +66,9 @@ properties:
|
||||
nvmem-cell-names:
|
||||
const: temperature_calib
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
|
@ -0,0 +1,33 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/adc/mediatek,mt6359-auxadc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: MediaTek MT6350 series PMIC AUXADC
|
||||
|
||||
maintainers:
|
||||
- AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
|
||||
description:
|
||||
The Auxiliary Analog/Digital Converter (AUXADC) is an ADC found
|
||||
in some MediaTek PMICs, performing various PMIC related measurements
|
||||
such as battery and PMIC internal voltage regulators temperatures,
|
||||
accessory detection resistance (usually, for a 3.5mm audio jack)
|
||||
other than voltages for various PMIC internal components.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- mediatek,mt6357-auxadc
|
||||
- mediatek,mt6358-auxadc
|
||||
- mediatek,mt6359-auxadc
|
||||
|
||||
"#io-channel-cells":
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- "#io-channel-cells"
|
||||
|
||||
additionalProperties: false
|
@ -246,6 +246,10 @@ patternProperties:
|
||||
From common IIO binding. Used to pipe external sigma delta
|
||||
modulator or internal ADC output to DFSDM channel.
|
||||
|
||||
port:
|
||||
$ref: /schemas/sound/audio-graph-port.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- "#sound-dai-cells"
|
||||
|
@ -18,6 +18,7 @@ properties:
|
||||
enum:
|
||||
- ti,ads1015
|
||||
- ti,ads1115
|
||||
- ti,tla2021
|
||||
- ti,tla2024
|
||||
|
||||
reg:
|
||||
|
155
Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml
Normal file
155
Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml
Normal file
@ -0,0 +1,155 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/adc/ti,ads1119.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Texas Instruments ADS1119 ADC
|
||||
|
||||
maintainers:
|
||||
- João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com>
|
||||
|
||||
description:
|
||||
The TI ADS1119 is a precision 16-bit ADC over I2C that offers single-ended and
|
||||
differential measurements using a multiplexed input. It features a programmable
|
||||
gain, a programmable sample rate, an internal oscillator and voltage reference,
|
||||
and a 50/60Hz rejection filter.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: ti,ads1119
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
reset-gpios:
|
||||
maxItems: 1
|
||||
|
||||
avdd-supply: true
|
||||
dvdd-supply: true
|
||||
|
||||
vref-supply:
|
||||
description:
|
||||
ADC external reference voltage (VREF).
|
||||
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
"#io-channel-cells":
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- avdd-supply
|
||||
- dvdd-supply
|
||||
|
||||
patternProperties:
|
||||
"^channel@([0-6])$":
|
||||
$ref: adc.yaml
|
||||
type: object
|
||||
properties:
|
||||
reg:
|
||||
minimum: 0
|
||||
maximum: 6
|
||||
|
||||
diff-channels:
|
||||
description:
|
||||
Differential input channels AIN0-AIN1, AIN2-AIN3 and AIN1-AIN2.
|
||||
oneOf:
|
||||
- items:
|
||||
- const: 0
|
||||
- const: 1
|
||||
- items:
|
||||
- const: 2
|
||||
- const: 3
|
||||
- items:
|
||||
- const: 1
|
||||
- const: 2
|
||||
|
||||
single-channel:
|
||||
description:
|
||||
Single-ended input channels AIN0, AIN1, AIN2 and AIN3.
|
||||
minimum: 0
|
||||
maximum: 3
|
||||
|
||||
oneOf:
|
||||
- required:
|
||||
- diff-channels
|
||||
- required:
|
||||
- single-channel
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
adc@40 {
|
||||
compatible = "ti,ads1119";
|
||||
reg = <0x40>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
|
||||
reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
|
||||
avdd-supply = <®_avdd_ads1119>;
|
||||
dvdd-supply = <®_dvdd_ads1119>;
|
||||
vref-supply = <®_vref_ads1119>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#io-channel-cells = <1>;
|
||||
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
single-channel = <0>;
|
||||
};
|
||||
|
||||
channel@1 {
|
||||
reg = <1>;
|
||||
diff-channels = <0 1>;
|
||||
};
|
||||
|
||||
channel@2 {
|
||||
reg = <2>;
|
||||
single-channel = <3>;
|
||||
};
|
||||
|
||||
channel@3 {
|
||||
reg = <3>;
|
||||
single-channel = <1>;
|
||||
};
|
||||
|
||||
channel@4 {
|
||||
reg = <4>;
|
||||
single-channel = <2>;
|
||||
};
|
||||
|
||||
channel@5 {
|
||||
reg = <5>;
|
||||
diff-channels = <1 2>;
|
||||
};
|
||||
|
||||
channel@6 {
|
||||
reg = <6>;
|
||||
diff-channels = <2 3>;
|
||||
};
|
||||
};
|
||||
};
|
@ -0,0 +1,70 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/chemical/sciosense,ens160.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: ScioSense ENS160 multi-gas sensor
|
||||
|
||||
maintainers:
|
||||
- Gustavo Silva <gustavograzs@gmail.com>
|
||||
|
||||
description: |
|
||||
Digital Multi-Gas Sensor for Monitoring Indoor Air Quality.
|
||||
|
||||
Datasheet:
|
||||
https://www.sciosense.com/wp-content/uploads/2023/12/ENS160-Datasheet.pdf
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- sciosense,ens160
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
vdd-supply: true
|
||||
vddio-supply: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/spi/spi-peripheral-props.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
gas-sensor@52 {
|
||||
compatible = "sciosense,ens160";
|
||||
reg = <0x52>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
|
||||
};
|
||||
};
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
gas-sensor@0 {
|
||||
compatible = "sciosense,ens160";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <10000000>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
|
||||
};
|
||||
};
|
||||
|
||||
...
|
@ -13,13 +13,17 @@ maintainers:
|
||||
description: |
|
||||
Bindings for the Analog Devices AD3552R DAC device and similar.
|
||||
Datasheet can be found here:
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/ad3541r.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/ad3542r.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/ad3551r.pdf
|
||||
https://www.analog.com/media/en/technical-documentation/data-sheets/ad3552r.pdf
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- adi,ad3541r
|
||||
- adi,ad3542r
|
||||
- adi,ad3551r
|
||||
- adi,ad3552r
|
||||
|
||||
reg:
|
||||
@ -92,13 +96,13 @@ patternProperties:
|
||||
maximum: 511
|
||||
minimum: -511
|
||||
|
||||
adi,gain-scaling-p-inv-log2:
|
||||
description: GainP = 1 / ( 2 ^ adi,gain-scaling-p-inv-log2)
|
||||
adi,gain-scaling-p:
|
||||
description: GainP = 1 / ( 2 ^ adi,gain-scaling-p)
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [0, 1, 2, 3]
|
||||
|
||||
adi,gain-scaling-n-inv-log2:
|
||||
description: GainN = 1 / ( 2 ^ adi,gain-scaling-n-inv-log2)
|
||||
adi,gain-scaling-n:
|
||||
description: GainN = 1 / ( 2 ^ adi,gain-scaling-n)
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [0, 1, 2, 3]
|
||||
|
||||
@ -107,8 +111,8 @@ patternProperties:
|
||||
|
||||
required:
|
||||
- adi,gain-offset
|
||||
- adi,gain-scaling-p-inv-log2
|
||||
- adi,gain-scaling-n-inv-log2
|
||||
- adi,gain-scaling-p
|
||||
- adi,gain-scaling-n
|
||||
- adi,rfb-ohms
|
||||
|
||||
required:
|
||||
@ -128,7 +132,9 @@ allOf:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: adi,ad3542r
|
||||
enum:
|
||||
- adi,ad3541r
|
||||
- adi,ad3542r
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel@([0-1])$":
|
||||
@ -158,7 +164,9 @@ allOf:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: adi,ad3552r
|
||||
enum:
|
||||
- adi,ad3551r
|
||||
- adi,ad3552r
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel@([0-1])$":
|
||||
@ -182,6 +190,21 @@ allOf:
|
||||
- const: -10000000
|
||||
- const: 10000000
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- adi,ad3541r
|
||||
- adi,ad3551r
|
||||
then:
|
||||
properties:
|
||||
channel@1: false
|
||||
channel@0:
|
||||
properties:
|
||||
reg:
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
@ -208,8 +231,8 @@ examples:
|
||||
reg = <1>;
|
||||
custom-output-range-config {
|
||||
adi,gain-offset = <5>;
|
||||
adi,gain-scaling-p-inv-log2 = <1>;
|
||||
adi,gain-scaling-n-inv-log2 = <2>;
|
||||
adi,gain-scaling-p = <1>;
|
||||
adi,gain-scaling-n = <2>;
|
||||
adi,rfb-ohms = <1>;
|
||||
};
|
||||
};
|
||||
|
@ -28,6 +28,12 @@ properties:
|
||||
clock-names:
|
||||
const: clkin
|
||||
|
||||
'#clock-cells':
|
||||
const: 0
|
||||
|
||||
clock-output-names:
|
||||
maxItems: 1
|
||||
|
||||
gpios:
|
||||
maxItems: 1
|
||||
description: Lock detect GPIO.
|
||||
|
@ -30,12 +30,19 @@ properties:
|
||||
- adi,adis16467-2
|
||||
- adi,adis16467-3
|
||||
- adi,adis16500
|
||||
- adi,adis16501
|
||||
- adi,adis16505-1
|
||||
- adi,adis16505-2
|
||||
- adi,adis16505-3
|
||||
- adi,adis16507-1
|
||||
- adi,adis16507-2
|
||||
- adi,adis16507-3
|
||||
- adi,adis16575-2
|
||||
- adi,adis16575-3
|
||||
- adi,adis16576-2
|
||||
- adi,adis16576-3
|
||||
- adi,adis16577-2
|
||||
- adi,adis16577-3
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@ -90,12 +97,19 @@ allOf:
|
||||
contains:
|
||||
enum:
|
||||
- adi,adis16500
|
||||
- adi,adis16501
|
||||
- adi,adis16505-1
|
||||
- adi,adis16505-2
|
||||
- adi,adis16505-3
|
||||
- adi,adis16507-1
|
||||
- adi,adis16507-2
|
||||
- adi,adis16507-3
|
||||
- adi,adis16575-2
|
||||
- adi,adis16575-3
|
||||
- adi,adis16576-2
|
||||
- adi,adis16576-3
|
||||
- adi,adis16577-2
|
||||
- adi,adis16577-3
|
||||
|
||||
then:
|
||||
properties:
|
||||
@ -112,6 +126,23 @@ allOf:
|
||||
dependencies:
|
||||
adi,sync-mode: [ clocks ]
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- adi,adis16575-2
|
||||
- adi,adis16575-3
|
||||
- adi,adis16576-2
|
||||
- adi,adis16576-3
|
||||
- adi,adis16577-2
|
||||
- adi,adis16577-3
|
||||
|
||||
then:
|
||||
properties:
|
||||
spi-max-frequency:
|
||||
maximum: 15000000
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
|
@ -23,6 +23,12 @@ properties:
|
||||
- adi,adis16497-1
|
||||
- adi,adis16497-2
|
||||
- adi,adis16497-3
|
||||
- adi,adis16545-1
|
||||
- adi,adis16545-2
|
||||
- adi,adis16545-3
|
||||
- adi,adis16547-1
|
||||
- adi,adis16547-2
|
||||
- adi,adis16547-3
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
@ -16,7 +16,11 @@ description: |
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: bosch,bmi160
|
||||
oneOf:
|
||||
- const: bosch,bmi160
|
||||
- items:
|
||||
- const: bosch,bmi120
|
||||
- const: bosch,bmi160
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
@ -4,14 +4,19 @@
|
||||
$id: http://devicetree.org/schemas/iio/light/vishay,veml6075.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Vishay VEML6075 UVA and UVB sensor
|
||||
title: Vishay VEML6075 UVA/B and VEML6040 RGBW sensors
|
||||
|
||||
maintainers:
|
||||
- Javier Carrasco <javier.carrasco.cruz@gmail.com>
|
||||
|
||||
description:
|
||||
VEML6040 datasheet at https://www.vishay.com/docs/84276/veml6040.pdf
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: vishay,veml6075
|
||||
enum:
|
||||
- vishay,veml6040
|
||||
- vishay,veml6075
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
@ -26,6 +26,7 @@ properties:
|
||||
- st,lis2dw12
|
||||
- st,lis2hh12
|
||||
- st,lis2dh12-accel
|
||||
- st,lis2ds12
|
||||
- st,lis302dl
|
||||
- st,lis331dl-accel
|
||||
- st,lis331dlh-accel
|
||||
|
@ -0,0 +1,51 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/interconnect/mediatek,mt8183-emi.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: MediaTek External Memory Interface (EMI) Interconnect
|
||||
|
||||
maintainers:
|
||||
- AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
|
||||
description: |
|
||||
EMI interconnect providers support system bandwidth requirements through
|
||||
Dynamic Voltage Frequency Scaling Resource Collector (DVFSRC) hardware.
|
||||
The provider is able to communicate with the DVFSRC through Secure Monitor
|
||||
Call (SMC).
|
||||
|
||||
ICC provider ICC Nodes
|
||||
---- ----
|
||||
_________ |CPU | |--- |VPU |
|
||||
_____ | |----- ---- | ----
|
||||
| |->| DRAM | ---- | ----
|
||||
|DRAM |->|scheduler|----- |GPU | |--- |DISP|
|
||||
| |->| (EMI) | ---- | ----
|
||||
|_____|->|_________|---. ----- | ----
|
||||
/|\ `-|MMSYS|--|--- |VDEC|
|
||||
| ----- | ----
|
||||
| | ----
|
||||
| change DRAM freq |--- |VENC|
|
||||
-------- | ----
|
||||
SMC --> | DVFSRC | | ----
|
||||
-------- |--- |IMG |
|
||||
| ----
|
||||
| ----
|
||||
|--- |CAM |
|
||||
----
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- mediatek,mt8183-emi
|
||||
- mediatek,mt8195-emi
|
||||
|
||||
'#interconnect-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- '#interconnect-cells'
|
||||
|
||||
unevaluatedProperties: false
|
101
Documentation/devicetree/bindings/interconnect/qcom,msm8953.yaml
Normal file
101
Documentation/devicetree/bindings/interconnect/qcom,msm8953.yaml
Normal file
@ -0,0 +1,101 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/interconnect/qcom,msm8953.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm MSM8953 Network-On-Chip interconnect
|
||||
|
||||
maintainers:
|
||||
- Barnabas Czeman <barnabas.czeman@mainlining.org>
|
||||
|
||||
description: |
|
||||
The Qualcomm MSM8953 interconnect providers support adjusting the
|
||||
bandwidth requirements between the various NoC fabrics.
|
||||
|
||||
See also:
|
||||
- dt-bindings/interconnect/qcom,msm8953.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,msm8953-bimc
|
||||
- qcom,msm8953-pcnoc
|
||||
- qcom,msm8953-snoc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
maxItems: 1
|
||||
|
||||
'#interconnect-cells':
|
||||
const: 2
|
||||
|
||||
patternProperties:
|
||||
'^interconnect-[a-z0-9\-]+$':
|
||||
type: object
|
||||
$ref: qcom,rpm-common.yaml#
|
||||
unevaluatedProperties: false
|
||||
description:
|
||||
The interconnect providers do not have a separate QoS register space,
|
||||
but share parent's space.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,msm8953-snoc-mm
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- '#interconnect-cells'
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- '#interconnect-cells'
|
||||
|
||||
allOf:
|
||||
- $ref: qcom,rpm-common.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,msm8953-pcnoc
|
||||
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: PCNOC USB3 AXI Clock.
|
||||
|
||||
clock-names:
|
||||
const: pcnoc_usb3_axi
|
||||
|
||||
required:
|
||||
- clocks
|
||||
- clock-names
|
||||
else:
|
||||
properties:
|
||||
clocks: false
|
||||
clock-names: false
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-msm8953.h>
|
||||
|
||||
snoc: interconnect@580000 {
|
||||
compatible = "qcom,msm8953-snoc";
|
||||
reg = <0x580000 0x16080>;
|
||||
|
||||
#interconnect-cells = <2>;
|
||||
|
||||
snoc_mm: interconnect-snoc {
|
||||
compatible = "qcom,msm8953-snoc-mm";
|
||||
|
||||
#interconnect-cells = <2>;
|
||||
};
|
||||
};
|
@ -35,6 +35,10 @@ properties:
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
@ -53,10 +57,50 @@ allOf:
|
||||
required:
|
||||
- reg
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sc7280-aggre1-noc
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: aggre UFS PHY AXI clock
|
||||
- description: aggre USB3 PRIM AXI clock
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sc7280-aggre2-noc
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: RPMH CC IPA clock
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sc7280-aggre1-noc
|
||||
- qcom,sc7280-aggre2-noc
|
||||
then:
|
||||
required:
|
||||
- clocks
|
||||
else:
|
||||
properties:
|
||||
clocks: false
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-sc7280.h>
|
||||
interconnect {
|
||||
compatible = "qcom,sc7280-clk-virt";
|
||||
#interconnect-cells = <2>;
|
||||
@ -69,3 +113,12 @@ examples:
|
||||
#interconnect-cells = <2>;
|
||||
qcom,bcm-voters = <&apps_bcm_voter>;
|
||||
};
|
||||
|
||||
interconnect@16e0000 {
|
||||
reg = <0x016e0000 0x1c080>;
|
||||
compatible = "qcom,sc7280-aggre1-noc";
|
||||
#interconnect-cells = <2>;
|
||||
qcom,bcm-voters = <&apps_bcm_voter>;
|
||||
clocks = <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>,
|
||||
<&gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>;
|
||||
};
|
||||
|
@ -29,6 +29,9 @@ properties:
|
||||
Defaults to 10 if unset.
|
||||
default: 10
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
timeout-sec:
|
||||
description: |
|
||||
The stall detector expiration timeout measured in seconds.
|
||||
@ -43,9 +46,12 @@ additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
vmwdt@9030000 {
|
||||
compatible = "qemu,vcpu-stall-detector";
|
||||
reg = <0x9030000 0x10000>;
|
||||
clock-frequency = <10>;
|
||||
timeout-sec = <8>;
|
||||
interrupts = <GIC_PPI 15 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
|
@ -28,6 +28,9 @@ properties:
|
||||
description: phandle to the secure-monitor node
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
|
@ -28,7 +28,9 @@ properties:
|
||||
- enum:
|
||||
- mediatek,mt7622-efuse
|
||||
- mediatek,mt7623-efuse
|
||||
- mediatek,mt7981-efuse
|
||||
- mediatek,mt7986-efuse
|
||||
- mediatek,mt7988-efuse
|
||||
- mediatek,mt8173-efuse
|
||||
- mediatek,mt8183-efuse
|
||||
- mediatek,mt8186-efuse
|
||||
|
@ -1270,6 +1270,8 @@ patternProperties:
|
||||
description: Schindler
|
||||
"^schneider,.*":
|
||||
description: Schneider Electric
|
||||
"^sciosense,.*":
|
||||
description: ScioSense B.V.
|
||||
"^seagate,.*":
|
||||
description: Seagate Technology PLC
|
||||
"^seeed,.*":
|
||||
|
@ -80,6 +80,10 @@ The details of these operations are:
|
||||
|
||||
- slave_sg: DMA a list of scatter gather buffers from/to a peripheral
|
||||
|
||||
- peripheral_dma_vec: DMA an array of scatter gather buffers from/to a
|
||||
peripheral. Similar to slave_sg, but uses an array of dma_vec
|
||||
structures instead of a scatterlist.
|
||||
|
||||
- dma_cyclic: Perform a cyclic DMA operation from/to a peripheral till the
|
||||
operation is explicitly stopped.
|
||||
|
||||
@ -102,6 +106,11 @@ The details of these operations are:
|
||||
unsigned int sg_len, enum dma_data_direction direction,
|
||||
unsigned long flags);
|
||||
|
||||
struct dma_async_tx_descriptor *dmaengine_prep_peripheral_dma_vec(
|
||||
struct dma_chan *chan, const struct dma_vec *vecs,
|
||||
size_t nents, enum dma_data_direction direction,
|
||||
unsigned long flags);
|
||||
|
||||
struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic(
|
||||
struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
|
||||
size_t period_len, enum dma_data_direction direction);
|
||||
|
@ -433,6 +433,12 @@ supported.
|
||||
- residue: Provides the residue bytes of the transfer for those that
|
||||
support residue.
|
||||
|
||||
- ``device_prep_peripheral_dma_vec``
|
||||
|
||||
- Similar to ``device_prep_slave_sg``, but it takes a pointer to a
|
||||
array of ``dma_vec`` structures, which (in the long run) will replace
|
||||
scatterlists.
|
||||
|
||||
- ``device_issue_pending``
|
||||
|
||||
- Takes the first transaction descriptor in the pending queue,
|
||||
@ -544,6 +550,10 @@ dma_cookie_t
|
||||
- Not really relevant any more since the introduction of ``virt-dma``
|
||||
that abstracts it away.
|
||||
|
||||
dma_vec
|
||||
|
||||
- A small structure that contains a DMA address and length.
|
||||
|
||||
DMA_CTRL_ACK
|
||||
|
||||
- If clear, the descriptor cannot be reused by provider until the
|
||||
|
@ -380,24 +380,5 @@ data is structured.
|
||||
4. IIO Interfacing Tools
|
||||
========================
|
||||
|
||||
Linux Kernel Tools
|
||||
------------------
|
||||
|
||||
Linux Kernel provides some userspace tools that can be used to retrieve data
|
||||
from IIO sysfs:
|
||||
|
||||
* lsiio: example application that provides a list of IIO devices and triggers
|
||||
* iio_event_monitor: example application that reads events from an IIO device
|
||||
and prints them
|
||||
* iio_generic_buffer: example application that reads data from buffer
|
||||
* iio_utils: set of APIs, typically used to access sysfs files.
|
||||
|
||||
LibIIO
|
||||
------
|
||||
|
||||
LibIIO is a C/C++ library that provides generic access to IIO devices. The
|
||||
library abstracts the low-level details of the hardware, and provides a simple
|
||||
yet complete programming interface that can be used for advanced projects.
|
||||
|
||||
For more information about LibIIO, please see:
|
||||
https://github.com/analogdevicesinc/libiio
|
||||
See ``Documentation/iio/iio_tools.rst`` for the description of the available IIO
|
||||
interfacing tools.
|
||||
|
443
Documentation/iio/adis16480.rst
Normal file
443
Documentation/iio/adis16480.rst
Normal file
@ -0,0 +1,443 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
================
|
||||
ADIS16480 driver
|
||||
================
|
||||
|
||||
This driver supports Analog Device's IMUs on SPI bus.
|
||||
|
||||
1. Supported devices
|
||||
====================
|
||||
|
||||
* `ADIS16375 <https://www.analog.com/ADIS16375>`_
|
||||
* `ADIS16480 <https://www.analog.com/ADIS16480>`_
|
||||
* `ADIS16485 <https://www.analog.com/ADIS16485>`_
|
||||
* `ADIS16488 <https://www.analog.com/ADIS16488>`_
|
||||
* `ADIS16490 <https://www.analog.com/ADIS16490>`_
|
||||
* `ADIS16495 <https://www.analog.com/ADIS16495>`_
|
||||
* `ADIS16497 <https://www.analog.com/ADIS16497>`_
|
||||
* `ADIS16545 <https://www.analog.com/ADIS16545>`_
|
||||
* `ADIS16547 <https://www.analog.com/ADIS16547>`_
|
||||
|
||||
Each supported device is a complete inertial system that includes a triaxial
|
||||
gyroscope and a triaxial accelerometer. Each inertial sensor in device combines
|
||||
with signal conditioning that optimizes dynamic performance. The factory
|
||||
calibration characterizes each sensor for sensitivity, bias, and alignment. As
|
||||
a result, each sensor has its own dynamic compensation formulas that provide
|
||||
accurate sensor measurements.
|
||||
|
||||
2. Device attributes
|
||||
====================
|
||||
|
||||
Accelerometer, gyroscope measurements are always provided. Furthermore, the
|
||||
driver offers the capability to retrieve the delta angle and the delta velocity
|
||||
measurements computed by the device.
|
||||
|
||||
The delta angle measurements represent a calculation of angular displacement
|
||||
between each sample update, while the delta velocity measurements represent a
|
||||
calculation of linear velocity change between each sample update.
|
||||
|
||||
Finally, temperature data are provided which show a coarse measurement of
|
||||
the temperature inside of the IMU device. This data is most useful for
|
||||
monitoring relative changes in the thermal environment.
|
||||
|
||||
ADIS16480 and ADIS16488 also provide access to barometric pressure data and
|
||||
triaxial magnetometer measurements.
|
||||
|
||||
Each IIO device, has a device folder under ``/sys/bus/iio/devices/iio:deviceX``,
|
||||
where X is the IIO index of the device. Under these folders reside a set of
|
||||
device files, depending on the characteristics and features of the hardware
|
||||
device in questions. These files are consistently generalized and documented in
|
||||
the IIO ABI documentation.
|
||||
|
||||
The following tables show the adis16480 related device files, found in the
|
||||
specific device folder path ``/sys/bus/iio/devices/iio:deviceX``.
|
||||
|
||||
**Available only for ADIS16480 and ADIS16488:**
|
||||
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
| 3-Axis Magnetometer related device files | Description |
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
| in_magn_scale | Scale for the magnetometer channels. |
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
| in_magn_x_calibbias | Calibration offset for the X-axis magnetometer channel. |
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
| in_magn_x_filter_low_pass_3db_frequency | Bandwidth for the X-axis magnetometer channel. |
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
| in_magn_x_raw | Raw X-axis magnetometer channel value. |
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
| in_magn_y_calibbias | Calibration offset for the Y-axis magnetometer channel. |
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
| in_magn_y_filter_low_pass_3db_frequency | Bandwidth for the Y-axis magnetometer channel. |
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
| in_magn_y_raw | Raw Y-axis magnetometer channel value. |
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
| in_magn_z_calibbias | Calibration offset for the Z-axis magnetometer channel. |
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
| in_magn_z_filter_low_pass_3db_frequency | Bandwidth for the Z-axis magnetometer channel. |
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
| in_magn_z_raw | Raw Z-axis magnetometer channel value. |
|
||||
+------------------------------------------+---------------------------------------------------------+
|
||||
|
||||
+------------------------------------------+-----------------------------------------------------+
|
||||
| Barometric pressure sensor related files | Description |
|
||||
+------------------------------------------+-----------------------------------------------------+
|
||||
| in_pressure0_calibbias | Calibration offset for barometric pressure channel. |
|
||||
+------------------------------------------+-----------------------------------------------------+
|
||||
| in_pressure0_raw | Raw barometric pressure channel value. |
|
||||
+------------------------------------------+-----------------------------------------------------+
|
||||
| in_pressure0_scale | Scale for the barometric pressure sensor channel. |
|
||||
+------------------------------------------+-----------------------------------------------------+
|
||||
|
||||
**Available for all supported devices:**
|
||||
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| 3-Axis Accelerometer related device files | Description |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_scale | Scale for the accelerometer channels. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_x_calibbias | Calibration offset for the X-axis accelerometer channel. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_x_calibscale | Calibration scale for the X-axis accelerometer channel. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_x_filter_low_pass_3db_frequency | Bandwidth for the X-axis accelerometer channel. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_x_raw | Raw X-axis accelerometer channel value. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_y_calibbias | Calibration offset for the Y-axis accelerometer channel. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_y_calibscale | Calibration scale for the Y-axis accelerometer channel. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_y_filter_low_pass_3db_frequency | Bandwidth for the Y-axis accelerometer channel. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_y_raw | Raw Y-axis accelerometer channel value. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_z_calibbias | Calibration offset for the Z-axis accelerometer channel. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_z_calibscale | Calibration scale for the Z-axis accelerometer channel. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_z_filter_low_pass_3db_frequency | Bandwidth for the Z-axis accelerometer channel. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_accel_z_raw | Raw Z-axis accelerometer channel value. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_deltavelocity_scale | Scale for delta velocity channels. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_deltavelocity_x_raw | Raw X-axis delta velocity channel value. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_deltavelocity_y_raw | Raw Y-axis delta velocity channel value. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
| in_deltavelocity_z_raw | Raw Z-axis delta velocity channel value. |
|
||||
+-------------------------------------------+----------------------------------------------------------+
|
||||
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| 3-Axis Gyroscope related device files | Description |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_scale | Scale for the gyroscope channels. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_x_calibbias | Calibration offset for the X-axis gyroscope channel. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_x_calibscale | Calibration scale for the X-axis gyroscope channel. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_x_filter_low_pass_3db_frequency | Bandwidth for the X-axis gyroscope channel. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_x_raw | Raw X-axis gyroscope channel value. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_y_calibbias | Calibration offset for the Y-axis gyroscope channel. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_y_calibscale | Calibration scale for the Y-axis gyroscope channel. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_y_filter_low_pass_3db_frequency | Bandwidth for the Y-axis gyroscope channel. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_y_raw | Raw Y-axis gyroscope channel value. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_z_calibbias | Calibration offset for the Z-axis gyroscope channel. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_z_calibscale | Calibration scale for the Z-axis gyroscope channel. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_z_filter_low_pass_3db_frequency | Bandwidth for the Z-axis gyroscope channel. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_anglvel_z_raw | Raw Z-axis gyroscope channel value. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_deltaangl_scale | Scale for delta angle channels. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_deltaangl_x_raw | Raw X-axis delta angle channel value. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_deltaangl_y_raw | Raw Y-axis delta angle channel value. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
| in_deltaangl_z_raw | Raw Z-axis delta angle channel value. |
|
||||
+--------------------------------------------+------------------------------------------------------+
|
||||
|
||||
+----------------------------------+-------------------------------------------+
|
||||
| Temperature sensor related files | Description |
|
||||
+----------------------------------+-------------------------------------------+
|
||||
| in_temp0_raw | Raw temperature channel value. |
|
||||
+----------------------------------+-------------------------------------------+
|
||||
| in_temp0_offset | Offset for the temperature sensor channel.|
|
||||
+----------------------------------+-------------------------------------------+
|
||||
| in_temp0_scale | Scale for the temperature sensor channel. |
|
||||
+----------------------------------+-------------------------------------------+
|
||||
|
||||
+-------------------------------+---------------------------------------------------------+
|
||||
| Miscellaneous device files | Description |
|
||||
+-------------------------------+---------------------------------------------------------+
|
||||
| name | Name of the IIO device. |
|
||||
+-------------------------------+---------------------------------------------------------+
|
||||
| sampling_frequency | Currently selected sample rate. |
|
||||
+-------------------------------+---------------------------------------------------------+
|
||||
|
||||
The following table shows the adis16480 related device debug files, found in the
|
||||
specific device debug folder path ``/sys/kernel/debug/iio/iio:deviceX``.
|
||||
|
||||
+----------------------+-------------------------------------------------------------------------+
|
||||
| Debugfs device files | Description |
|
||||
+----------------------+-------------------------------------------------------------------------+
|
||||
| serial_number | The serial number of the chip in hexadecimal format. |
|
||||
+----------------------+-------------------------------------------------------------------------+
|
||||
| product_id | Chip specific product id (e.g. 16480, 16488, 16545, etc.). |
|
||||
+----------------------+-------------------------------------------------------------------------+
|
||||
| flash_count | The number of flash writes performed on the device. |
|
||||
+----------------------+-------------------------------------------------------------------------+
|
||||
| firmware_revision | String containing the firmware revision in the following format ##.##. |
|
||||
+----------------------+-------------------------------------------------------------------------+
|
||||
| firmware_date | String containing the firmware date in the following format mm-dd-yyyy. |
|
||||
+----------------------+-------------------------------------------------------------------------+
|
||||
|
||||
Channels processed values
|
||||
-------------------------
|
||||
|
||||
A channel value can be read from its _raw attribute. The value returned is the
|
||||
raw value as reported by the devices. To get the processed value of the channel,
|
||||
apply the following formula:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
processed value = (_raw + _offset) * _scale
|
||||
|
||||
Where _offset and _scale are device attributes. If no _offset attribute is
|
||||
present, simply assume its value is 0.
|
||||
|
||||
The adis16480 driver offers data for 7 types of channels, the table below shows
|
||||
the measurement units for the processed value, which are defined by the IIO
|
||||
framework:
|
||||
|
||||
+--------------------------------------+---------------------------+
|
||||
| Channel type | Measurement unit |
|
||||
+--------------------------------------+---------------------------+
|
||||
| Acceleration on X, Y, and Z axis | Meters per Second squared |
|
||||
+--------------------------------------+---------------------------+
|
||||
| Angular velocity on X, Y and Z axis | Radians per second |
|
||||
+--------------------------------------+---------------------------+
|
||||
| Delta velocity on X. Y, and Z axis | Meters per Second |
|
||||
+--------------------------------------+---------------------------+
|
||||
| Delta angle on X, Y, and Z axis | Radians |
|
||||
+--------------------------------------+---------------------------+
|
||||
| Temperature | Millidegrees Celsius |
|
||||
+--------------------------------------+---------------------------+
|
||||
| Magnetic field along X, Y and Z axis | Gauss |
|
||||
+--------------------------------------+---------------------------+
|
||||
| Barometric pressure | kilo Pascal |
|
||||
+--------------------------------------+---------------------------+
|
||||
|
||||
Usage examples
|
||||
--------------
|
||||
|
||||
Show device name:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> cat name
|
||||
adis16545-1
|
||||
|
||||
Show accelerometer channels value:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_raw
|
||||
1376728
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_accel_y_raw
|
||||
4487621
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_accel_z_raw
|
||||
262773792
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_accel_scale
|
||||
0.000000037
|
||||
|
||||
- X-axis acceleration = in_accel_x_raw * in_accel_scale = 0.050938936 m/s^2
|
||||
- Y-axis acceleration = in_accel_y_raw * in_accel_scale = 0.166041977 m/s^2
|
||||
- Z-axis acceleration = in_accel_z_raw * in_accel_scale = 9.722630304 m/s^2
|
||||
|
||||
Show gyroscope channels value:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_x_raw
|
||||
-1041702
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_raw
|
||||
-273013
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_z_raw
|
||||
2745116
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_scale
|
||||
0.000000001
|
||||
|
||||
- X-axis angular velocity = in_anglvel_x_raw * in_anglvel_scale = −0.001041702 rad/s
|
||||
- Y-axis angular velocity = in_anglvel_y_raw * in_anglvel_scale = −0.000273013 rad/s
|
||||
- Z-axis angular velocity = in_anglvel_z_raw * in_anglvel_scale = 0.002745116 rad/s
|
||||
|
||||
Set calibration offset for accelerometer channels:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
|
||||
0
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> echo 5000 > in_accel_x_calibbias
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
|
||||
5000
|
||||
|
||||
Set calibration offset for gyroscope channels:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_calibbias
|
||||
0
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> echo -5000 > in_anglvel_y_calibbias
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_calibbias
|
||||
-5000
|
||||
|
||||
Set sampling frequency:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency
|
||||
4250.000000
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> echo 1000 > sampling_frequency
|
||||
1062.500000
|
||||
|
||||
Set bandwidth for accelerometer channels:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_filter_low_pass_3db_frequency
|
||||
0
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> echo 300 > in_accel_x_filter_low_pass_3db_frequency
|
||||
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_filter_low_pass_3db_frequency
|
||||
300
|
||||
|
||||
Show serial number:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/kernel/debug/iio/iio:device0> cat serial_number
|
||||
0x000c
|
||||
|
||||
Show product id:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/kernel/debug/iio/iio:device0> cat product_id
|
||||
16545
|
||||
|
||||
Show flash count:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/kernel/debug/iio/iio:device0> cat flash_count
|
||||
88
|
||||
|
||||
Show firmware revision:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/kernel/debug/iio/iio:device0> cat firmware_revision
|
||||
1.4
|
||||
|
||||
Show firmware date:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/kernel/debug/iio/iio:device0> cat firmware_date
|
||||
09-23-2023
|
||||
|
||||
3. Device buffers
|
||||
=================
|
||||
|
||||
This driver supports IIO buffers.
|
||||
|
||||
All devices support retrieving the raw acceleration, gyroscope and temperature
|
||||
measurements using buffers.
|
||||
|
||||
The following device families also support retrieving the delta velocity, delta
|
||||
angle and temperature measurements using buffers:
|
||||
|
||||
- ADIS16545
|
||||
- ADIS16547
|
||||
|
||||
However, when retrieving acceleration or gyroscope data using buffers, delta
|
||||
readings will not be available and vice versa. This is because the device only
|
||||
allows to read either acceleration and gyroscope data or delta velocity and
|
||||
delta angle data at a time and switching between these two burst data selection
|
||||
modes is time consuming.
|
||||
|
||||
Usage examples
|
||||
--------------
|
||||
|
||||
Set device trigger in current_trigger, if not already set:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> cat trigger/current_trigger
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> echo adis16545-1-dev0 > trigger/current_trigger
|
||||
root:/sys/bus/iio/devices/iio:device0> cat trigger/current_trigger
|
||||
adis16545-1-dev0
|
||||
|
||||
Select channels for buffer read:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_x_en
|
||||
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_y_en
|
||||
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_z_en
|
||||
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_temp0_en
|
||||
|
||||
Set the number of samples to be stored in the buffer:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> echo 10 > buffer/length
|
||||
|
||||
Enable buffer readings:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> echo 1 > buffer/enable
|
||||
|
||||
Obtain buffered data::
|
||||
|
||||
root:/sys/bus/iio/devices/iio:device0> hexdump -C /dev/iio\:device0
|
||||
...
|
||||
00006aa0 09 62 00 00 ff ff fc a4 00 00 01 69 00 03 3c 08 |.b.........i..<.|
|
||||
00006ab0 09 61 00 00 00 00 02 96 00 00 02 8f 00 03 37 50 |.a............7P|
|
||||
00006ac0 09 61 00 00 00 00 12 3d 00 00 0b 89 00 03 2c 0b |.a.....=......,.|
|
||||
00006ad0 09 61 00 00 00 00 1e dc 00 00 16 dd 00 03 25 bf |.a............%.|
|
||||
00006ae0 09 61 00 00 00 00 1e e3 00 00 1b bf 00 03 27 0b |.a............'.|
|
||||
00006af0 09 61 00 00 00 00 15 50 00 00 19 44 00 03 30 fd |.a.....P...D..0.|
|
||||
00006b00 09 61 00 00 00 00 09 0e 00 00 14 41 00 03 3d 7f |.a.........A..=.|
|
||||
00006b10 09 61 00 00 ff ff ff f0 00 00 0e bc 00 03 48 d0 |.a............H.|
|
||||
00006b20 09 63 00 00 00 00 00 9f 00 00 0f 37 00 03 4c fe |.c.........7..L.|
|
||||
00006b30 09 64 00 00 00 00 0b f6 00 00 18 92 00 03 43 22 |.d............C"|
|
||||
00006b40 09 64 00 00 00 00 18 df 00 00 22 33 00 03 33 ab |.d........"3..3.|
|
||||
00006b50 09 63 00 00 00 00 1e 81 00 00 26 be 00 03 29 60 |.c........&...)`|
|
||||
00006b60 09 63 00 00 00 00 1b 13 00 00 22 2f 00 03 23 91 |.c........"/..#.|
|
||||
...
|
||||
|
||||
See ``Documentation/iio/iio_devbuf.rst`` for more information about how buffered
|
||||
data is structured.
|
||||
|
||||
4. IIO Interfacing Tools
|
||||
========================
|
||||
|
||||
See ``Documentation/iio/iio_tools.rst`` for the description of the available IIO
|
||||
interfacing tools.
|
54
Documentation/iio/iio_dmabuf_api.rst
Normal file
54
Documentation/iio/iio_dmabuf_api.rst
Normal file
@ -0,0 +1,54 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
===================================
|
||||
High-speed DMABUF interface for IIO
|
||||
===================================
|
||||
|
||||
1. Overview
|
||||
===========
|
||||
|
||||
The Industrial I/O subsystem supports access to buffers through a
|
||||
file-based interface, with read() and write() access calls through the
|
||||
IIO device's dev node.
|
||||
|
||||
It additionally supports a DMABUF based interface, where the userspace
|
||||
can attach DMABUF objects (externally created) to an IIO buffer, and
|
||||
subsequently use them for data transfers.
|
||||
|
||||
A userspace application can then use this interface to share DMABUF
|
||||
objects between several interfaces, allowing it to transfer data in a
|
||||
zero-copy fashion, for instance between IIO and the USB stack.
|
||||
|
||||
The userspace application can also memory-map the DMABUF objects, and
|
||||
access the sample data directly. The advantage of doing this vs. the
|
||||
read() interface is that it avoids an extra copy of the data between the
|
||||
kernel and userspace. This is particularly useful for high-speed devices
|
||||
which produce several megabytes or even gigabytes of data per second.
|
||||
It does however increase the userspace-kernelspace synchronization
|
||||
overhead, as the DMA_BUF_SYNC_START and DMA_BUF_SYNC_END IOCTLs have to
|
||||
be used for data integrity.
|
||||
|
||||
2. User API
|
||||
===========
|
||||
|
||||
As part of this interface, three new IOCTLs have been added. These three
|
||||
IOCTLs have to be performed on the IIO buffer's file descriptor, which
|
||||
can be obtained using the IIO_BUFFER_GET_FD_IOCTL() ioctl.
|
||||
|
||||
``IIO_BUFFER_DMABUF_ATTACH_IOCTL(int fd)``
|
||||
Attach the DMABUF object, identified by its file descriptor, to the
|
||||
IIO buffer. Returns zero on success, and a negative errno value on
|
||||
error.
|
||||
|
||||
``IIO_BUFFER_DMABUF_DETACH_IOCTL(int fd)``
|
||||
Detach the given DMABUF object, identified by its file descriptor,
|
||||
from the IIO buffer. Returns zero on success, and a negative errno
|
||||
value on error.
|
||||
|
||||
Note that closing the IIO buffer's file descriptor will
|
||||
automatically detach all previously attached DMABUF objects.
|
||||
|
||||
``IIO_BUFFER_DMABUF_ENQUEUE_IOCTL(struct iio_dmabuf *iio_dmabuf)``
|
||||
Enqueue a previously attached DMABUF object to the buffer queue.
|
||||
Enqueued DMABUFs will be read from (if output buffer) or written to
|
||||
(if input buffer) as long as the buffer is enabled.
|
27
Documentation/iio/iio_tools.rst
Normal file
27
Documentation/iio/iio_tools.rst
Normal file
@ -0,0 +1,27 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
=====================
|
||||
IIO Interfacing Tools
|
||||
=====================
|
||||
|
||||
1. Linux Kernel Tools
|
||||
=====================
|
||||
|
||||
Linux Kernel provides some userspace tools that can be used to retrieve data
|
||||
from IIO sysfs:
|
||||
|
||||
* lsiio: example application that provides a list of IIO devices and triggers
|
||||
* iio_event_monitor: example application that reads events from an IIO device
|
||||
and prints them
|
||||
* iio_generic_buffer: example application that reads data from buffer
|
||||
* iio_utils: set of APIs, typically used to access sysfs files.
|
||||
|
||||
2. LibIIO
|
||||
=========
|
||||
|
||||
LibIIO is a C/C++ library that provides generic access to IIO devices. The
|
||||
library abstracts the low-level details of the hardware, and provides a simple
|
||||
yet complete programming interface that can be used for advanced projects.
|
||||
|
||||
For more information about LibIIO, please see:
|
||||
https://github.com/analogdevicesinc/libiio
|
@ -9,6 +9,8 @@ Industrial I/O
|
||||
|
||||
iio_configfs
|
||||
iio_devbuf
|
||||
iio_dmabuf_api
|
||||
iio_tools
|
||||
|
||||
Industrial I/O Kernel Drivers
|
||||
=============================
|
||||
@ -18,5 +20,6 @@ Industrial I/O Kernel Drivers
|
||||
|
||||
ad7944
|
||||
adis16475
|
||||
adis16480
|
||||
bno055
|
||||
ep93xx_adc
|
||||
|
@ -21,6 +21,7 @@ fit into other categories.
|
||||
isl29003
|
||||
lis3lv02d
|
||||
max6875
|
||||
mrvl_cn10k_dpi
|
||||
oxsemi-tornado
|
||||
pci-endpoint-test
|
||||
spear-pcie-gadget
|
||||
|
52
Documentation/misc-devices/mrvl_cn10k_dpi.rst
Normal file
52
Documentation/misc-devices/mrvl_cn10k_dpi.rst
Normal file
@ -0,0 +1,52 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
===============================================
|
||||
Marvell CN10K DMA packet interface (DPI) driver
|
||||
===============================================
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
DPI is a DMA packet interface hardware block in Marvell's CN10K silicon.
|
||||
DPI hardware comprises a physical function (PF), its virtual functions,
|
||||
mailbox logic, and a set of DMA engines & DMA command queues.
|
||||
|
||||
DPI PF function is an administrative function which services the mailbox
|
||||
requests from its VF functions and provisions DMA engine resources to
|
||||
it's VF functions.
|
||||
|
||||
mrvl_cn10k_dpi.ko misc driver loads on DPI PF device and services the
|
||||
mailbox commands submitted by the VF devices and accordingly initializes
|
||||
the DMA engines and VF device's DMA command queues. Also, driver creates
|
||||
/dev/mrvl-cn10k-dpi node to set DMA engine and PEM (PCIe interface) port
|
||||
attributes like fifo length, molr, mps & mrrs.
|
||||
|
||||
DPI PF driver is just an administrative driver to setup its VF device's
|
||||
queues and provisions the hardware resources, it cannot initiate any
|
||||
DMA operations. Only VF devices are provisioned with DMA capabilities.
|
||||
|
||||
Driver location
|
||||
===============
|
||||
|
||||
drivers/misc/mrvl_cn10k_dpi.c
|
||||
|
||||
Driver IOCTLs
|
||||
=============
|
||||
|
||||
:c:macro::`DPI_MPS_MRRS_CFG`
|
||||
ioctl that sets max payload size & max read request size parameters of
|
||||
a pem port to which DMA engines are wired.
|
||||
|
||||
|
||||
:c:macro::`DPI_ENGINE_CFG`
|
||||
ioctl that sets DMA engine's fifo sizes & max outstanding load request
|
||||
thresholds.
|
||||
|
||||
User space code example
|
||||
=======================
|
||||
|
||||
DPI VF devices are probed and accessed from user space applications using
|
||||
vfio-pci driver. Below is a sample dpi dma application to demonstrate on
|
||||
how applications use mailbox and ioctl services from DPI PF kernel driver.
|
||||
|
||||
https://github.com/MarvellEmbeddedProcessors/dpi-sample-app
|
@ -365,6 +365,7 @@ Code Seq# Include File Comments
|
||||
0xB6 all linux/fpga-dfl.h
|
||||
0xB7 all uapi/linux/remoteproc_cdev.h <mailto:linux-remoteproc@vger.kernel.org>
|
||||
0xB7 all uapi/linux/nsfs.h <mailto:Andrei Vagin <avagin@openvz.org>>
|
||||
0xB8 01-02 uapi/misc/mrvl_cn10k_dpi.h Marvell CN10K DPI driver
|
||||
0xC0 00-0F linux/usb/iowarrior.h
|
||||
0xCA 00-0F uapi/misc/cxl.h
|
||||
0xCA 10-2F uapi/misc/ocxl.h
|
||||
|
42
MAINTAINERS
42
MAINTAINERS
@ -440,6 +440,16 @@ W: http://wiki.analog.com/AD7142
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/input/misc/ad714x.c
|
||||
|
||||
AD738X ADC DRIVER (AD7380/1/2/4)
|
||||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
M: Nuno Sá <nuno.sa@analog.com>
|
||||
R: David Lechner <dlechner@baylibre.com>
|
||||
S: Supported
|
||||
W: https://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad738x
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
|
||||
F: drivers/iio/adc/ad7380.c
|
||||
|
||||
AD7877 TOUCHSCREEN DRIVER
|
||||
M: Michael Hennerich <michael.hennerich@analog.com>
|
||||
S: Supported
|
||||
@ -1202,7 +1212,7 @@ F: Documentation/devicetree/bindings/iio/adc/adi,ad7091r*
|
||||
F: drivers/iio/adc/ad7091r*
|
||||
|
||||
ANALOG DEVICES INC AD7192 DRIVER
|
||||
M: Alexandru Tachici <alexandru.tachici@analog.com>
|
||||
M: Alisa-Dariana Roman <alisa.roman@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
@ -3568,6 +3578,13 @@ F: include/linux/cfag12864b.h
|
||||
F: include/uapi/linux/map_to_14segment.h
|
||||
F: include/uapi/linux/map_to_7segment.h
|
||||
|
||||
AVAGO APDS9306 AMBIENT LIGHT SENSOR DRIVER
|
||||
M: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml
|
||||
F: drivers/iio/light/apds9306.c
|
||||
|
||||
AVIA HX711 ANALOG DIGITAL CONVERTER IIO DRIVER
|
||||
M: Andreas Klinger <ak@it-klinger.de>
|
||||
L: linux-iio@vger.kernel.org
|
||||
@ -11661,6 +11678,7 @@ M: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Maintained
|
||||
W: https://invensense.tdk.com/
|
||||
F: Documentation/ABI/testing/sysfs-bus-iio-inv_icm42600
|
||||
F: Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml
|
||||
F: drivers/iio/imu/inv_icm42600/
|
||||
|
||||
@ -13621,6 +13639,11 @@ S: Supported
|
||||
F: Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml
|
||||
F: drivers/mmc/host/sdhci-xenon*
|
||||
|
||||
MARVELL OCTEON CN10K DPI DRIVER
|
||||
M: Vamsi Attunuru <vattunuru@marvell.com>
|
||||
S: Supported
|
||||
F: drivers/misc/mrvl_cn10k_dpi.c
|
||||
|
||||
MARVELL OCTEON ENDPOINT VIRTIO DATA PATH ACCELERATOR
|
||||
R: schalla@marvell.com
|
||||
R: vattunuru@marvell.com
|
||||
@ -18729,6 +18752,7 @@ QUALCOMM FASTRPC DRIVER
|
||||
M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
||||
M: Amol Maheshwari <amahesh@qti.qualcomm.com>
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
L: dri-devel@lists.freedesktop.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
|
||||
F: drivers/misc/fastrpc.c
|
||||
@ -20199,6 +20223,14 @@ F: include/linux/wait.h
|
||||
F: include/uapi/linux/sched.h
|
||||
F: kernel/sched/
|
||||
|
||||
SCIOSENSE ENS160 MULTI-GAS SENSOR DRIVER
|
||||
M: Gustavo Silva <gustavograzs@gmail.com>
|
||||
S: Maintained
|
||||
F: drivers/iio/chemical/ens160_core.c
|
||||
F: drivers/iio/chemical/ens160_i2c.c
|
||||
F: drivers/iio/chemical/ens160_spi.c
|
||||
F: drivers/iio/chemical/ens160.h
|
||||
|
||||
SCSI LIBSAS SUBSYSTEM
|
||||
R: John Garry <john.g.garry@oracle.com>
|
||||
R: Jason Yan <yanaijie@huawei.com>
|
||||
@ -22656,6 +22688,14 @@ M: Robert Richter <rric@kernel.org>
|
||||
S: Odd Fixes
|
||||
F: drivers/gpio/gpio-thunderx.c
|
||||
|
||||
TI ADS1119 ADC DRIVER
|
||||
M: Francesco Dolcini <francesco@dolcini.it>
|
||||
M: João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml
|
||||
F: drivers/iio/adc/ti-ads1119.c
|
||||
|
||||
TI ADS7924 ADC DRIVER
|
||||
M: Hugo Villeneuve <hvilleneuve@dimonoff.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
|
@ -570,9 +570,7 @@ static bool binder_has_work(struct binder_thread *thread, bool do_proc_work)
|
||||
static bool binder_available_for_proc_work_ilocked(struct binder_thread *thread)
|
||||
{
|
||||
return !thread->transaction_stack &&
|
||||
binder_worklist_empty_ilocked(&thread->todo) &&
|
||||
(thread->looper & (BINDER_LOOPER_STATE_ENTERED |
|
||||
BINDER_LOOPER_STATE_REGISTERED));
|
||||
binder_worklist_empty_ilocked(&thread->todo);
|
||||
}
|
||||
|
||||
static void binder_wakeup_poll_threads_ilocked(struct binder_proc *proc,
|
||||
@ -1045,6 +1043,66 @@ static struct binder_ref *binder_get_ref_olocked(struct binder_proc *proc,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Find the smallest unused descriptor the "slow way" */
|
||||
static u32 slow_desc_lookup_olocked(struct binder_proc *proc)
|
||||
{
|
||||
struct binder_ref *ref;
|
||||
struct rb_node *n;
|
||||
u32 desc;
|
||||
|
||||
desc = 1;
|
||||
for (n = rb_first(&proc->refs_by_desc); n; n = rb_next(n)) {
|
||||
ref = rb_entry(n, struct binder_ref, rb_node_desc);
|
||||
if (ref->data.desc > desc)
|
||||
break;
|
||||
desc = ref->data.desc + 1;
|
||||
}
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find an available reference descriptor ID. The proc->outer_lock might
|
||||
* be released in the process, in which case -EAGAIN is returned and the
|
||||
* @desc should be considered invalid.
|
||||
*/
|
||||
static int get_ref_desc_olocked(struct binder_proc *proc,
|
||||
struct binder_node *node,
|
||||
u32 *desc)
|
||||
{
|
||||
struct dbitmap *dmap = &proc->dmap;
|
||||
unsigned long *new, bit;
|
||||
unsigned int nbits;
|
||||
|
||||
/* 0 is reserved for the context manager */
|
||||
if (node == proc->context->binder_context_mgr_node) {
|
||||
*desc = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!dbitmap_enabled(dmap)) {
|
||||
*desc = slow_desc_lookup_olocked(proc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dbitmap_acquire_first_zero_bit(dmap, &bit) == 0) {
|
||||
*desc = bit;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* The dbitmap is full and needs to grow. The proc->outer_lock
|
||||
* is briefly released to allocate the new bitmap safely.
|
||||
*/
|
||||
nbits = dbitmap_grow_nbits(dmap);
|
||||
binder_proc_unlock(proc);
|
||||
new = bitmap_zalloc(nbits, GFP_KERNEL);
|
||||
binder_proc_lock(proc);
|
||||
dbitmap_grow(dmap, new, nbits);
|
||||
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
/**
|
||||
* binder_get_ref_for_node_olocked() - get the ref associated with given node
|
||||
* @proc: binder_proc that owns the ref
|
||||
@ -1068,12 +1126,14 @@ static struct binder_ref *binder_get_ref_for_node_olocked(
|
||||
struct binder_node *node,
|
||||
struct binder_ref *new_ref)
|
||||
{
|
||||
struct binder_context *context = proc->context;
|
||||
struct rb_node **p = &proc->refs_by_node.rb_node;
|
||||
struct rb_node *parent = NULL;
|
||||
struct binder_ref *ref;
|
||||
struct rb_node *n;
|
||||
struct rb_node *parent;
|
||||
struct rb_node **p;
|
||||
u32 desc;
|
||||
|
||||
retry:
|
||||
p = &proc->refs_by_node.rb_node;
|
||||
parent = NULL;
|
||||
while (*p) {
|
||||
parent = *p;
|
||||
ref = rb_entry(parent, struct binder_ref, rb_node_node);
|
||||
@ -1088,6 +1148,10 @@ static struct binder_ref *binder_get_ref_for_node_olocked(
|
||||
if (!new_ref)
|
||||
return NULL;
|
||||
|
||||
/* might release the proc->outer_lock */
|
||||
if (get_ref_desc_olocked(proc, node, &desc) == -EAGAIN)
|
||||
goto retry;
|
||||
|
||||
binder_stats_created(BINDER_STAT_REF);
|
||||
new_ref->data.debug_id = atomic_inc_return(&binder_last_id);
|
||||
new_ref->proc = proc;
|
||||
@ -1095,14 +1159,7 @@ static struct binder_ref *binder_get_ref_for_node_olocked(
|
||||
rb_link_node(&new_ref->rb_node_node, parent, p);
|
||||
rb_insert_color(&new_ref->rb_node_node, &proc->refs_by_node);
|
||||
|
||||
new_ref->data.desc = (node == context->binder_context_mgr_node) ? 0 : 1;
|
||||
for (n = rb_first(&proc->refs_by_desc); n != NULL; n = rb_next(n)) {
|
||||
ref = rb_entry(n, struct binder_ref, rb_node_desc);
|
||||
if (ref->data.desc > new_ref->data.desc)
|
||||
break;
|
||||
new_ref->data.desc = ref->data.desc + 1;
|
||||
}
|
||||
|
||||
new_ref->data.desc = desc;
|
||||
p = &proc->refs_by_desc.rb_node;
|
||||
while (*p) {
|
||||
parent = *p;
|
||||
@ -1131,6 +1188,7 @@ static struct binder_ref *binder_get_ref_for_node_olocked(
|
||||
|
||||
static void binder_cleanup_ref_olocked(struct binder_ref *ref)
|
||||
{
|
||||
struct dbitmap *dmap = &ref->proc->dmap;
|
||||
bool delete_node = false;
|
||||
|
||||
binder_debug(BINDER_DEBUG_INTERNAL_REFS,
|
||||
@ -1138,6 +1196,8 @@ static void binder_cleanup_ref_olocked(struct binder_ref *ref)
|
||||
ref->proc->pid, ref->data.debug_id, ref->data.desc,
|
||||
ref->node->debug_id);
|
||||
|
||||
if (dbitmap_enabled(dmap))
|
||||
dbitmap_clear_bit(dmap, ref->data.desc);
|
||||
rb_erase(&ref->rb_node_desc, &ref->proc->refs_by_desc);
|
||||
rb_erase(&ref->rb_node_node, &ref->proc->refs_by_node);
|
||||
|
||||
@ -1298,6 +1358,25 @@ static void binder_free_ref(struct binder_ref *ref)
|
||||
kfree(ref);
|
||||
}
|
||||
|
||||
/* shrink descriptor bitmap if needed */
|
||||
static void try_shrink_dmap(struct binder_proc *proc)
|
||||
{
|
||||
unsigned long *new;
|
||||
int nbits;
|
||||
|
||||
binder_proc_lock(proc);
|
||||
nbits = dbitmap_shrink_nbits(&proc->dmap);
|
||||
binder_proc_unlock(proc);
|
||||
|
||||
if (!nbits)
|
||||
return;
|
||||
|
||||
new = bitmap_zalloc(nbits, GFP_KERNEL);
|
||||
binder_proc_lock(proc);
|
||||
dbitmap_shrink(&proc->dmap, new, nbits);
|
||||
binder_proc_unlock(proc);
|
||||
}
|
||||
|
||||
/**
|
||||
* binder_update_ref_for_handle() - inc/dec the ref for given handle
|
||||
* @proc: proc containing the ref
|
||||
@ -1334,8 +1413,10 @@ static int binder_update_ref_for_handle(struct binder_proc *proc,
|
||||
*rdata = ref->data;
|
||||
binder_proc_unlock(proc);
|
||||
|
||||
if (delete_ref)
|
||||
if (delete_ref) {
|
||||
binder_free_ref(ref);
|
||||
try_shrink_dmap(proc);
|
||||
}
|
||||
return ret;
|
||||
|
||||
err_no_ref:
|
||||
@ -4931,6 +5012,7 @@ static void binder_free_proc(struct binder_proc *proc)
|
||||
put_task_struct(proc->tsk);
|
||||
put_cred(proc->cred);
|
||||
binder_stats_deleted(BINDER_STAT_PROC);
|
||||
dbitmap_free(&proc->dmap);
|
||||
kfree(proc);
|
||||
}
|
||||
|
||||
@ -5634,6 +5716,8 @@ static int binder_open(struct inode *nodp, struct file *filp)
|
||||
proc = kzalloc(sizeof(*proc), GFP_KERNEL);
|
||||
if (proc == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
dbitmap_init(&proc->dmap);
|
||||
spin_lock_init(&proc->inner_lock);
|
||||
spin_lock_init(&proc->outer_lock);
|
||||
get_task_struct(current->group_leader);
|
||||
|
@ -836,9 +836,9 @@ int binder_alloc_mmap_handler(struct binder_alloc *alloc,
|
||||
|
||||
alloc->buffer = vma->vm_start;
|
||||
|
||||
alloc->pages = kcalloc(alloc->buffer_size / PAGE_SIZE,
|
||||
sizeof(alloc->pages[0]),
|
||||
GFP_KERNEL);
|
||||
alloc->pages = kvcalloc(alloc->buffer_size / PAGE_SIZE,
|
||||
sizeof(alloc->pages[0]),
|
||||
GFP_KERNEL);
|
||||
if (alloc->pages == NULL) {
|
||||
ret = -ENOMEM;
|
||||
failure_string = "alloc page array";
|
||||
@ -869,7 +869,7 @@ int binder_alloc_mmap_handler(struct binder_alloc *alloc,
|
||||
return 0;
|
||||
|
||||
err_alloc_buf_struct_failed:
|
||||
kfree(alloc->pages);
|
||||
kvfree(alloc->pages);
|
||||
alloc->pages = NULL;
|
||||
err_alloc_pages_failed:
|
||||
alloc->buffer = 0;
|
||||
@ -939,7 +939,7 @@ void binder_alloc_deferred_release(struct binder_alloc *alloc)
|
||||
__free_page(alloc->pages[i].page_ptr);
|
||||
page_count++;
|
||||
}
|
||||
kfree(alloc->pages);
|
||||
kvfree(alloc->pages);
|
||||
}
|
||||
spin_unlock(&alloc->lock);
|
||||
if (alloc->mm)
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <linux/uidgid.h>
|
||||
#include <uapi/linux/android/binderfs.h>
|
||||
#include "binder_alloc.h"
|
||||
#include "dbitmap.h"
|
||||
|
||||
struct binder_context {
|
||||
struct binder_node *binder_context_mgr_node;
|
||||
@ -368,6 +369,8 @@ struct binder_ref {
|
||||
* @freeze_wait: waitqueue of processes waiting for all outstanding
|
||||
* transactions to be processed
|
||||
* (protected by @inner_lock)
|
||||
* @dmap dbitmap to manage available reference descriptors
|
||||
* (protected by @outer_lock)
|
||||
* @todo: list of work for this process
|
||||
* (protected by @inner_lock)
|
||||
* @stats: per-process binder statistics
|
||||
@ -417,7 +420,7 @@ struct binder_proc {
|
||||
bool sync_recv;
|
||||
bool async_recv;
|
||||
wait_queue_head_t freeze_wait;
|
||||
|
||||
struct dbitmap dmap;
|
||||
struct list_head todo;
|
||||
struct binder_stats stats;
|
||||
struct list_head delivered_death;
|
||||
|
176
drivers/android/dbitmap.h
Normal file
176
drivers/android/dbitmap.h
Normal file
@ -0,0 +1,176 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright 2024 Google LLC
|
||||
*
|
||||
* dbitmap - dynamically sized bitmap library.
|
||||
*
|
||||
* Used by the binder driver to optimize the allocation of the smallest
|
||||
* available descriptor ID. Each bit in the bitmap represents the state
|
||||
* of an ID, with the exception of BIT(0) which is used exclusively to
|
||||
* reference binder's context manager.
|
||||
*
|
||||
* A dbitmap can grow or shrink as needed. This part has been designed
|
||||
* considering that users might need to briefly release their locks in
|
||||
* order to allocate memory for the new bitmap. These operations then,
|
||||
* are verified to determine if the grow or shrink is sill valid.
|
||||
*
|
||||
* This library does not provide protection against concurrent access
|
||||
* by itself. Binder uses the proc->outer_lock for this purpose.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_DBITMAP_H
|
||||
#define _LINUX_DBITMAP_H
|
||||
#include <linux/bitmap.h>
|
||||
|
||||
#define NBITS_MIN BITS_PER_TYPE(unsigned long)
|
||||
|
||||
struct dbitmap {
|
||||
unsigned int nbits;
|
||||
unsigned long *map;
|
||||
};
|
||||
|
||||
static inline int dbitmap_enabled(struct dbitmap *dmap)
|
||||
{
|
||||
return !!dmap->nbits;
|
||||
}
|
||||
|
||||
static inline void dbitmap_free(struct dbitmap *dmap)
|
||||
{
|
||||
dmap->nbits = 0;
|
||||
kfree(dmap->map);
|
||||
}
|
||||
|
||||
/* Returns the nbits that a dbitmap can shrink to, 0 if not possible. */
|
||||
static inline unsigned int dbitmap_shrink_nbits(struct dbitmap *dmap)
|
||||
{
|
||||
unsigned int bit;
|
||||
|
||||
if (dmap->nbits <= NBITS_MIN)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Determine if the bitmap can shrink based on the position of
|
||||
* its last set bit. If the bit is within the first quarter of
|
||||
* the bitmap then shrinking is possible. In this case, the
|
||||
* bitmap should shrink to half its current size.
|
||||
*/
|
||||
bit = find_last_bit(dmap->map, dmap->nbits);
|
||||
if (bit < (dmap->nbits >> 2))
|
||||
return dmap->nbits >> 1;
|
||||
|
||||
/*
|
||||
* Note that find_last_bit() returns dmap->nbits when no bits
|
||||
* are set. While this is technically not possible here since
|
||||
* BIT(0) is always set, this check is left for extra safety.
|
||||
*/
|
||||
if (bit == dmap->nbits)
|
||||
return NBITS_MIN;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Replace the internal bitmap with a new one of different size */
|
||||
static inline void
|
||||
dbitmap_replace(struct dbitmap *dmap, unsigned long *new, unsigned int nbits)
|
||||
{
|
||||
bitmap_copy(new, dmap->map, min(dmap->nbits, nbits));
|
||||
kfree(dmap->map);
|
||||
dmap->map = new;
|
||||
dmap->nbits = nbits;
|
||||
}
|
||||
|
||||
static inline void
|
||||
dbitmap_shrink(struct dbitmap *dmap, unsigned long *new, unsigned int nbits)
|
||||
{
|
||||
if (!new)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Verify that shrinking to @nbits is still possible. The @new
|
||||
* bitmap might have been allocated without locks, so this call
|
||||
* could now be outdated. In this case, free @new and move on.
|
||||
*/
|
||||
if (!dbitmap_enabled(dmap) || dbitmap_shrink_nbits(dmap) != nbits) {
|
||||
kfree(new);
|
||||
return;
|
||||
}
|
||||
|
||||
dbitmap_replace(dmap, new, nbits);
|
||||
}
|
||||
|
||||
/* Returns the nbits that a dbitmap can grow to. */
|
||||
static inline unsigned int dbitmap_grow_nbits(struct dbitmap *dmap)
|
||||
{
|
||||
return dmap->nbits << 1;
|
||||
}
|
||||
|
||||
static inline void
|
||||
dbitmap_grow(struct dbitmap *dmap, unsigned long *new, unsigned int nbits)
|
||||
{
|
||||
/*
|
||||
* Verify that growing to @nbits is still possible. The @new
|
||||
* bitmap might have been allocated without locks, so this call
|
||||
* could now be outdated. In this case, free @new and move on.
|
||||
*/
|
||||
if (!dbitmap_enabled(dmap) || nbits <= dmap->nbits) {
|
||||
kfree(new);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for ENOMEM after confirming the grow operation is still
|
||||
* required. This ensures we only disable the dbitmap when it's
|
||||
* necessary. Once the dbitmap is disabled, binder will fallback
|
||||
* to slow_desc_lookup_olocked().
|
||||
*/
|
||||
if (!new) {
|
||||
dbitmap_free(dmap);
|
||||
return;
|
||||
}
|
||||
|
||||
dbitmap_replace(dmap, new, nbits);
|
||||
}
|
||||
|
||||
/*
|
||||
* Finds and sets the first zero bit in the bitmap. Upon success @bit
|
||||
* is populated with the index and 0 is returned. Otherwise, -ENOSPC
|
||||
* is returned to indicate that a dbitmap_grow() is needed.
|
||||
*/
|
||||
static inline int
|
||||
dbitmap_acquire_first_zero_bit(struct dbitmap *dmap, unsigned long *bit)
|
||||
{
|
||||
unsigned long n;
|
||||
|
||||
n = find_first_zero_bit(dmap->map, dmap->nbits);
|
||||
if (n == dmap->nbits)
|
||||
return -ENOSPC;
|
||||
|
||||
*bit = n;
|
||||
set_bit(n, dmap->map);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
dbitmap_clear_bit(struct dbitmap *dmap, unsigned long bit)
|
||||
{
|
||||
/* BIT(0) should always set for the context manager */
|
||||
if (bit)
|
||||
clear_bit(bit, dmap->map);
|
||||
}
|
||||
|
||||
static inline int dbitmap_init(struct dbitmap *dmap)
|
||||
{
|
||||
dmap->map = bitmap_zalloc(NBITS_MIN, GFP_KERNEL);
|
||||
if (!dmap->map) {
|
||||
dmap->nbits = 0;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
dmap->nbits = NBITS_MIN;
|
||||
/* BIT(0) is reserved for the context manager */
|
||||
set_bit(0, dmap->map);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
@ -768,7 +768,6 @@ static struct parport_driver pata_parport_driver = {
|
||||
.name = DRV_NAME,
|
||||
.match_port = pata_parport_attach,
|
||||
.detach = pata_parport_detach,
|
||||
.devmodel = true,
|
||||
};
|
||||
|
||||
static __init int pata_parport_init(void)
|
||||
|
@ -162,7 +162,6 @@ static struct parport_driver ks0108_parport_driver = {
|
||||
.name = "ks0108",
|
||||
.match_port = ks0108_parport_attach,
|
||||
.detach = ks0108_parport_detach,
|
||||
.devmodel = true,
|
||||
};
|
||||
module_parport_driver(ks0108_parport_driver);
|
||||
|
||||
|
@ -1706,7 +1706,6 @@ static struct parport_driver panel_driver = {
|
||||
.name = "panel",
|
||||
.match_port = panel_attach,
|
||||
.detach = panel_detach,
|
||||
.devmodel = true,
|
||||
};
|
||||
module_parport_driver(panel_driver);
|
||||
|
||||
|
@ -90,7 +90,7 @@ static int mhi_ep_send_completion_event(struct mhi_ep_cntrl *mhi_cntrl, struct m
|
||||
struct mhi_ring_element *event;
|
||||
int ret;
|
||||
|
||||
event = kmem_cache_zalloc(mhi_cntrl->ev_ring_el_cache, GFP_KERNEL | GFP_DMA);
|
||||
event = kmem_cache_zalloc(mhi_cntrl->ev_ring_el_cache, GFP_KERNEL);
|
||||
if (!event)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -109,7 +109,7 @@ int mhi_ep_send_state_change_event(struct mhi_ep_cntrl *mhi_cntrl, enum mhi_stat
|
||||
struct mhi_ring_element *event;
|
||||
int ret;
|
||||
|
||||
event = kmem_cache_zalloc(mhi_cntrl->ev_ring_el_cache, GFP_KERNEL | GFP_DMA);
|
||||
event = kmem_cache_zalloc(mhi_cntrl->ev_ring_el_cache, GFP_KERNEL);
|
||||
if (!event)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -127,7 +127,7 @@ int mhi_ep_send_ee_event(struct mhi_ep_cntrl *mhi_cntrl, enum mhi_ee_type exec_e
|
||||
struct mhi_ring_element *event;
|
||||
int ret;
|
||||
|
||||
event = kmem_cache_zalloc(mhi_cntrl->ev_ring_el_cache, GFP_KERNEL | GFP_DMA);
|
||||
event = kmem_cache_zalloc(mhi_cntrl->ev_ring_el_cache, GFP_KERNEL);
|
||||
if (!event)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -146,7 +146,7 @@ static int mhi_ep_send_cmd_comp_event(struct mhi_ep_cntrl *mhi_cntrl, enum mhi_e
|
||||
struct mhi_ring_element *event;
|
||||
int ret;
|
||||
|
||||
event = kmem_cache_zalloc(mhi_cntrl->ev_ring_el_cache, GFP_KERNEL | GFP_DMA);
|
||||
event = kmem_cache_zalloc(mhi_cntrl->ev_ring_el_cache, GFP_KERNEL);
|
||||
if (!event)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -438,7 +438,7 @@ static int mhi_ep_read_channel(struct mhi_ep_cntrl *mhi_cntrl,
|
||||
read_offset = mhi_chan->tre_size - mhi_chan->tre_bytes_left;
|
||||
write_offset = len - buf_left;
|
||||
|
||||
buf_addr = kmem_cache_zalloc(mhi_cntrl->tre_buf_cache, GFP_KERNEL | GFP_DMA);
|
||||
buf_addr = kmem_cache_zalloc(mhi_cntrl->tre_buf_cache, GFP_KERNEL);
|
||||
if (!buf_addr)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -1481,14 +1481,14 @@ int mhi_ep_register_controller(struct mhi_ep_cntrl *mhi_cntrl,
|
||||
|
||||
mhi_cntrl->ev_ring_el_cache = kmem_cache_create("mhi_ep_event_ring_el",
|
||||
sizeof(struct mhi_ring_element), 0,
|
||||
SLAB_CACHE_DMA, NULL);
|
||||
0, NULL);
|
||||
if (!mhi_cntrl->ev_ring_el_cache) {
|
||||
ret = -ENOMEM;
|
||||
goto err_free_cmd;
|
||||
}
|
||||
|
||||
mhi_cntrl->tre_buf_cache = kmem_cache_create("mhi_ep_tre_buf", MHI_EP_DEFAULT_MTU, 0,
|
||||
SLAB_CACHE_DMA, NULL);
|
||||
0, NULL);
|
||||
if (!mhi_cntrl->tre_buf_cache) {
|
||||
ret = -ENOMEM;
|
||||
goto err_destroy_ev_ring_el_cache;
|
||||
|
@ -399,6 +399,8 @@ static const struct mhi_channel_config mhi_foxconn_sdx55_channels[] = {
|
||||
MHI_CHANNEL_CONFIG_DL(13, "MBIM", 32, 0),
|
||||
MHI_CHANNEL_CONFIG_UL(32, "DUN", 32, 0),
|
||||
MHI_CHANNEL_CONFIG_DL(33, "DUN", 32, 0),
|
||||
MHI_CHANNEL_CONFIG_UL_FP(34, "FIREHOSE", 32, 0),
|
||||
MHI_CHANNEL_CONFIG_DL_FP(35, "FIREHOSE", 32, 0),
|
||||
MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0_MBIM", 128, 2),
|
||||
MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0_MBIM", 128, 3),
|
||||
};
|
||||
@ -419,13 +421,14 @@ static const struct mhi_controller_config modem_foxconn_sdx55_config = {
|
||||
.event_cfg = mhi_foxconn_sdx55_events,
|
||||
};
|
||||
|
||||
static const struct mhi_pci_dev_info mhi_foxconn_sdx24_info = {
|
||||
.name = "foxconn-sdx24",
|
||||
.config = &modem_foxconn_sdx55_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
.mru_default = 32768,
|
||||
.sideband_wake = false,
|
||||
static const struct mhi_controller_config modem_foxconn_sdx72_config = {
|
||||
.max_channels = 128,
|
||||
.timeout_ms = 20000,
|
||||
.ready_timeout_ms = 50000,
|
||||
.num_channels = ARRAY_SIZE(mhi_foxconn_sdx55_channels),
|
||||
.ch_cfg = mhi_foxconn_sdx55_channels,
|
||||
.num_events = ARRAY_SIZE(mhi_foxconn_sdx55_events),
|
||||
.event_cfg = mhi_foxconn_sdx55_events,
|
||||
};
|
||||
|
||||
static const struct mhi_pci_dev_info mhi_foxconn_sdx55_info = {
|
||||
@ -439,8 +442,10 @@ static const struct mhi_pci_dev_info mhi_foxconn_sdx55_info = {
|
||||
.sideband_wake = false,
|
||||
};
|
||||
|
||||
static const struct mhi_pci_dev_info mhi_foxconn_sdx65_info = {
|
||||
.name = "foxconn-sdx65",
|
||||
static const struct mhi_pci_dev_info mhi_foxconn_t99w175_info = {
|
||||
.name = "foxconn-t99w175",
|
||||
.fw = "qcom/sdx55m/sbl1.mbn",
|
||||
.edl = "qcom/sdx55m/edl.mbn",
|
||||
.config = &modem_foxconn_sdx55_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
@ -448,6 +453,75 @@ static const struct mhi_pci_dev_info mhi_foxconn_sdx65_info = {
|
||||
.sideband_wake = false,
|
||||
};
|
||||
|
||||
static const struct mhi_pci_dev_info mhi_foxconn_dw5930e_info = {
|
||||
.name = "foxconn-dw5930e",
|
||||
.fw = "qcom/sdx55m/sbl1.mbn",
|
||||
.edl = "qcom/sdx55m/edl.mbn",
|
||||
.config = &modem_foxconn_sdx55_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
.mru_default = 32768,
|
||||
.sideband_wake = false,
|
||||
};
|
||||
|
||||
static const struct mhi_pci_dev_info mhi_foxconn_t99w368_info = {
|
||||
.name = "foxconn-t99w368",
|
||||
.config = &modem_foxconn_sdx55_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
.mru_default = 32768,
|
||||
.sideband_wake = false,
|
||||
};
|
||||
|
||||
static const struct mhi_pci_dev_info mhi_foxconn_t99w373_info = {
|
||||
.name = "foxconn-t99w373",
|
||||
.config = &modem_foxconn_sdx55_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
.mru_default = 32768,
|
||||
.sideband_wake = false,
|
||||
};
|
||||
|
||||
static const struct mhi_pci_dev_info mhi_foxconn_t99w510_info = {
|
||||
.name = "foxconn-t99w510",
|
||||
.config = &modem_foxconn_sdx55_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
.mru_default = 32768,
|
||||
.sideband_wake = false,
|
||||
};
|
||||
|
||||
static const struct mhi_pci_dev_info mhi_foxconn_dw5932e_info = {
|
||||
.name = "foxconn-dw5932e",
|
||||
.config = &modem_foxconn_sdx55_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
.mru_default = 32768,
|
||||
.sideband_wake = false,
|
||||
};
|
||||
|
||||
static const struct mhi_pci_dev_info mhi_foxconn_t99w515_info = {
|
||||
.name = "foxconn-t99w515",
|
||||
.edl = "fox/sdx72m/edl.mbn",
|
||||
.edl_trigger = true,
|
||||
.config = &modem_foxconn_sdx72_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
.mru_default = 32768,
|
||||
.sideband_wake = false,
|
||||
};
|
||||
|
||||
static const struct mhi_pci_dev_info mhi_foxconn_dw5934e_info = {
|
||||
.name = "foxconn-dw5934e",
|
||||
.edl = "fox/sdx72m/edl.mbn",
|
||||
.edl_trigger = true,
|
||||
.config = &modem_foxconn_sdx72_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
.mru_default = 32768,
|
||||
.sideband_wake = false,
|
||||
};
|
||||
|
||||
static const struct mhi_channel_config mhi_mv3x_channels[] = {
|
||||
MHI_CHANNEL_CONFIG_UL(0, "LOOPBACK", 64, 0),
|
||||
MHI_CHANNEL_CONFIG_DL(1, "LOOPBACK", 64, 0),
|
||||
@ -646,40 +720,49 @@ static const struct pci_device_id mhi_pci_id_table[] = {
|
||||
.driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
|
||||
/* T99W175 (sdx55), Both for eSIM and Non-eSIM */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w175_info },
|
||||
/* DW5930e (sdx55), With eSIM, It's also T99W175 */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0b0),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_dw5930e_info },
|
||||
/* DW5930e (sdx55), Non-eSIM, It's also T99W175 */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0b1),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_dw5930e_info },
|
||||
/* T99W175 (sdx55), Based on Qualcomm new baseline */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0bf),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w175_info },
|
||||
/* T99W175 (sdx55) */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0c3),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w175_info },
|
||||
/* T99W368 (sdx65) */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0d8),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx65_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w368_info },
|
||||
/* T99W373 (sdx62) */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0d9),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx65_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w373_info },
|
||||
/* T99W510 (sdx24), variant 1 */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f0),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx24_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w510_info },
|
||||
/* T99W510 (sdx24), variant 2 */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f1),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx24_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w510_info },
|
||||
/* T99W510 (sdx24), variant 3 */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f2),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx24_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w510_info },
|
||||
/* DW5932e-eSIM (sdx62), With eSIM */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f5),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx65_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_dw5932e_info },
|
||||
/* DW5932e (sdx62), Non-eSIM */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f9),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx65_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_dw5932e_info },
|
||||
/* T99W515 (sdx72) */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe118),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w515_info },
|
||||
/* DW5934e(sdx72), With eSIM */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe11d),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_dw5934e_info },
|
||||
/* DW5934e(sdx72), Non-eSIM */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe11e),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_dw5934e_info },
|
||||
/* MV31-W (Cinterion) */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b3),
|
||||
.driver_data = (kernel_ulong_t) &mhi_mv31_info },
|
||||
@ -694,7 +777,7 @@ static const struct pci_device_id mhi_pci_id_table[] = {
|
||||
.driver_data = (kernel_ulong_t) &mhi_mv32_info },
|
||||
/* T99W175 (sdx55), HP variant */
|
||||
{ PCI_DEVICE(0x03f0, 0x0a6c),
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
|
||||
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w175_info },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, mhi_pci_id_table);
|
||||
@ -1003,6 +1086,7 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
mhi_cntrl->runtime_get = mhi_pci_runtime_get;
|
||||
mhi_cntrl->runtime_put = mhi_pci_runtime_put;
|
||||
mhi_cntrl->mru = info->mru_default;
|
||||
mhi_cntrl->name = info->name;
|
||||
|
||||
if (info->edl_trigger)
|
||||
mhi_cntrl->edl_trigger = mhi_pci_generic_edl_trigger;
|
||||
|
@ -726,4 +726,5 @@ MODULE_PARM_DESC(aperture,
|
||||
"\t\tDefault: " DEFAULT_APERTURE_STRING "M");
|
||||
|
||||
MODULE_AUTHOR("Ben Herrenschmidt & Paul Mackerras");
|
||||
MODULE_DESCRIPTION("Apple UniNorth & U3 AGP support");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -342,5 +342,6 @@ static void __exit bsr_exit(void)
|
||||
|
||||
module_init(bsr_init);
|
||||
module_exit(bsr_exit);
|
||||
MODULE_DESCRIPTION("IBM POWER Barrier Synchronization Register Driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Sonny Rao <sonnyrao@us.ibm.com>");
|
||||
|
@ -530,5 +530,6 @@ static void __exit dsp56k_cleanup_driver(void)
|
||||
}
|
||||
module_exit(dsp56k_cleanup_driver);
|
||||
|
||||
MODULE_DESCRIPTION("Atari DSP56001 Device Driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_FIRMWARE("dsp56k/bootstrap.bin");
|
||||
|
@ -660,4 +660,5 @@ static char dtlk_write_tts(char ch)
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE_DESCRIPTION("RC Systems DoubleTalk PC speech card driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -1016,7 +1016,6 @@ static struct parport_driver lp_driver = {
|
||||
.name = "lp",
|
||||
.match_port = lp_attach,
|
||||
.detach = lp_detach,
|
||||
.devmodel = true,
|
||||
};
|
||||
|
||||
static int __init lp_init(void)
|
||||
@ -1123,4 +1122,5 @@ module_init(lp_init_module);
|
||||
module_exit(lp_cleanup_module);
|
||||
|
||||
MODULE_ALIAS_CHARDEV_MAJOR(LP_MAJOR);
|
||||
MODULE_DESCRIPTION("Generic parallel printer driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -540,6 +540,7 @@ static void __exit nvram_module_exit(void)
|
||||
module_init(nvram_module_init);
|
||||
module_exit(nvram_module_exit);
|
||||
|
||||
MODULE_DESCRIPTION("CMOS/NV-RAM driver for Linux");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS_MISCDEV(NVRAM_MINOR);
|
||||
MODULE_ALIAS("devname:nvram");
|
||||
|
@ -839,7 +839,6 @@ static struct parport_driver pp_driver = {
|
||||
.probe = pp_probe,
|
||||
.match_port = pp_attach,
|
||||
.detach = pp_detach,
|
||||
.devmodel = true,
|
||||
};
|
||||
|
||||
static int __init ppdev_init(void)
|
||||
@ -882,5 +881,6 @@ static void __exit ppdev_cleanup(void)
|
||||
module_init(ppdev_init);
|
||||
module_exit(ppdev_cleanup);
|
||||
|
||||
MODULE_DESCRIPTION("Support for user-space parallel port device drivers");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS_CHARDEV_MAJOR(PP_MAJOR);
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
MODULE_AUTHOR("Sebastien Bouchard <sebastien.bouchard@ca.kontron.com>");
|
||||
MODULE_DESCRIPTION("Telecom Clock driver for Intel NetStructure(tm) MPCBL0010");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
/*Hardware Reset of the PLL */
|
||||
|
@ -228,4 +228,5 @@ static void __exit ttyprintk_exit(void)
|
||||
device_initcall(ttyprintk_init);
|
||||
module_exit(ttyprintk_exit);
|
||||
|
||||
MODULE_DESCRIPTION("TTY driver to output user messages via printk");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -138,7 +138,7 @@ config TI_ECAP_CAPTURE
|
||||
|
||||
config TI_EQEP
|
||||
tristate "TI eQEP counter driver"
|
||||
depends on (SOC_AM33XX || COMPILE_TEST)
|
||||
depends on SOC_AM33XX || ARCH_K3 || COMPILE_TEST
|
||||
select REGMAP_MMIO
|
||||
help
|
||||
Select this option to enable the Texas Instruments Enhanced Quadrature
|
||||
|
@ -322,6 +322,7 @@ static struct platform_driver ftm_quaddec_driver = {
|
||||
|
||||
module_platform_driver(ftm_quaddec_driver);
|
||||
|
||||
MODULE_DESCRIPTION("Flex Timer Module Quadrature decoder");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Kjeld Flarup <kfa@deif.com>");
|
||||
MODULE_AUTHOR("Patrick Havelange <patrick.havelange@essensium.com>");
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/counter.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
@ -68,6 +69,44 @@
|
||||
#define QEPCTL_UTE BIT(1)
|
||||
#define QEPCTL_WDE BIT(0)
|
||||
|
||||
#define QEINT_UTO BIT(11)
|
||||
#define QEINT_IEL BIT(10)
|
||||
#define QEINT_SEL BIT(9)
|
||||
#define QEINT_PCM BIT(8)
|
||||
#define QEINT_PCR BIT(7)
|
||||
#define QEINT_PCO BIT(6)
|
||||
#define QEINT_PCU BIT(5)
|
||||
#define QEINT_WTO BIT(4)
|
||||
#define QEINT_QDC BIT(3)
|
||||
#define QEINT_PHE BIT(2)
|
||||
#define QEINT_PCE BIT(1)
|
||||
|
||||
#define QFLG_UTO BIT(11)
|
||||
#define QFLG_IEL BIT(10)
|
||||
#define QFLG_SEL BIT(9)
|
||||
#define QFLG_PCM BIT(8)
|
||||
#define QFLG_PCR BIT(7)
|
||||
#define QFLG_PCO BIT(6)
|
||||
#define QFLG_PCU BIT(5)
|
||||
#define QFLG_WTO BIT(4)
|
||||
#define QFLG_QDC BIT(3)
|
||||
#define QFLG_PHE BIT(2)
|
||||
#define QFLG_PCE BIT(1)
|
||||
#define QFLG_INT BIT(0)
|
||||
|
||||
#define QCLR_UTO BIT(11)
|
||||
#define QCLR_IEL BIT(10)
|
||||
#define QCLR_SEL BIT(9)
|
||||
#define QCLR_PCM BIT(8)
|
||||
#define QCLR_PCR BIT(7)
|
||||
#define QCLR_PCO BIT(6)
|
||||
#define QCLR_PCU BIT(5)
|
||||
#define QCLR_WTO BIT(4)
|
||||
#define QCLR_QDC BIT(3)
|
||||
#define QCLR_PHE BIT(2)
|
||||
#define QCLR_PCE BIT(1)
|
||||
#define QCLR_INT BIT(0)
|
||||
|
||||
/* EQEP Inputs */
|
||||
enum {
|
||||
TI_EQEP_SIGNAL_QEPA, /* QEPA/XCLK */
|
||||
@ -83,20 +122,14 @@ enum ti_eqep_count_func {
|
||||
};
|
||||
|
||||
struct ti_eqep_cnt {
|
||||
struct counter_device counter;
|
||||
struct regmap *regmap32;
|
||||
struct regmap *regmap16;
|
||||
};
|
||||
|
||||
static struct ti_eqep_cnt *ti_eqep_count_from_counter(struct counter_device *counter)
|
||||
{
|
||||
return counter_priv(counter);
|
||||
}
|
||||
|
||||
static int ti_eqep_count_read(struct counter_device *counter,
|
||||
struct counter_count *count, u64 *val)
|
||||
{
|
||||
struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
|
||||
struct ti_eqep_cnt *priv = counter_priv(counter);
|
||||
u32 cnt;
|
||||
|
||||
regmap_read(priv->regmap32, QPOSCNT, &cnt);
|
||||
@ -108,7 +141,7 @@ static int ti_eqep_count_read(struct counter_device *counter,
|
||||
static int ti_eqep_count_write(struct counter_device *counter,
|
||||
struct counter_count *count, u64 val)
|
||||
{
|
||||
struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
|
||||
struct ti_eqep_cnt *priv = counter_priv(counter);
|
||||
u32 max;
|
||||
|
||||
regmap_read(priv->regmap32, QPOSMAX, &max);
|
||||
@ -122,7 +155,7 @@ static int ti_eqep_function_read(struct counter_device *counter,
|
||||
struct counter_count *count,
|
||||
enum counter_function *function)
|
||||
{
|
||||
struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
|
||||
struct ti_eqep_cnt *priv = counter_priv(counter);
|
||||
u32 qdecctl;
|
||||
|
||||
regmap_read(priv->regmap16, QDECCTL, &qdecctl);
|
||||
@ -149,7 +182,7 @@ static int ti_eqep_function_write(struct counter_device *counter,
|
||||
struct counter_count *count,
|
||||
enum counter_function function)
|
||||
{
|
||||
struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
|
||||
struct ti_eqep_cnt *priv = counter_priv(counter);
|
||||
enum ti_eqep_count_func qsrc;
|
||||
|
||||
switch (function) {
|
||||
@ -179,7 +212,7 @@ static int ti_eqep_action_read(struct counter_device *counter,
|
||||
struct counter_synapse *synapse,
|
||||
enum counter_synapse_action *action)
|
||||
{
|
||||
struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
|
||||
struct ti_eqep_cnt *priv = counter_priv(counter);
|
||||
enum counter_function function;
|
||||
u32 qdecctl;
|
||||
int err;
|
||||
@ -239,19 +272,56 @@ static int ti_eqep_action_read(struct counter_device *counter,
|
||||
}
|
||||
}
|
||||
|
||||
static int ti_eqep_events_configure(struct counter_device *counter)
|
||||
{
|
||||
struct ti_eqep_cnt *priv = counter_priv(counter);
|
||||
struct counter_event_node *event_node;
|
||||
u32 qeint = 0;
|
||||
|
||||
list_for_each_entry(event_node, &counter->events_list, l) {
|
||||
switch (event_node->event) {
|
||||
case COUNTER_EVENT_OVERFLOW:
|
||||
qeint |= QEINT_PCO;
|
||||
break;
|
||||
case COUNTER_EVENT_UNDERFLOW:
|
||||
qeint |= QEINT_PCU;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return regmap_write(priv->regmap16, QEINT, qeint);
|
||||
}
|
||||
|
||||
static int ti_eqep_watch_validate(struct counter_device *counter,
|
||||
const struct counter_watch *watch)
|
||||
{
|
||||
switch (watch->event) {
|
||||
case COUNTER_EVENT_OVERFLOW:
|
||||
case COUNTER_EVENT_UNDERFLOW:
|
||||
if (watch->channel != 0)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
static const struct counter_ops ti_eqep_counter_ops = {
|
||||
.count_read = ti_eqep_count_read,
|
||||
.count_write = ti_eqep_count_write,
|
||||
.function_read = ti_eqep_function_read,
|
||||
.function_write = ti_eqep_function_write,
|
||||
.action_read = ti_eqep_action_read,
|
||||
.events_configure = ti_eqep_events_configure,
|
||||
.watch_validate = ti_eqep_watch_validate,
|
||||
};
|
||||
|
||||
static int ti_eqep_position_ceiling_read(struct counter_device *counter,
|
||||
struct counter_count *count,
|
||||
u64 *ceiling)
|
||||
{
|
||||
struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
|
||||
struct ti_eqep_cnt *priv = counter_priv(counter);
|
||||
u32 qposmax;
|
||||
|
||||
regmap_read(priv->regmap32, QPOSMAX, &qposmax);
|
||||
@ -265,7 +335,7 @@ static int ti_eqep_position_ceiling_write(struct counter_device *counter,
|
||||
struct counter_count *count,
|
||||
u64 ceiling)
|
||||
{
|
||||
struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
|
||||
struct ti_eqep_cnt *priv = counter_priv(counter);
|
||||
|
||||
if (ceiling != (u32)ceiling)
|
||||
return -ERANGE;
|
||||
@ -278,7 +348,7 @@ static int ti_eqep_position_ceiling_write(struct counter_device *counter,
|
||||
static int ti_eqep_position_enable_read(struct counter_device *counter,
|
||||
struct counter_count *count, u8 *enable)
|
||||
{
|
||||
struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
|
||||
struct ti_eqep_cnt *priv = counter_priv(counter);
|
||||
u32 qepctl;
|
||||
|
||||
regmap_read(priv->regmap16, QEPCTL, &qepctl);
|
||||
@ -291,7 +361,7 @@ static int ti_eqep_position_enable_read(struct counter_device *counter,
|
||||
static int ti_eqep_position_enable_write(struct counter_device *counter,
|
||||
struct counter_count *count, u8 enable)
|
||||
{
|
||||
struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
|
||||
struct ti_eqep_cnt *priv = counter_priv(counter);
|
||||
|
||||
regmap_write_bits(priv->regmap16, QEPCTL, QEPCTL_PHEN, enable ? -1 : 0);
|
||||
|
||||
@ -355,6 +425,25 @@ static struct counter_count ti_eqep_counts[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static irqreturn_t ti_eqep_irq_handler(int irq, void *dev_id)
|
||||
{
|
||||
struct counter_device *counter = dev_id;
|
||||
struct ti_eqep_cnt *priv = counter_priv(counter);
|
||||
u32 qflg;
|
||||
|
||||
regmap_read(priv->regmap16, QFLG, &qflg);
|
||||
|
||||
if (qflg & QFLG_PCO)
|
||||
counter_push_event(counter, COUNTER_EVENT_OVERFLOW, 0);
|
||||
|
||||
if (qflg & QFLG_PCU)
|
||||
counter_push_event(counter, COUNTER_EVENT_UNDERFLOW, 0);
|
||||
|
||||
regmap_write(priv->regmap16, QCLR, qflg);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static const struct regmap_config ti_eqep_regmap32_config = {
|
||||
.name = "32-bit",
|
||||
.reg_bits = 32,
|
||||
@ -378,7 +467,7 @@ static int ti_eqep_probe(struct platform_device *pdev)
|
||||
struct ti_eqep_cnt *priv;
|
||||
void __iomem *base;
|
||||
struct clk *clk;
|
||||
int err;
|
||||
int err, irq;
|
||||
|
||||
counter = devm_counter_alloc(dev, sizeof(*priv));
|
||||
if (!counter)
|
||||
@ -399,6 +488,15 @@ static int ti_eqep_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(priv->regmap16))
|
||||
return PTR_ERR(priv->regmap16);
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
|
||||
err = devm_request_threaded_irq(dev, irq, NULL, ti_eqep_irq_handler,
|
||||
IRQF_ONESHOT, dev_name(dev), counter);
|
||||
if (err < 0)
|
||||
return dev_err_probe(dev, err, "failed to request IRQ\n");
|
||||
|
||||
counter->name = dev_name(dev);
|
||||
counter->parent = dev;
|
||||
counter->ops = &ti_eqep_counter_ops;
|
||||
@ -443,6 +541,7 @@ static void ti_eqep_remove(struct platform_device *pdev)
|
||||
|
||||
static const struct of_device_id ti_eqep_of_match[] = {
|
||||
{ .compatible = "ti,am3352-eqep", },
|
||||
{ .compatible = "ti,am62-eqep", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ti_eqep_of_match);
|
||||
|
@ -17,6 +17,7 @@
|
||||
#define DCA_VERSION "1.12.1"
|
||||
|
||||
MODULE_VERSION(DCA_VERSION);
|
||||
MODULE_DESCRIPTION("Intel Direct Cache Access (DCA) service module");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Intel Corporation");
|
||||
|
||||
|
@ -620,6 +620,45 @@ static struct axi_dmac_sg *axi_dmac_fill_linear_sg(struct axi_dmac_chan *chan,
|
||||
return sg;
|
||||
}
|
||||
|
||||
static struct dma_async_tx_descriptor *
|
||||
axi_dmac_prep_peripheral_dma_vec(struct dma_chan *c, const struct dma_vec *vecs,
|
||||
size_t nb, enum dma_transfer_direction direction,
|
||||
unsigned long flags)
|
||||
{
|
||||
struct axi_dmac_chan *chan = to_axi_dmac_chan(c);
|
||||
struct axi_dmac_desc *desc;
|
||||
unsigned int num_sgs = 0;
|
||||
struct axi_dmac_sg *dsg;
|
||||
size_t i;
|
||||
|
||||
if (direction != chan->direction)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < nb; i++)
|
||||
num_sgs += DIV_ROUND_UP(vecs[i].len, chan->max_length);
|
||||
|
||||
desc = axi_dmac_alloc_desc(chan, num_sgs);
|
||||
if (!desc)
|
||||
return NULL;
|
||||
|
||||
dsg = desc->sg;
|
||||
|
||||
for (i = 0; i < nb; i++) {
|
||||
if (!axi_dmac_check_addr(chan, vecs[i].addr) ||
|
||||
!axi_dmac_check_len(chan, vecs[i].len)) {
|
||||
kfree(desc);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dsg = axi_dmac_fill_linear_sg(chan, direction, vecs[i].addr, 1,
|
||||
vecs[i].len, dsg);
|
||||
}
|
||||
|
||||
desc->cyclic = false;
|
||||
|
||||
return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
|
||||
}
|
||||
|
||||
static struct dma_async_tx_descriptor *axi_dmac_prep_slave_sg(
|
||||
struct dma_chan *c, struct scatterlist *sgl,
|
||||
unsigned int sg_len, enum dma_transfer_direction direction,
|
||||
@ -1061,6 +1100,7 @@ static int axi_dmac_probe(struct platform_device *pdev)
|
||||
dma_dev->device_tx_status = dma_cookie_status;
|
||||
dma_dev->device_issue_pending = axi_dmac_issue_pending;
|
||||
dma_dev->device_prep_slave_sg = axi_dmac_prep_slave_sg;
|
||||
dma_dev->device_prep_peripheral_dma_vec = axi_dmac_prep_peripheral_dma_vec;
|
||||
dma_dev->device_prep_dma_cyclic = axi_dmac_prep_dma_cyclic;
|
||||
dma_dev->device_prep_interleaved_dma = axi_dmac_prep_interleaved;
|
||||
dma_dev->device_terminate_all = axi_dmac_terminate_all;
|
||||
|
@ -75,12 +75,6 @@ static int alt_fpga2sdram_enable_set(struct fpga_bridge *bridge, bool enable)
|
||||
return _alt_fpga2sdram_enable_set(bridge->priv, enable);
|
||||
}
|
||||
|
||||
struct prop_map {
|
||||
char *prop_name;
|
||||
u32 *prop_value;
|
||||
u32 prop_max;
|
||||
};
|
||||
|
||||
static const struct fpga_bridge_ops altera_fpga2sdram_br_ops = {
|
||||
.enable_set = alt_fpga2sdram_enable_set,
|
||||
.enable_show = alt_fpga2sdram_enable_show,
|
||||
|
@ -1,6 +1,6 @@
|
||||
config FPGA_KUNIT_TESTS
|
||||
bool "KUnit test for the FPGA subsystem" if !KUNIT_ALL_TESTS
|
||||
depends on FPGA=y && FPGA_REGION=y && FPGA_BRIDGE=y && KUNIT=y && MODULES=n
|
||||
tristate "KUnit test for the FPGA subsystem" if !KUNIT_ALL_TESTS
|
||||
depends on FPGA && FPGA_REGION && FPGA_BRIDGE && KUNIT=y
|
||||
default KUNIT_ALL_TESTS
|
||||
help
|
||||
This builds unit tests for the FPGA subsystem
|
||||
|
@ -375,5 +375,6 @@ static void __exit gb_exit(void)
|
||||
tracepoint_synchronize_unregister();
|
||||
}
|
||||
module_exit(gb_exit);
|
||||
MODULE_DESCRIPTION("Greybus core driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Greg Kroah-Hartman <gregkh@linuxfoundation.org>");
|
||||
|
@ -1456,5 +1456,6 @@ static struct usb_driver es2_ap_driver = {
|
||||
|
||||
module_usb_driver(es2_ap_driver);
|
||||
|
||||
MODULE_DESCRIPTION("Greybus AP USB driver for ES2 controller chips");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Greg Kroah-Hartman <gregkh@linuxfoundation.org>");
|
||||
|
@ -33,6 +33,17 @@ struct iio_hwmon_state {
|
||||
struct attribute **attrs;
|
||||
};
|
||||
|
||||
static ssize_t iio_hwmon_read_label(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr);
|
||||
struct iio_hwmon_state *state = dev_get_drvdata(dev);
|
||||
struct iio_channel *chan = &state->channels[sattr->index];
|
||||
|
||||
return iio_read_channel_label(chan, buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Assumes that IIO and hwmon operate in the same base units.
|
||||
* This is supposed to be true, but needs verification for
|
||||
@ -69,12 +80,13 @@ static int iio_hwmon_probe(struct platform_device *pdev)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct iio_hwmon_state *st;
|
||||
struct sensor_device_attribute *a;
|
||||
int ret, i;
|
||||
int ret, i, attr = 0;
|
||||
int in_i = 1, temp_i = 1, curr_i = 1, humidity_i = 1, power_i = 1;
|
||||
enum iio_chan_type type;
|
||||
struct iio_channel *channels;
|
||||
struct device *hwmon_dev;
|
||||
char *sname;
|
||||
void *buf;
|
||||
|
||||
channels = devm_iio_channel_get_all(dev);
|
||||
if (IS_ERR(channels)) {
|
||||
@ -86,17 +98,18 @@ static int iio_hwmon_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
st = devm_kzalloc(dev, sizeof(*st), GFP_KERNEL);
|
||||
if (st == NULL)
|
||||
buf = (void *)devm_get_free_pages(dev, GFP_KERNEL, 0);
|
||||
if (!st || !buf)
|
||||
return -ENOMEM;
|
||||
|
||||
st->channels = channels;
|
||||
|
||||
/* count how many attributes we have */
|
||||
/* count how many channels we have */
|
||||
while (st->channels[st->num_channels].indio_dev)
|
||||
st->num_channels++;
|
||||
|
||||
st->attrs = devm_kcalloc(dev,
|
||||
st->num_channels + 1, sizeof(*st->attrs),
|
||||
2 * st->num_channels + 1, sizeof(*st->attrs),
|
||||
GFP_KERNEL);
|
||||
if (st->attrs == NULL)
|
||||
return -ENOMEM;
|
||||
@ -148,9 +161,31 @@ static int iio_hwmon_probe(struct platform_device *pdev)
|
||||
a->dev_attr.show = iio_hwmon_read_val;
|
||||
a->dev_attr.attr.mode = 0444;
|
||||
a->index = i;
|
||||
st->attrs[i] = &a->dev_attr.attr;
|
||||
st->attrs[attr++] = &a->dev_attr.attr;
|
||||
|
||||
/* Let's see if we have a label... */
|
||||
if (iio_read_channel_label(&st->channels[i], buf) < 0)
|
||||
continue;
|
||||
|
||||
a = devm_kzalloc(dev, sizeof(*a), GFP_KERNEL);
|
||||
if (a == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
sysfs_attr_init(&a->dev_attr.attr);
|
||||
a->dev_attr.attr.name = devm_kasprintf(dev, GFP_KERNEL,
|
||||
"%s%d_label",
|
||||
prefix, n);
|
||||
if (!a->dev_attr.attr.name)
|
||||
return -ENOMEM;
|
||||
|
||||
a->dev_attr.show = iio_hwmon_read_label;
|
||||
a->dev_attr.attr.mode = 0444;
|
||||
a->index = i;
|
||||
st->attrs[attr++] = &a->dev_attr.attr;
|
||||
}
|
||||
|
||||
devm_free_pages(dev, (unsigned long)buf);
|
||||
|
||||
st->attr_group.attrs = st->attrs;
|
||||
st->groups[0] = &st->attr_group;
|
||||
|
||||
|
@ -360,10 +360,10 @@ static int init_core_mask(struct peci_cputemp *priv)
|
||||
int ret;
|
||||
|
||||
/* Get the RESOLVED_CORES register value */
|
||||
switch (peci_dev->info.model) {
|
||||
case INTEL_FAM6_ICELAKE_X:
|
||||
case INTEL_FAM6_ICELAKE_D:
|
||||
case INTEL_FAM6_SAPPHIRERAPIDS_X:
|
||||
switch (peci_dev->info.x86_vfm) {
|
||||
case INTEL_ICELAKE_X:
|
||||
case INTEL_ICELAKE_D:
|
||||
case INTEL_SAPPHIRERAPIDS_X:
|
||||
ret = peci_ep_pci_local_read(peci_dev, 0, reg->bus, reg->dev,
|
||||
reg->func, reg->offset + 4, &data);
|
||||
if (ret)
|
||||
|
@ -275,7 +275,7 @@ static int of_get_coresight_platform_data(struct device *dev,
|
||||
*/
|
||||
if (!parent) {
|
||||
/*
|
||||
* Avoid warnings in of_graph_get_next_endpoint()
|
||||
* Avoid warnings in for_each_endpoint_of_node()
|
||||
* if the device doesn't have any graph connections
|
||||
*/
|
||||
if (!of_graph_is_present(node))
|
||||
@ -286,7 +286,7 @@ static int of_get_coresight_platform_data(struct device *dev,
|
||||
}
|
||||
|
||||
/* Iterate through each output port to discover topology */
|
||||
while ((ep = of_graph_get_next_endpoint(parent, ep))) {
|
||||
for_each_endpoint_of_node(parent, ep) {
|
||||
/*
|
||||
* Legacy binding mixes input/output ports under the
|
||||
* same parent. So, skip the input ports if we are dealing
|
||||
@ -297,8 +297,10 @@ static int of_get_coresight_platform_data(struct device *dev,
|
||||
continue;
|
||||
|
||||
ret = of_coresight_parse_endpoint(dev, ep, pdata);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
of_node_put(ep);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
extern struct mutex coresight_mutex;
|
||||
extern struct device_type coresight_dev_type[];
|
||||
extern const struct device_type coresight_dev_type[];
|
||||
|
||||
/*
|
||||
* Coresight management registers (0xf00-0xfcc)
|
||||
|
@ -377,7 +377,7 @@ static struct attribute *coresight_source_attrs[] = {
|
||||
};
|
||||
ATTRIBUTE_GROUPS(coresight_source);
|
||||
|
||||
struct device_type coresight_dev_type[] = {
|
||||
const struct device_type coresight_dev_type[] = {
|
||||
[CORESIGHT_DEV_TYPE_SINK] = {
|
||||
.name = "sink",
|
||||
.groups = coresight_sink_groups,
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <linux/coresight.h>
|
||||
#include <linux/amba/bus.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/acpi.h>
|
||||
|
||||
#include "coresight-priv.h"
|
||||
#include "coresight-tmc.h"
|
||||
|
@ -116,4 +116,5 @@ static const struct msu_buffer sink_mbuf = {
|
||||
|
||||
module_intel_th_msu_buffer(sink_mbuf);
|
||||
|
||||
MODULE_DESCRIPTION("example software sink buffer for Intel TH MSU");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@ -400,7 +400,6 @@ static struct parport_driver i2c_parport_driver = {
|
||||
.name = "i2c-parport",
|
||||
.match_port = i2c_parport_attach,
|
||||
.detach = i2c_parport_detach,
|
||||
.devmodel = true,
|
||||
};
|
||||
module_parport_driver(i2c_parport_driver);
|
||||
|
||||
|
@ -14,6 +14,7 @@ if IIO
|
||||
|
||||
config IIO_BUFFER
|
||||
bool "Enable buffer support within IIO"
|
||||
select DMA_SHARED_BUFFER
|
||||
help
|
||||
Provide core support for various buffer based data
|
||||
acquisition methods.
|
||||
|
@ -72,13 +72,7 @@ static int adxl313_spi_probe(struct spi_device *spi)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* Retrieves device specific data as a pointer to a
|
||||
* adxl313_chip_info structure
|
||||
*/
|
||||
chip_data = device_get_match_data(&spi->dev);
|
||||
if (!chip_data)
|
||||
chip_data = (const struct adxl313_chip_info *)spi_get_device_id(spi)->driver_data;
|
||||
chip_data = spi_get_device_match_data(spi);
|
||||
|
||||
regmap = devm_regmap_init_spi(spi,
|
||||
&adxl31x_spi_regmap_config[chip_data->type]);
|
||||
|
@ -28,13 +28,9 @@ static int adxl355_spi_probe(struct spi_device *spi)
|
||||
const struct adxl355_chip_info *chip_data;
|
||||
struct regmap *regmap;
|
||||
|
||||
chip_data = device_get_match_data(&spi->dev);
|
||||
if (!chip_data) {
|
||||
chip_data = (void *)spi_get_device_id(spi)->driver_data;
|
||||
|
||||
if (!chip_data)
|
||||
return -EINVAL;
|
||||
}
|
||||
chip_data = spi_get_device_match_data(spi);
|
||||
if (!chip_data)
|
||||
return -EINVAL;
|
||||
|
||||
regmap = devm_regmap_init_spi(spi, &adxl355_spi_regmap_config);
|
||||
if (IS_ERR(regmap)) {
|
||||
|
@ -61,8 +61,8 @@ static int adxl367_i2c_probe(struct i2c_client *client)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id adxl367_i2c_id[] = {
|
||||
{ "adxl367", 0 },
|
||||
{ },
|
||||
{ "adxl367" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adxl367_i2c_id);
|
||||
|
||||
|
@ -42,7 +42,7 @@ static int adxl372_i2c_probe(struct i2c_client *client)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id adxl372_i2c_id[] = {
|
||||
{ "adxl372", 0 },
|
||||
{ "adxl372" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adxl372_i2c_id);
|
||||
|
@ -28,7 +28,7 @@ static int bma400_i2c_probe(struct i2c_client *client)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id bma400_i2c_ids[] = {
|
||||
{ "bma400", 0 },
|
||||
{ "bma400" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, bma400_i2c_ids);
|
||||
|
@ -114,11 +114,6 @@ enum bmi088_odr_modes {
|
||||
BMI088_ACCEL_MODE_ODR_1600 = 0xc,
|
||||
};
|
||||
|
||||
struct bmi088_scale_info {
|
||||
int scale;
|
||||
u8 reg_range;
|
||||
};
|
||||
|
||||
struct bmi088_accel_chip_info {
|
||||
const char *name;
|
||||
u8 chip_id;
|
||||
|
@ -268,7 +268,7 @@ static int da311_resume(struct device *dev)
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(da311_pm_ops, da311_suspend, da311_resume);
|
||||
|
||||
static const struct i2c_device_id da311_i2c_id[] = {
|
||||
{"da311", 0},
|
||||
{ "da311" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, da311_i2c_id);
|
||||
|
@ -201,9 +201,9 @@ static DEFINE_SIMPLE_DEV_PM_OPS(dmard06_pm_ops, dmard06_suspend,
|
||||
dmard06_resume);
|
||||
|
||||
static const struct i2c_device_id dmard06_id[] = {
|
||||
{ "dmard05", 0 },
|
||||
{ "dmard06", 0 },
|
||||
{ "dmard07", 0 },
|
||||
{ "dmard05" },
|
||||
{ "dmard06" },
|
||||
{ "dmard07" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, dmard06_id);
|
||||
|
@ -125,8 +125,8 @@ static int dmard09_probe(struct i2c_client *client)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id dmard09_id[] = {
|
||||
{ "dmard09", 0 },
|
||||
{ },
|
||||
{ "dmard09" },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(i2c, dmard09_id);
|
||||
|
@ -231,7 +231,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(dmard10_pm_ops, dmard10_suspend,
|
||||
dmard10_resume);
|
||||
|
||||
static const struct i2c_device_id dmard10_i2c_id[] = {
|
||||
{"dmard10", 0},
|
||||
{ "dmard10" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, dmard10_i2c_id);
|
||||
|
@ -228,8 +228,8 @@ static int fxls8962af_power_off(struct fxls8962af_data *data)
|
||||
|
||||
static int fxls8962af_standby(struct fxls8962af_data *data)
|
||||
{
|
||||
return regmap_update_bits(data->regmap, FXLS8962AF_SENS_CONFIG1,
|
||||
FXLS8962AF_SENS_CONFIG1_ACTIVE, 0);
|
||||
return regmap_clear_bits(data->regmap, FXLS8962AF_SENS_CONFIG1,
|
||||
FXLS8962AF_SENS_CONFIG1_ACTIVE);
|
||||
}
|
||||
|
||||
static int fxls8962af_active(struct fxls8962af_data *data)
|
||||
@ -785,9 +785,8 @@ static int fxls8962af_reset(struct fxls8962af_data *data)
|
||||
unsigned int reg;
|
||||
int ret;
|
||||
|
||||
ret = regmap_update_bits(data->regmap, FXLS8962AF_SENS_CONFIG1,
|
||||
FXLS8962AF_SENS_CONFIG1_RST,
|
||||
FXLS8962AF_SENS_CONFIG1_RST);
|
||||
ret = regmap_set_bits(data->regmap, FXLS8962AF_SENS_CONFIG1,
|
||||
FXLS8962AF_SENS_CONFIG1_RST);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -830,9 +829,8 @@ static int fxls8962af_buffer_postenable(struct iio_dev *indio_dev)
|
||||
fxls8962af_standby(data);
|
||||
|
||||
/* Enable buffer interrupt */
|
||||
ret = regmap_update_bits(data->regmap, FXLS8962AF_INT_EN,
|
||||
FXLS8962AF_INT_EN_BUF_EN,
|
||||
FXLS8962AF_INT_EN_BUF_EN);
|
||||
ret = regmap_set_bits(data->regmap, FXLS8962AF_INT_EN,
|
||||
FXLS8962AF_INT_EN_BUF_EN);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -851,8 +849,8 @@ static int fxls8962af_buffer_predisable(struct iio_dev *indio_dev)
|
||||
fxls8962af_standby(data);
|
||||
|
||||
/* Disable buffer interrupt */
|
||||
ret = regmap_update_bits(data->regmap, FXLS8962AF_INT_EN,
|
||||
FXLS8962AF_INT_EN_BUF_EN, 0);
|
||||
ret = regmap_clear_bits(data->regmap, FXLS8962AF_INT_EN,
|
||||
FXLS8962AF_INT_EN_BUF_EN);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -43,8 +43,8 @@ static const struct of_device_id kxsd9_of_match[] = {
|
||||
MODULE_DEVICE_TABLE(of, kxsd9_of_match);
|
||||
|
||||
static const struct i2c_device_id kxsd9_i2c_id[] = {
|
||||
{"kxsd9", 0},
|
||||
{ },
|
||||
{ "kxsd9" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, kxsd9_i2c_id);
|
||||
|
||||
|
@ -370,10 +370,7 @@ static int kxsd9_power_down(struct kxsd9_state *st)
|
||||
* make sure we conserve power even if there are others users on the
|
||||
* regulators.
|
||||
*/
|
||||
ret = regmap_update_bits(st->map,
|
||||
KXSD9_REG_CTRL_B,
|
||||
KXSD9_CTRL_B_ENABLE,
|
||||
0);
|
||||
ret = regmap_clear_bits(st->map, KXSD9_REG_CTRL_B, KXSD9_CTRL_B_ENABLE);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -180,7 +180,7 @@ static int mc3230_resume(struct device *dev)
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(mc3230_pm_ops, mc3230_suspend, mc3230_resume);
|
||||
|
||||
static const struct i2c_device_id mc3230_i2c_id[] = {
|
||||
{"mc3230", 0},
|
||||
{ "mc3230" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mc3230_i2c_id);
|
||||
|
@ -32,8 +32,8 @@ static void mma7455_i2c_remove(struct i2c_client *i2c)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id mma7455_i2c_ids[] = {
|
||||
{ "mma7455", 0 },
|
||||
{ "mma7456", 0 },
|
||||
{ "mma7455" },
|
||||
{ "mma7456" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mma7455_i2c_ids);
|
||||
|
@ -38,21 +38,6 @@
|
||||
|
||||
static const int mma7660_nscale = 467142857;
|
||||
|
||||
#define MMA7660_CHANNEL(reg, axis) { \
|
||||
.type = IIO_ACCEL, \
|
||||
.address = reg, \
|
||||
.modified = 1, \
|
||||
.channel2 = IIO_MOD_##axis, \
|
||||
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \
|
||||
.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \
|
||||
}
|
||||
|
||||
static const struct iio_chan_spec mma7660_channels[] = {
|
||||
MMA7660_CHANNEL(MMA7660_REG_XOUT, X),
|
||||
MMA7660_CHANNEL(MMA7660_REG_YOUT, Y),
|
||||
MMA7660_CHANNEL(MMA7660_REG_ZOUT, Z),
|
||||
};
|
||||
|
||||
enum mma7660_mode {
|
||||
MMA7660_MODE_STANDBY,
|
||||
MMA7660_MODE_ACTIVE
|
||||
@ -62,6 +47,21 @@ struct mma7660_data {
|
||||
struct i2c_client *client;
|
||||
struct mutex lock;
|
||||
enum mma7660_mode mode;
|
||||
struct iio_mount_matrix orientation;
|
||||
};
|
||||
|
||||
static const struct iio_mount_matrix *
|
||||
mma7660_get_mount_matrix(const struct iio_dev *indio_dev,
|
||||
const struct iio_chan_spec *chan)
|
||||
{
|
||||
struct mma7660_data *data = iio_priv(indio_dev);
|
||||
|
||||
return &data->orientation;
|
||||
}
|
||||
|
||||
static const struct iio_chan_spec_ext_info mma7660_ext_info[] = {
|
||||
IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, mma7660_get_mount_matrix),
|
||||
{ }
|
||||
};
|
||||
|
||||
static IIO_CONST_ATTR(in_accel_scale_available, MMA7660_SCALE_AVAIL);
|
||||
@ -75,6 +75,22 @@ static const struct attribute_group mma7660_attribute_group = {
|
||||
.attrs = mma7660_attributes
|
||||
};
|
||||
|
||||
#define MMA7660_CHANNEL(reg, axis) { \
|
||||
.type = IIO_ACCEL, \
|
||||
.address = reg, \
|
||||
.modified = 1, \
|
||||
.channel2 = IIO_MOD_##axis, \
|
||||
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \
|
||||
.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \
|
||||
.ext_info = mma7660_ext_info, \
|
||||
}
|
||||
|
||||
static const struct iio_chan_spec mma7660_channels[] = {
|
||||
MMA7660_CHANNEL(MMA7660_REG_XOUT, X),
|
||||
MMA7660_CHANNEL(MMA7660_REG_YOUT, Y),
|
||||
MMA7660_CHANNEL(MMA7660_REG_ZOUT, Z),
|
||||
};
|
||||
|
||||
static int mma7660_set_mode(struct mma7660_data *data,
|
||||
enum mma7660_mode mode)
|
||||
{
|
||||
@ -187,6 +203,10 @@ static int mma7660_probe(struct i2c_client *client)
|
||||
mutex_init(&data->lock);
|
||||
data->mode = MMA7660_MODE_STANDBY;
|
||||
|
||||
ret = iio_read_mount_matrix(&client->dev, &data->orientation);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
indio_dev->info = &mma7660_info;
|
||||
indio_dev->name = MMA7660_DRIVER_NAME;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
@ -241,7 +261,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(mma7660_pm_ops, mma7660_suspend,
|
||||
mma7660_resume);
|
||||
|
||||
static const struct i2c_device_id mma7660_i2c_id[] = {
|
||||
{"mma7660", 0},
|
||||
{ "mma7660" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mma7660_i2c_id);
|
||||
|
@ -595,7 +595,7 @@ static const struct acpi_device_id mma9551_acpi_match[] = {
|
||||
MODULE_DEVICE_TABLE(acpi, mma9551_acpi_match);
|
||||
|
||||
static const struct i2c_device_id mma9551_id[] = {
|
||||
{"mma9551", 0},
|
||||
{ "mma9551" },
|
||||
{}
|
||||
};
|
||||
|
||||
|
@ -1234,8 +1234,8 @@ static const struct acpi_device_id mma9553_acpi_match[] = {
|
||||
MODULE_DEVICE_TABLE(acpi, mma9553_acpi_match);
|
||||
|
||||
static const struct i2c_device_id mma9553_id[] = {
|
||||
{"mma9553", 0},
|
||||
{},
|
||||
{ "mma9553" },
|
||||
{}
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(i2c, mma9553_id);
|
||||
|
@ -1034,10 +1034,10 @@ static int msa311_chip_init(struct msa311_priv *msa311)
|
||||
"failed to unmap map0/map1 interrupts\n");
|
||||
|
||||
/* Disable all axes by default */
|
||||
err = regmap_update_bits(msa311->regs, MSA311_ODR_REG,
|
||||
MSA311_GENMASK(F_X_AXIS_DIS) |
|
||||
MSA311_GENMASK(F_Y_AXIS_DIS) |
|
||||
MSA311_GENMASK(F_Z_AXIS_DIS), 0);
|
||||
err = regmap_clear_bits(msa311->regs, MSA311_ODR_REG,
|
||||
MSA311_GENMASK(F_X_AXIS_DIS) |
|
||||
MSA311_GENMASK(F_Y_AXIS_DIS) |
|
||||
MSA311_GENMASK(F_Z_AXIS_DIS));
|
||||
if (err)
|
||||
return dev_err_probe(dev, err, "can't enable all axes\n");
|
||||
|
||||
|
@ -584,9 +584,9 @@ static const struct of_device_id mxc4005_of_match[] = {
|
||||
MODULE_DEVICE_TABLE(of, mxc4005_of_match);
|
||||
|
||||
static const struct i2c_device_id mxc4005_id[] = {
|
||||
{"mxc4005", 0},
|
||||
{"mxc6655", 0},
|
||||
{ },
|
||||
{ "mxc4005" },
|
||||
{ "mxc6655" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mxc4005_id);
|
||||
|
||||
|
@ -172,8 +172,8 @@ static const struct acpi_device_id mxc6255_acpi_match[] = {
|
||||
MODULE_DEVICE_TABLE(acpi, mxc6255_acpi_match);
|
||||
|
||||
static const struct i2c_device_id mxc6255_id[] = {
|
||||
{"mxc6225", 0},
|
||||
{"mxc6255", 0},
|
||||
{ "mxc6225" },
|
||||
{ "mxc6255" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mxc6255_id);
|
||||
|
@ -35,6 +35,7 @@
|
||||
#define LIS3DHH_ACCEL_DEV_NAME "lis3dhh"
|
||||
#define LIS3DE_ACCEL_DEV_NAME "lis3de"
|
||||
#define LIS2DE12_ACCEL_DEV_NAME "lis2de12"
|
||||
#define LIS2DS12_ACCEL_DEV_NAME "lis2ds12"
|
||||
#define LIS2HH12_ACCEL_DEV_NAME "lis2hh12"
|
||||
#define LIS302DL_ACCEL_DEV_NAME "lis302dl"
|
||||
#define LSM303C_ACCEL_DEV_NAME "lsm303c_accel"
|
||||
|
@ -925,6 +925,87 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
|
||||
.multi_read_bit = true,
|
||||
.bootime = 2,
|
||||
},
|
||||
{
|
||||
.wai = 0x43,
|
||||
.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
|
||||
.sensors_supported = {
|
||||
[0] = LIS2DS12_ACCEL_DEV_NAME,
|
||||
},
|
||||
.ch = (struct iio_chan_spec *)st_accel_16bit_channels,
|
||||
.odr = {
|
||||
.addr = 0x20,
|
||||
.mask = 0xf0,
|
||||
.odr_avl = {
|
||||
{ .hz = 10, .value = 0x01, },
|
||||
{ .hz = 50, .value = 0x02, },
|
||||
{ .hz = 100, .value = 0x03, },
|
||||
{ .hz = 200, .value = 0x04, },
|
||||
{ .hz = 400, .value = 0x05, },
|
||||
{ .hz = 800, .value = 0x06, },
|
||||
},
|
||||
},
|
||||
.pw = {
|
||||
.addr = 0x20,
|
||||
.mask = 0xf0,
|
||||
.value_off = ST_SENSORS_DEFAULT_POWER_OFF_VALUE,
|
||||
},
|
||||
.enable_axis = {
|
||||
.addr = ST_SENSORS_DEFAULT_AXIS_ADDR,
|
||||
.mask = ST_SENSORS_DEFAULT_AXIS_MASK,
|
||||
},
|
||||
.fs = {
|
||||
.addr = 0x20,
|
||||
.mask = 0x0c,
|
||||
.fs_avl = {
|
||||
[0] = {
|
||||
.num = ST_ACCEL_FS_AVL_2G,
|
||||
.value = 0x00,
|
||||
.gain = IIO_G_TO_M_S_2(61),
|
||||
},
|
||||
[1] = {
|
||||
.num = ST_ACCEL_FS_AVL_4G,
|
||||
.value = 0x02,
|
||||
.gain = IIO_G_TO_M_S_2(122),
|
||||
},
|
||||
[2] = {
|
||||
.num = ST_ACCEL_FS_AVL_8G,
|
||||
.value = 0x03,
|
||||
.gain = IIO_G_TO_M_S_2(244),
|
||||
},
|
||||
[3] = {
|
||||
.num = ST_ACCEL_FS_AVL_16G,
|
||||
.value = 0x01,
|
||||
.gain = IIO_G_TO_M_S_2(488),
|
||||
},
|
||||
},
|
||||
},
|
||||
.bdu = {
|
||||
.addr = 0x20,
|
||||
.mask = 0x01,
|
||||
},
|
||||
.drdy_irq = {
|
||||
.int1 = {
|
||||
.addr = 0x23,
|
||||
.mask = 0x01,
|
||||
},
|
||||
.int2 = {
|
||||
.addr = 0x24,
|
||||
.mask = 0x01,
|
||||
},
|
||||
.addr_ihl = 0x22,
|
||||
.mask_ihl = 0x02,
|
||||
.stat_drdy = {
|
||||
.addr = ST_SENSORS_DEFAULT_STAT_ADDR,
|
||||
.mask = 0x01,
|
||||
},
|
||||
},
|
||||
.sim = {
|
||||
.addr = 0x21,
|
||||
.value = BIT(0),
|
||||
},
|
||||
.multi_read_bit = true,
|
||||
.bootime = 2,
|
||||
},
|
||||
{
|
||||
.wai = 0x41,
|
||||
.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
|
||||
|
@ -102,6 +102,10 @@ static const struct of_device_id st_accel_of_match[] = {
|
||||
.compatible = "st,lis2de12",
|
||||
.data = LIS2DE12_ACCEL_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "st,lis2ds12",
|
||||
.data = LIS2DS12_ACCEL_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "st,lis2hh12",
|
||||
.data = LIS2HH12_ACCEL_DEV_NAME,
|
||||
@ -154,6 +158,7 @@ static const struct i2c_device_id st_accel_id_table[] = {
|
||||
{ LIS2DW12_ACCEL_DEV_NAME },
|
||||
{ LIS3DE_ACCEL_DEV_NAME },
|
||||
{ LIS2DE12_ACCEL_DEV_NAME },
|
||||
{ LIS2DS12_ACCEL_DEV_NAME },
|
||||
{ LIS2HH12_ACCEL_DEV_NAME },
|
||||
{ LIS302DL_ACCEL_DEV_NAME },
|
||||
{ LSM303C_ACCEL_DEV_NAME },
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user