Merge remote-tracking branches 'asoc/topic/hdac_hdmi', 'asoc/topic/hisilicon', 'asoc/topic/iio' and 'asoc/topic/max98373' into asoc-next
This commit is contained in:
18
include/linux/iio/adc/stm32-dfsdm-adc.h
Normal file
18
include/linux/iio/adc/stm32-dfsdm-adc.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* This file discribe the STM32 DFSDM IIO driver API for audio part
|
||||
*
|
||||
* Copyright (C) 2017, STMicroelectronics - All Rights Reserved
|
||||
* Author(s): Arnaud Pouliquen <arnaud.pouliquen@st.com>.
|
||||
*/
|
||||
|
||||
#ifndef STM32_DFSDM_ADC_H
|
||||
#define STM32_DFSDM_ADC_H
|
||||
|
||||
int stm32_dfsdm_get_buff_cb(struct iio_dev *iio_dev,
|
||||
int (*cb)(const void *data, size_t size,
|
||||
void *private),
|
||||
void *private);
|
||||
int stm32_dfsdm_release_buff_cb(struct iio_dev *iio_dev);
|
||||
|
||||
#endif
|
||||
@@ -133,6 +133,17 @@ struct iio_cb_buffer *iio_channel_get_all_cb(struct device *dev,
|
||||
int (*cb)(const void *data,
|
||||
void *private),
|
||||
void *private);
|
||||
/**
|
||||
* iio_channel_cb_set_buffer_watermark() - set the buffer watermark.
|
||||
* @cb_buffer: The callback buffer from whom we want the channel
|
||||
* information.
|
||||
* @watermark: buffer watermark in bytes.
|
||||
*
|
||||
* This function allows to configure the buffer watermark.
|
||||
*/
|
||||
int iio_channel_cb_set_buffer_watermark(struct iio_cb_buffer *cb_buffer,
|
||||
size_t watermark);
|
||||
|
||||
/**
|
||||
* iio_channel_release_all_cb() - release and unregister the callback.
|
||||
* @cb_buffer: The callback buffer that was allocated.
|
||||
@@ -215,6 +226,32 @@ int iio_read_channel_average_raw(struct iio_channel *chan, int *val);
|
||||
*/
|
||||
int iio_read_channel_processed(struct iio_channel *chan, int *val);
|
||||
|
||||
/**
|
||||
* iio_write_channel_attribute() - Write values to the device attribute.
|
||||
* @chan: The channel being queried.
|
||||
* @val: Value being written.
|
||||
* @val2: Value being written.val2 use depends on attribute type.
|
||||
* @attribute: info attribute to be read.
|
||||
*
|
||||
* Returns an error code or 0.
|
||||
*/
|
||||
int iio_write_channel_attribute(struct iio_channel *chan, int val,
|
||||
int val2, enum iio_chan_info_enum attribute);
|
||||
|
||||
/**
|
||||
* iio_read_channel_attribute() - Read values from the device attribute.
|
||||
* @chan: The channel being queried.
|
||||
* @val: Value being written.
|
||||
* @val2: Value being written.Val2 use depends on attribute type.
|
||||
* @attribute: info attribute to be written.
|
||||
*
|
||||
* Returns an error code if failed. Else returns a description of what is in val
|
||||
* and val2, such as IIO_VAL_INT_PLUS_MICRO telling us we have a value of val
|
||||
* + val2/1e6
|
||||
*/
|
||||
int iio_read_channel_attribute(struct iio_channel *chan, int *val,
|
||||
int *val2, enum iio_chan_info_enum attribute);
|
||||
|
||||
/**
|
||||
* iio_write_channel_raw() - write to a given channel
|
||||
* @chan: The channel being queried.
|
||||
|
||||
21
include/linux/iio/hw-consumer.h
Normal file
21
include/linux/iio/hw-consumer.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Industrial I/O in kernel hardware consumer interface
|
||||
*
|
||||
* Copyright 2017 Analog Devices Inc.
|
||||
* Author: Lars-Peter Clausen <lars@metafoo.de>
|
||||
*/
|
||||
|
||||
#ifndef LINUX_IIO_HW_CONSUMER_H
|
||||
#define LINUX_IIO_HW_CONSUMER_H
|
||||
|
||||
struct iio_hw_consumer;
|
||||
|
||||
struct iio_hw_consumer *iio_hw_consumer_alloc(struct device *dev);
|
||||
void iio_hw_consumer_free(struct iio_hw_consumer *hwc);
|
||||
struct iio_hw_consumer *devm_iio_hw_consumer_alloc(struct device *dev);
|
||||
void devm_iio_hw_consumer_free(struct device *dev, struct iio_hw_consumer *hwc);
|
||||
int iio_hw_consumer_enable(struct iio_hw_consumer *hwc);
|
||||
void iio_hw_consumer_disable(struct iio_hw_consumer *hwc);
|
||||
|
||||
#endif
|
||||
@@ -20,34 +20,6 @@
|
||||
* Currently assumes nano seconds.
|
||||
*/
|
||||
|
||||
enum iio_chan_info_enum {
|
||||
IIO_CHAN_INFO_RAW = 0,
|
||||
IIO_CHAN_INFO_PROCESSED,
|
||||
IIO_CHAN_INFO_SCALE,
|
||||
IIO_CHAN_INFO_OFFSET,
|
||||
IIO_CHAN_INFO_CALIBSCALE,
|
||||
IIO_CHAN_INFO_CALIBBIAS,
|
||||
IIO_CHAN_INFO_PEAK,
|
||||
IIO_CHAN_INFO_PEAK_SCALE,
|
||||
IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW,
|
||||
IIO_CHAN_INFO_AVERAGE_RAW,
|
||||
IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY,
|
||||
IIO_CHAN_INFO_HIGH_PASS_FILTER_3DB_FREQUENCY,
|
||||
IIO_CHAN_INFO_SAMP_FREQ,
|
||||
IIO_CHAN_INFO_FREQUENCY,
|
||||
IIO_CHAN_INFO_PHASE,
|
||||
IIO_CHAN_INFO_HARDWAREGAIN,
|
||||
IIO_CHAN_INFO_HYSTERESIS,
|
||||
IIO_CHAN_INFO_INT_TIME,
|
||||
IIO_CHAN_INFO_ENABLE,
|
||||
IIO_CHAN_INFO_CALIBHEIGHT,
|
||||
IIO_CHAN_INFO_CALIBWEIGHT,
|
||||
IIO_CHAN_INFO_DEBOUNCE_COUNT,
|
||||
IIO_CHAN_INFO_DEBOUNCE_TIME,
|
||||
IIO_CHAN_INFO_CALIBEMISSIVITY,
|
||||
IIO_CHAN_INFO_OVERSAMPLING_RATIO,
|
||||
};
|
||||
|
||||
enum iio_shared_by {
|
||||
IIO_SEPARATE,
|
||||
IIO_SHARED_BY_TYPE,
|
||||
|
||||
@@ -34,4 +34,32 @@ enum iio_available_type {
|
||||
IIO_AVAIL_RANGE,
|
||||
};
|
||||
|
||||
enum iio_chan_info_enum {
|
||||
IIO_CHAN_INFO_RAW = 0,
|
||||
IIO_CHAN_INFO_PROCESSED,
|
||||
IIO_CHAN_INFO_SCALE,
|
||||
IIO_CHAN_INFO_OFFSET,
|
||||
IIO_CHAN_INFO_CALIBSCALE,
|
||||
IIO_CHAN_INFO_CALIBBIAS,
|
||||
IIO_CHAN_INFO_PEAK,
|
||||
IIO_CHAN_INFO_PEAK_SCALE,
|
||||
IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW,
|
||||
IIO_CHAN_INFO_AVERAGE_RAW,
|
||||
IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY,
|
||||
IIO_CHAN_INFO_HIGH_PASS_FILTER_3DB_FREQUENCY,
|
||||
IIO_CHAN_INFO_SAMP_FREQ,
|
||||
IIO_CHAN_INFO_FREQUENCY,
|
||||
IIO_CHAN_INFO_PHASE,
|
||||
IIO_CHAN_INFO_HARDWAREGAIN,
|
||||
IIO_CHAN_INFO_HYSTERESIS,
|
||||
IIO_CHAN_INFO_INT_TIME,
|
||||
IIO_CHAN_INFO_ENABLE,
|
||||
IIO_CHAN_INFO_CALIBHEIGHT,
|
||||
IIO_CHAN_INFO_CALIBWEIGHT,
|
||||
IIO_CHAN_INFO_DEBOUNCE_COUNT,
|
||||
IIO_CHAN_INFO_DEBOUNCE_TIME,
|
||||
IIO_CHAN_INFO_CALIBEMISSIVITY,
|
||||
IIO_CHAN_INFO_OVERSAMPLING_RATIO,
|
||||
};
|
||||
|
||||
#endif /* _IIO_TYPES_H_ */
|
||||
|
||||
Reference in New Issue
Block a user