Re: [PATCH 06/17] staging: comedi: ni_65xx: remove 'invert_outputs' from boardinfo

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

 



On 2014-06-20 19:52, H Hartley Sweeten wrote:
Im not sure what was intended with this boardinfo.

It appears to be trying to handle the sink/source output type of the
boards supported by the driver. But, some of the boardinfo does not
match the actual hardware descriptions in the manual. The manual also
does not mention anything about the port setting vs. the actual output
level.

Also, the (*auto_attach) is a bit goofy. If the boardinfo indicates
to 'invert_outputs' only the first channel of the port is set.

Simplify the driver a bit by just removing this boardinfo. The values
written to the "ports" will then be what is passed to comedi by the
user and values returned to the user will be the value in the "ports".

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregk@xxxxxxxxxxxxxxxxxxx>

I've been pondering the best way to handle this. Although the 'invert_outputs' is wrong, it's been wrong for years and people have worked around it in userspace code. Now suddenly their outputs are no longer inverted after updating the kernel.

I was thinking of adding a module parameter to decide whether to honour the 'invert_outputs' for those boards that set it, with the default being to do the right thing (ignoring the 'invert_outputs' bit).

In any case, the auto_attach ought to set all the outputs to the same value to match the internal state.

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




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux