linux icon indicating copy to clipboard operation
linux copied to clipboard

drivers: iio: adc: Add support for ad4630

Open scuciurean opened this issue 2 years ago • 3 comments

This PR is based on #1894

scuciurean avatar May 12 '22 14:05 scuciurean

Changelog -> V2:

  • Use claim_direct_mode for buffer locking
  • Add scale support
  • Use power monitor ops instead of iio attribute for sleep mode

scuciurean avatar Jun 15 '22 15:06 scuciurean

Changelog -> V3:

  • Add missing iio_device_release_direct_mode()

scuciurean avatar Jun 15 '22 15:06 scuciurean

Changelog:

  • Claim iio device only inside helper functions
  • Remove unused pm runtime functions

scuciurean avatar Sep 30 '22 17:09 scuciurean

v5:

  • rebase on top of the master branch

dbogdan avatar Nov 11 '22 15:11 dbogdan

v5:

  • fix Checkpatch complaint (Please use a blank line after struct iio_enum ad4630_avg_frame_len_enum).

dbogdan avatar Nov 11 '22 15:11 dbogdan

There was a major refactor on the driver that fixed some issues and also brings the driver to a state more "upstreamable". Just some highlights:

  • Removes common mode voltage channels. It was working in previous version since it relies on out of tree IIO code. One can still get the raw data from the buffered samples to get the common mode voltage;
  • Used proper IIO channel attributes for additional channel gain and offset;
  • Fixed channel gain calculation;
  • Get rid of string devicetree properties;
  • Use regmap;
  • Properly support regulators;
  • Fixed spi word size for interleaved lane and 4 lanes;
  • Support test_pattern as an additional channel. Only done like this because of the host clock mode where the device itself controls the spi word length (and IIO scan element properties are constant).

nunojsa avatar Dec 15 '22 13:12 nunojsa

v2:

  • fixed bindings check.

nunojsa avatar Dec 15 '22 13:12 nunojsa

v3:

  • imply the new driver.

nunojsa avatar Dec 16 '22 12:12 nunojsa

v4:

  • Take into account the test_pattern channel is not a real device channel that cannot be taken into account when calculating spi word length for the interleaved lane mode.

nunojsa avatar Dec 16 '22 12:12 nunojsa

v5:

  • Fix arm64 warnings about overflows...

nunojsa avatar Dec 20 '22 17:12 nunojsa