Re: [v3 5/9] iio: core: add thermocouple_type standard attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 20 Nov 2019 15:47:52 +0100
Andrea Merello <andrea.merello@xxxxxxxxx> wrote:

> We have a couple of thermocouple IIO drivers, supporting several chips.
> Some of them support only one specific thermocouple type (e.g. "K", "J"),
> one of them can be configured to work with several different thermocouple
> types.
> 
> In certain applications thermocouples could be externally connected to the
> chip by the user.
> 
> This patch introduces a new IIO standard attribute to report the supported
> thermocouple type and, where applicable, to allow it to be dynamically set
> using sysfs.
> 
> Cc: Hartmut Knaack <knaack.h@xxxxxx>
> Cc: Lars-Peter Clausen <lars@xxxxxxxxxx>
> Cc: Peter Meerwald-Stadler <pmeerw@xxxxxxxxxx>
> Cc: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> Cc: Patrick Havelange <patrick.havelange@xxxxxxxxxxxxx>
> Cc: Matt Weber <matthew.weber@xxxxxxxxxxxxxxxxxxx>
> Cc: Matt Ranostay <matt.ranostay@xxxxxxxxxxxx>
> Cc: Chuhong Yuan <hslester96@xxxxxxxxx>
> Cc: Daniel Gomez <dagmcr@xxxxxxxxx>
> Cc: linux-iio@xxxxxxxxxxxxxxx
> Signed-off-by: Andrea Merello <andrea.merello@xxxxxxxxx>
Applied to the togreg branch of iio.git and pushed out as testing.
Not that I can still rebase for now so any last minute comments
or acks/ reviewed-bys can still be acted on.

Thanks,

Jonathan

> ---
>  drivers/iio/industrialio-core.c | 1 +
>  include/linux/iio/types.h       | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 958b5c48a86f..fa2c3b321bfd 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -161,6 +161,7 @@ static const char * const iio_chan_info_postfix[] = {
>  	[IIO_CHAN_INFO_DEBOUNCE_TIME] = "debounce_time",
>  	[IIO_CHAN_INFO_CALIBEMISSIVITY] = "calibemissivity",
>  	[IIO_CHAN_INFO_OVERSAMPLING_RATIO] = "oversampling_ratio",
> +	[IIO_CHAN_INFO_THERMOCOUPLE_TYPE] = "thermocouple_type",
>  };
>  
>  /**
> diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
> index 8e0026da38c9..e6fd3645963c 100644
> --- a/include/linux/iio/types.h
> +++ b/include/linux/iio/types.h
> @@ -58,6 +58,7 @@ enum iio_chan_info_enum {
>  	IIO_CHAN_INFO_DEBOUNCE_TIME,
>  	IIO_CHAN_INFO_CALIBEMISSIVITY,
>  	IIO_CHAN_INFO_OVERSAMPLING_RATIO,
> +	IIO_CHAN_INFO_THERMOCOUPLE_TYPE,
>  };
>  
>  #endif /* _IIO_TYPES_H_ */




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux