Skip to content

Commit

Permalink
Merge tag 'iio-for-6.9b' of https://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/jic23/iio into char-misc-next

Jonathan writes:

IIO: 2nd set of new device support, cleanups and features for 6.9

New device support
=================
adi,hmc425a
- Add support for LTC6373 Instrumentation Amplifier.
microchip,pac1934
- New driver supporting PAC1931, PAC1932, PAC1933 and PAC1934 power monitoring
chips with accumulators.
voltafield,af8133j
- New driver for the AF8133J 3 axis magnetometer.

Docs
====

New general documentation of device buffers, and a specific section on
the adi,adis16475 IMU

Features
========

kionix,kxcjk-1013
 - Add support for ACPI ROTM (Microsoft defined ACPI method) to get rotation
   matrix.
ti,tmp117
- Add missing vcc-supply control and binding.

Cleanups and minor fixes
========================

Tree-wide
- Corrected headers to remove linux/of.h from a bunch of drivers
  that only had it to get to linux/mod_devicetable.h
- dt binding cleanup to drop redundant type from label properties.

adi,hmc425a
- Fix constraints on GPIO array sizes for different devices.
adi,ltc2983
- Use spi_get_device_match_data instead of open coding similar.
- Update naming of fw parsing function to reflect that it is not longer
  dt only.
- Set the chip name explicitly to reduce fragility resulting from different
  entries in the various ID tables.
bosch,bmg160
- Add spi-max-frequency property and limit to dt-binding.
microchip,mcp320x
- Use devm_* to simplify device removal and error handling.
nxp,imx93
- Drop a non existent 4th interrupt from bindings.
qcom,mp8xxx-xoadc
- Drop unused kerneldoc
renesas,isl29501
- Actually use the of_match table.
rockchip,saradc
- Fix channel bitmask
- Fix write masks
- Replace custom handling of optional reset control with how it should be
  done.
ti,ads1298
- Fix error code to not return a successfully obtained regulator.
- Avoid a divide by zero when setting frequency.
ti,hdc2010
- Add missing interrupts dt binding property
vishay,veml6075
- Make vdd-supply required in the dt-binding.

* tag 'iio-for-6.9b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (42 commits)
  dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency
  dt-bindings: iio: adc: imx93: drop the 4th interrupt
  iio: proximity: isl29501: make use of of_device_id table
  iio: adc: qcom-pm8xxx-xoadc: drop unused kerneldoc struct pm8xxx_chan_info member
  dt-bindings: iio: adc: drop redundant type from label
  dt-bindings: iio: ti,tmp117: add optional label property
  MAINTAINERS: Add an entry for AF8133J driver
  iio: magnetometer: add a driver for Voltafield AF8133J magnetometer
  dt-bindings: iio: magnetometer: Add Voltafield AF8133J
  dt-bindings: vendor-prefix: Add prefix for Voltafield
  iio: adc: rockchip_saradc: replace custom logic with devm_reset_control_get_optional_exclusive
  iio: adc: rockchip_saradc: use mask for write_enable bitfield
  iio: adc: rockchip_saradc: fix bitmask for channels on SARADCv2
  dt-bindings: iio: light: vishay,veml6075: make vdd-supply required
  iio: adc: adding support for PAC193x
  dt-bindings: iio: adc: adding support for PAC193X
  iio: temperature: ltc2983: explicitly set the name in chip_info
  iio: temperature: ltc2983: rename ltc2983_parse_dt()
  iio: temperature: ltc2983: make use of spi_get_device_match_data()
  iio: adc: ti-ads1298: prevent divide by zero in ads1298_set_samp_freq()
  ...
  • Loading branch information
