/* This is all read from chip specific data in the driver. Not all of the sca3000 series support modes other than normal.  */
static ssize_t sca3000_show_available_measurement_modes(struct device *dev, struct device_attribute *attr, char *buf)
/* This is all read from chip specific data in the driver. Not all of the sca3000 series support modes other than normal.  */
static ssize_t sca3000_show_available_measurement_modes(struct device *dev, struct device_attribute *attr, char *buf)
{
	struct iio_dev *dev_info = dev_get_drvdata(dev);
	struct sca3000_state *st = dev_info->dev_data;
	int len = 0;
	len += sprintf(buf + len, "0 - normal mode");
	switch (st->info->option_mode_1) {
	case SCA3000_OP_MODE_NARROW:
		len += sprintf(buf + len, ", 1 - narrow mode");
		break;
	case SCA3000_OP_MODE_BYPASS:
		len += sprintf(buf + len, ", 1 - bypass mode");
		break;
	};
	switch (st->info->option_mode_2) {
	case SCA3000_OP_MODE_WIDE:
		len += sprintf(buf + len, ", 2 - wide mode");
		break;
	}
	len += sprintf(buf + len, " 3 - motion detection \n");
	return len;
}