analogdevicesinc / linux

Linux kernel variant from Analog Devices; see README.md for details

Home Page:https://github.com/analogdevicesinc/linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ad_pulsar.c assumes all differential ADC channels are bipolar

dlech opened this issue · comments

Currently, the ad_pulsar.c driver assumes that all differential channels are bipolar and sets the IIO scan info as signed.

adc->channels[chan_index].scan_type.sign = 's';

However, half of the single-channel chips are pseudo-differential and use unsigned data, not signed.

On the multi-channel chips, bipolar or not is a programmable feature and therefore determined by the device tree description of how the channels are configured, but this should not be part of the device tree bindings for single channel chips since they are not configurable.

This is one of the differences that lead me to suggest #2312 as fixing this would be much more straightforward if we didn't have to account for both types of chips (configurable and not configurable) in the same driver.