• Andrea Merello's avatar
    iio: max31856: add support for configuring the HW averaging · 57a4274c
    Andrea Merello authored
    This sensor can perform samples averaging in hardware, but currently the
    driver leaves this setting alone (default is no averaging).
    
    This patch binds this HW setting to the "oversampling_ratio" IIO attribute
    and allows the user to set the averaging as desired (the HW supports
    averaging of 2, 5, 8 or 16 samples; in-between values are rounded up).
    
    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: 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
    Signed-off-by: default avatarAndrea Merello <andrea.merello@gmail.com>
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    57a4274c
max31856.c 11.2 KB