mbox series

[v2,0/9] iio: max31856: provide more configuration options

Message ID 20191111153517.13862-1-andrea.merello@gmail.com (mailing list archive)
Headers show
Series iio: max31856: provide more configuration options | expand

Message

Andrea Merello Nov. 11, 2019, 3:35 p.m. UTC
This series was born in order to provide more configuration options for
max31856 devices. In this version, in order to do that, it also extends
the IIO core. While at it, I've also updates maxim_thermocouple driver
to take (little) advantage of the said change.

Two hardware features (power mains noise rejection and HW averaging)
were not previously configurable, and one (thermocouple type selection)
was only possible via DT, but in my experience this is quite limiting in
several scenario (see 3/3 commit message for complete explanation).

These patches have been tested backporting max31856 driver on a 4.19
upstream kernel (Xilinx mpsoc-based board), and then rebased on the
IIO testing git tree.

I have real HW for max31856, while for maxim_thermocouple I've tested my
changes as much as I could just spoofing in the DT (no real HW).

Changes in v2:
- 1/9 and 3/9: changed attribute name to better match IIO naming convention
- 2/9: added separate patch to document new attribute name introduced in 1/9
- 4/9, 5/9, 6/9: new patches to add support to IIO core for handling
  thermocouple_type addribute. Most notably 4/9 introduces support for
  handling 'char' type IIO sysfs attributes; RFC on this.
- 7/9: take advantage of just-added IIO thermocouple_type attribute instead
  of using extended custom attribute
- 8/9 and 9/9: new patches to make maxim_thermocouple driver to export
  (RO) thermocouple_type attribute

Andrea Merello (9):
  iio: max31856: add option for setting mains filter rejection frequency
  Documentation: ABI: document IIO in_temp_filter_notch_center_frequency
    file
  iio: max31856: add support for configuring the HW averaging
  RFC: iio: core: add char type for sysfs attributes
  iio: core: add thermocouple_type standard attribute
  Documentation: ABI: document IIO thermocouple_type file
  iio: max31856: add support for runtime-configuring the thermocouple
    type
  RFC/RFT: iio: maxim_thermocouple: add thermocouple_type sysfs
    attribute
  dt-bindings: iio: maxim_thermocouple: document new 'compatible'
    strings

 Documentation/ABI/testing/sysfs-bus-iio       |  13 ++
 .../iio/temperature/maxim_thermocouple.txt    |   7 +-
 drivers/iio/industrialio-core.c               |  23 ++-
 drivers/iio/temperature/max31856.c            | 133 +++++++++++++++++-
 drivers/iio/temperature/maxim_thermocouple.c  |  45 +++++-
 include/linux/iio/types.h                     |   2 +
 6 files changed, 212 insertions(+), 11 deletions(-)

Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Patrick Havelange <patrick.havelange@essensium.com>
Cc: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com>
Cc: Matt Weber <matthew.weber@rockwellcollins.com>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Chuhong Yuan <hslester96@gmail.com>
Cc: Daniel Gomez <dagmcr@gmail.com>
Cc: linux-iio@vger.kernel.org

--
2.17.1