Re: [PATCH 2/2] staging:iio:dac: Add AD5421 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/26/2011 07:04 PM, Jonathan Cameron wrote:
> On 10/26/11 13:01, Lars-Peter Clausen wrote:
>> [...]
>> +
>> +static const struct iio_chan_spec ad5421_channels[] = {
>> +	{
>> +		.type = IIO_CURRENT,
>> +		.indexed = 1,
>> +		.output = 1,
>> +		.channel = 0,
>> +		.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT |
>> +			IIO_CHAN_INFO_OFFSET_SHARED_BIT |
>> +			IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT |
>> +			IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT,
>> +		.scan_type = IIO_ST('u', 16, 16, 0),
>> +		.event_mask = IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING) |
>> +			IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_FALLING),
>> +	},
>> +	{
> Wasn't the plan to have this set to channel -1 to avoid it appearing?
> If that doesn't work we should probably make it do so.  At a quick glance
> I can't see why it wouldn't...

hehe, that was what the hunk at bottom was about. If the binary
representation of channel is greater than 0xffff it will overwrite other
fields. I'll resend with a proper fix included in the series.

>> +		.type = IIO_TEMP,
>> +		.channel = 1,
>> +		.event_mask = IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING),
>> +	},
>> +};
>> +


--
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


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux