On 01/04/2012 09:36 AM, Duss Pirmin wrote: >>> +static struct attribute *ads1110_attributes[] = { >>> + &iio_const_attr_sampling_frequency_available.dev_attr.attr, >>> + &iio_dev_attr_sampling_frequency.dev_attr.attr, >>> + &iio_dev_attr_scale_available.dev_attr.attr, >>> + &iio_dev_attr_scale.dev_attr.attr, >> scale wants to be done via infomask element of the iio_chan_spec and >> relevant element of a switch statement in read raw. That way it will >> be available via the inkernel interfaces (once we pin down exactly >> how they will be registered - another discussion entirely...) > > Here I need some help. > I looked at the ad7793 driver how to do this. If I understand it right, this > driver also has the possibility to change the scale. > I changed read_raw and added write_raw to the ads1110 driver. When I test > the driver on my hardware I'm not able to set the gain, there is no sysfs > attribute for it (on the board runs a 3.1 kernel with a backprot of the > driver). Hi, You need to set the IIO_CHAN_INFO_SCALE_SHARED_BIT in your channels info_mask attribute in the channel spec. - Lars -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html