]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad7380: prepare for parts with more channels
authorJulien Stephan <jstephan@baylibre.com>
Tue, 28 May 2024 14:20:32 +0000 (16:20 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 4 Jun 2024 18:53:08 +0000 (19:53 +0100)
commitbaa781e1d84f2165c480c28d2c286e465d3fb2e1
treedd30265469fbbc7d62b8c95cf1b967c0e8a63f09
parent2920b6ee6d69ed874b8cc60e5a0b930aca102e18
iio: adc: ad7380: prepare for parts with more channels

The current driver supports only parts with 2 channels.
In order to prepare the support of new compatible ADCs with more
channels, this commit:
  - defines MAX_NUM_CHANNEL to specify the maximum number of
    channels currently supported by the driver
  - adds available_scan_mask member in ad7380_chip_info structure
  - fixes spi xfer struct len depending on number of channels
  - fixes scan_data.raw buffer size to handle more channels
  - adds a timing specifications structure in ad7380_chip_info structure

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://lore.kernel.org/r/20240528-adding-new-ad738x-driver-v7-5-4cd70a4c12c8@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7380.c