Greg Kroah-Hartman committed Mar 2, 2024
2 parents a6a3bf9 + 6b61aae commit e0014ce
Show file tree
Hide file tree
Showing 39 changed files with 3,376 additions and 124 deletions.
9 changes: 9 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-iio-adc-pac1934
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
What: /sys/bus/iio/devices/iio:deviceX/in_shunt_resistorY
KernelVersion: 6.7
Contact: linux-iio@vger.kernel.org
Description:
The value of the shunt resistor may be known only at runtime
and set by a client application. This attribute allows to
set its value in micro-ohms. X is the IIO index of the device.
Y is the channel number. The value is used to calculate
current, power and accumulated energy.
1 change: 0 additions & 1 deletion Documentation/devicetree/bindings/iio/adc/adc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ properties:
maxItems: 1

label:
$ref: /schemas/types.yaml#/definitions/string
description: Unique name to identify which channel this is.

bipolar:
Expand Down
120 changes: 120 additions & 0 deletions Documentation/devicetree/bindings/iio/adc/microchip,pac1934.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/microchip,pac1934.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip PAC1934 Power Monitors with Accumulator

maintainers:
- Marius Cristea <marius.cristea@microchip.com>

description: |
This device is part of the Microchip family of Power Monitors with
Accumulator.
The datasheet for PAC1931, PAC1932, PAC1933 and PAC1934 can be found here:
https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/PAC1931-Family-Data-Sheet-DS20005850E.pdf
properties:
compatible:
enum:
- microchip,pac1931
- microchip,pac1932
- microchip,pac1933
- microchip,pac1934

reg:
maxItems: 1

"#address-cells":
const: 1

"#size-cells":
const: 0

interrupts:
maxItems: 1

slow-io-gpios:
description:
A GPIO used to trigger a change is sampling rate (lowering the chip power
consumption). If configured in SLOW mode, if this pin is forced high,
sampling rate is forced to eight samples/second. When it is forced low,
the sampling rate is 1024 samples/second unless a different sample rate
has been programmed.

patternProperties:
"^channel@[1-4]+$":
type: object
$ref: adc.yaml
description:
Represents the external channels which are connected to the ADC.

properties:
reg:
items:
minimum: 1
maximum: 4

shunt-resistor-micro-ohms:
description:
Value in micro Ohms of the shunt resistor connected between
the SENSE+ and SENSE- inputs, across which the current is measured.
Value is needed to compute the scaling of the measured current.

required:
- reg
- shunt-resistor-micro-ohms

unevaluatedProperties: false

required:
- compatible
- reg
- "#address-cells"
- "#size-cells"

additionalProperties: false

examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
power-monitor@10 {
compatible = "microchip,pac1934";
reg = <0x10>;
#address-cells = <1>;
#size-cells = <0>;
channel@1 {
reg = <0x1>;
shunt-resistor-micro-ohms = <24900000>;
label = "CPU";
};
channel@2 {
reg = <0x2>;
shunt-resistor-micro-ohms = <49900000>;
label = "GPU";
};
channel@3 {
reg = <0x3>;
shunt-resistor-micro-ohms = <75000000>;
label = "MEM";
bipolar;
};
channel@4 {
reg = <0x4>;
shunt-resistor-micro-ohms = <100000000>;
label = "NET";
bipolar;
};
};
};
...
4 changes: 1 addition & 3 deletions Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ properties:
- description: normal conversion, include EOC (End of Conversion),
ECH (End of Chain), JEOC (End of Injected Conversion) and
JECH (End of injected Chain).
- description: Self-testing Interrupts.

clocks:
maxItems: 1
Expand Down Expand Up @@ -70,8 +69,7 @@ examples:
reg = <0x44530000 0x10000>;
interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
<GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX93_CLK_ADC1_GATE>;
clock-names = "ipg";
vref-supply = <&reg_vref_1v8>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ patternProperties:
in the PMIC-specific files in include/dt-bindings/iio/.
label:
$ref: /schemas/types.yaml#/definitions/string
description: |
ADC input of the platform as seen in the schematics.
For thermistor inputs connected to generic AMUX or GPIO inputs
Expand Down
47 changes: 44 additions & 3 deletions Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,64 @@ description: |
HMC540S 1 dB LSB Silicon MMIC 4-Bit Digital Positive Control Attenuator, 0.1 - 8 GHz
https://www.analog.com/media/en/technical-documentation/data-sheets/hmc540s.pdf
LTC6373 is a 3-Bit precision instrumentation amplifier with fully differential outputs
https://www.analog.com/media/en/technical-documentation/data-sheets/ltc6373.pdf
properties:
compatible:
enum:
- adi,adrf5740
- adi,hmc425a
- adi,hmc540s
- adi,ltc6373

