/* For trigger consumers the current_trigger interface allows the trigger used by the device to be queried.  */
static ssize_t iio_trigger_read_current(struct device *dev, struct device_attribute *attr, char *buf)
/* For trigger consumers the current_trigger interface allows the trigger used by the device to be queried.  */
static ssize_t iio_trigger_read_current(struct device *dev, struct device_attribute *attr, char *buf)
{
	struct iio_dev *dev_info = dev_get_drvdata(dev);
	int len = 0;
	if (dev_info->trig)
		len = snprintf(buf,
			       IIO_TRIGGER_NAME_LENGTH,
			       "%s\n",
			       dev_info->trig->name);
	return len;
}