Message ID | 20230519160145.44208-1-marius.cristea@microchip.com |
---|---|
Headers | show |
Series | Adding support for Microchip MCP3564 ADC family | expand |
On Wed, 24 May 2023 12:37:43 +0200 Mike Looijmans <mike.looijmans@topic.nl> wrote: > On 19-05-2023 18:01, marius.cristea@microchip.com wrote: > > From: Marius Cristea <marius.cristea@microchip.com> > > > > This is the device tree schema for iio driver for > > Microchip family of 153.6 ksps, Low-Noise 16/24-Bit > > Delta-Sigma ADCs with an SPI interface. > > > > Signed-off-by: Marius Cristea <marius.cristea@microchip.com> > > --- > > .../bindings/iio/adc/microchip,mcp3564.yaml | 88 +++++++++++++++++++ > > 1 file changed, 88 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/iio/adc/microchip,mcp3564.yaml > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3564.yaml b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3564.yaml > > new file mode 100644 > > index 000000000000..407a125e3776 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3564.yaml > > @@ -0,0 +1,88 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/iio/adc/microchip,mcp3564.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Microchip MCP346X and MCP356X ADC Family > > + > > +maintainers: > > + - Marius Cristea <marius.cristea@microchip.com> > > + > > +description: | > > + Bindings for the Microchip family of 153.6 ksps, Low-Noise 16/24-Bit > > + Delta-Sigma ADCs with an SPI interface. > > + > > +properties: > > + compatible: > > + enum: > > + - microchip,mcp3461 > > + - microchip,mcp3462 > > + - microchip,mcp3464 > > + - microchip,mcp3461r > > + - microchip,mcp3462r > > + - microchip,mcp3464r > > + - microchip,mcp3561 > > + - microchip,mcp3562 > > + - microchip,mcp3564 > > + - microchip,mcp3561r > > + - microchip,mcp3562r > > + - microchip,mcp3564r > > + > > + reg: > > + maxItems: 1 > > + > > + spi-max-frequency: true > > + > > + spi-cpha: true > > + > > + spi-cpol: true > > + > > + vref-supply: > > + description: > > + Some devices have a specific reference voltage supplied on a different > > + pin to the other supplies. Needed to be able to establish channel scaling > > + unless there is also an internal reference available (e.g. mcp3564r) > > + > > + microchip,hw-device-address: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + minimum: 0 > > + maximum: 3 > > + description: > > + The address is set on a per-device basis by fuses in the factory, > > + configured on request. If not requested, the fuses are set for 0x1. > > + The device address is part of the device markings to avoid > > + potential confusion. This address is coded on two bits, so four possible > > + addresses are available when multiple devices are present on the same > > + SPI bus with only one Chip Select line for all devices. > > + > > + "#io-channel-cells": > > That's a typo, "io" should be "iio", right? Nope. I honestly can't remember the history behind that, but it's just io. Probably to do with IIO being Linux specific and this needing to be generic, but its just an educated guess. Jonathan
From: Marius Cristea <marius.cristea@microchip.com> Adding support for Microchip family of 153.6 ksps, Low-Noise 16/24-Bit Delta-Sigma ADCs with an SPI interface. This driver covers the following part numbers: - MCP3561, MCP3562, MCP3564, MCP3561R, MCP3562R, MCP3564R, - MCP3461, MCP3462, MCP3464, MCP3461R, MCP3462R and MCP3464R. Differences related to previous patch: v0: - first version comitted to review Marius Cristea (2): dt-bindings: iio: adc: adding MCP3564 ADC iio: adc: adding support for MCP3564 ADC .../ABI/testing/sysfs-bus-iio-mcp3564 | 143 ++ .../bindings/iio/adc/microchip,mcp3564.yaml | 88 ++ MAINTAINERS | 7 + drivers/iio/adc/Kconfig | 13 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/mcp3564.c | 1395 +++++++++++++++++ 6 files changed, 1647 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-mcp3564 create mode 100644 Documentation/devicetree/bindings/iio/adc/microchip,mcp3564.yaml create mode 100644 drivers/iio/adc/mcp3564.c base-commit: a508fbfed333aea05e4ac42d98803a031cda8ce8