vcc-supply: true

ctrl-gpios:
description:
Must contain an array of 6 GPIO specifiers, referring to the GPIO pins
connected to the control pins V1-V6.
minItems: 6
Must contain an array of GPIO specifiers, referring to the GPIO pins
connected to the control pins.
ADRF5740 - 4 GPIO connected to D2-D5
HMC540S - 4 GPIO connected to V1-V4
HMC425A - 6 GPIO connected to V1-V6
LTC6373 - 3 GPIO connected to A0-A2
minItems: 1
maxItems: 6

allOf:
- if:
properties:
compatible:
contains:
const: adi,hmc425a
then:
properties:
ctrl-gpios:
minItems: 6
maxItems: 6
- if:
properties:
compatible:
contains:
anyOf:
- const: adi,adrf5740
- const: adi,hmc540s
then:
properties:
ctrl-gpios:
minItems: 4
maxItems: 4
- if:
properties:
compatible:
contains:
const: adi,ltc6373
then:
properties:
ctrl-gpios:
minItems: 3
maxItems: 3

required:
- compatible
- ctrl-gpios
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ properties:
vdd-supply: true
vddio-supply: true

spi-max-frequency:
maximum: 10000000

interrupts:
minItems: 1
maxItems: 2
Expand All @@ -33,7 +36,10 @@ required:
- compatible
- reg

additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ properties:
reg:
maxItems: 1

interrupts:
maxItems: 1

required:
- compatible
- reg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ properties:
required:
- compatible
- reg
- vdd-supply

additionalProperties: false

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/magnetometer/voltafield,af8133j.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Voltafield AF8133J magnetometer sensor

maintainers:
- Ondřej Jirman <megi@xff.cz>

properties:
compatible:
const: voltafield,af8133j

reg:
maxItems: 1

reset-gpios:
description:
A signal for active low reset input of the sensor. (optional; if not
used, software reset over I2C will be used instead)

avdd-supply:
description:
A regulator that provides AVDD power (Working power, usually 3.3V) to
the sensor.

dvdd-supply:
description:
A regulator that provides DVDD power (Digital IO power, 1.8V - AVDD)
to the sensor.

mount-matrix:
description: An optional 3x3 mounting rotation matrix.

required:
- compatible
- reg
- avdd-supply
- dvdd-supply

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
magnetometer@1c {
compatible = "voltafield,af8133j";
reg = <0x1c>;
avdd-supply = <&reg_dldo1>;
dvdd-supply = <&reg_dldo1>;
reset-gpios = <&pio 1 1 GPIO_ACTIVE_LOW>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,16 @@ properties:
reg:
maxItems: 1

vcc-supply:
description: provide VCC power to the sensor.

label:
description: Unique name to identify which device this is.

required:
- compatible
- reg
- vcc-supply

additionalProperties: false

Expand All @@ -39,5 +46,6 @@ examples:
tmp117@48 {
compatible = "ti,tmp117";
reg = <0x48>;
vcc-supply = <&pmic_reg_3v3>;
};
};
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/vendor-prefixes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,8 @@ patternProperties:
description: VoCore Studio
"^voipac,.*":
description: Voipac Technologies s.r.o.
"^voltafield,.*":
description: Voltafield Technology Corp.
"^vot,.*":
description: Vision Optical Technology Co., Ltd.
"^vxt,.*":
Expand Down
Loading

0 comments on commit e0014ce

Please sign in to comment.