Re: cs_change for SPI transfers

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

 



On 01/10/11 14:22, Manuel Stahl wrote:
> Hi,
> 
> I think there's an error in most IIO devices that use SPI transfers.
> 
> Haavard Skinnemoen wrote:
>> The normal behaviour is:
>>   * After all transfers except the last: CS stays active
>>   * After the last transfer: CS goes inactive
>>
>> The cs_change flag is used to invert this behaviour. So for the last
>> transfer, cs_change indicates that CS should stay active after the
>> transfer (though the driver may not actually be able to do so, e.g. if
>> the message is followed by a message to a different device.)
>>
> 
> The drivers in IIO set cs_change for all transfers (including the
> last in a message), which is not what we want. I can prepare a patch
> to correct this.

Yikes.

They win for completely counter intuitive interface... I guess I can see why
they did it like that (to make 0 the default behaviour).
Clearer naming would have been nice. cs_change_non_default or something...

Please do submit a patch set for this.

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