On 2014-06-20 20:01, H Hartley Sweeten wrote:
These static arrays are used to program the range regiser with the correct values to select the analog input range. The values in the arrays are incrememntal for the bipolar and unipolar ranges and have bit 4 set when the range is unipolar. Modify the (*attach) of the analog input subdevice to find the range adjustment needed when a unipolar range is selected. Use the adjusment value in setup_channel_list() when a unipolar range is selected. Remove the then unnecessary static arrays as well as the 'rangecode_ai' boardinfo. Add defines for the magic numbers used for the bits in the range register. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregk@xxxxxxxxxxxxxxxxxxx>
Not sure it's much of an improvement, tbh. Seems to need more code to achieve the same result.
-- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@xxxxxxxxx> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=- _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel