コード例 #1
0
static int ssp_preenable(struct iio_dev *indio_dev)
{
	int result;

	result = iio_sw_buffer_preenable(indio_dev);

	return result;
}
コード例 #2
0
ファイル: nuc970_nadc.c プロジェクト: vvinhe/NUC972
static int nuc970_ring_preenable(struct iio_dev *indio_dev)
{
	int ret;

	ret = iio_sw_buffer_preenable(indio_dev);
	if (ret < 0)
		return ret;
    
	return 0;
}
コード例 #3
0
static int ssp_preenable(struct iio_dev *indio_dev)
{
	int result;

	//result = inv_check_conflict_sysfs(indio_dev);
	//if (result)
	//	return result;
	result = iio_sw_buffer_preenable(indio_dev);

	return result;
}
コード例 #4
0
static int st_press_buffer_preenable(struct iio_dev *indio_dev)
{
	int err;

	err = st_sensors_set_enable(indio_dev, true);
	if (err < 0)
		goto st_press_set_enable_error;

	err = iio_sw_buffer_preenable(indio_dev);

st_press_set_enable_error:
	return err;
}
コード例 #5
0
ファイル: ad799x_ring.c プロジェクト: AllenWeb/linux
/**
 * ad799x_ring_preenable() setup the parameters of the ring before enabling
 *
 * The complex nature of the setting of the number of bytes per datum is due
 * to this driver currently ensuring that the timestamp is stored at an 8
 * byte boundary.
 **/
static int ad799x_ring_preenable(struct iio_dev *indio_dev)
{
	struct ad799x_state *st = iio_priv(indio_dev);
	/*
	 * Need to figure out the current mode based upon the requested
	 * scan mask in iio_dev
	 */

	if (st->id == ad7997 || st->id == ad7998)
		ad7997_8_set_scan_mode(st, *indio_dev->active_scan_mask);

	return iio_sw_buffer_preenable(indio_dev);
}
コード例 #6
0
/**
 * ade7758_ring_preenable() setup the parameters of the ring before enabling
 *
 * The complex nature of the setting of the number of bytes per datum is due
 * to this driver currently ensuring that the timestamp is stored at an 8
 * byte boundary.
 **/
static int ade7758_ring_preenable(struct iio_dev *indio_dev)
{
	unsigned channel;
	int ret;

	if (bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
		return -EINVAL;

	ret = iio_sw_buffer_preenable(indio_dev);
	if (ret < 0)
		return ret;

	channel = find_first_bit(indio_dev->active_scan_mask,
				 indio_dev->masklength);

	ade7758_write_waveform_type(&indio_dev->dev,
		indio_dev->channels[channel].address);

	return 0;
}