From: H Hartley Sweeten Date: Mon, 23 Feb 2015 21:57:50 +0000 (-0700) Subject: staging: comedi: me4000: convert driver to use the comedi_8254 module X-Git-Tag: omap-for-v4.1/fixes-rc1~165^2~138^2~729 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d92d39d9bde805e7d237de534d8a7a3cc4b10ef1;p=pandora-kernel.git staging: comedi: me4000: convert driver to use the comedi_8254 module Some of the hardware supported by this driver include an 8254 timer. For aesthetics, convert it to use the comedi_8254 module to provide support for the 8254 timer. This also fixes the (*insn_read) and (*insn_write) to work like the comedi API expects. Currently they only read or write a single value. It also fixes the (*insn_config). Currently the driver is attempting to handle the configuration instructions GPCT_RESET and GPCT_SET_OPERATION. These are just arbitrary valuse and are not real comedi configuration_ids. They actually coorespond to: GPCT_RESET -> INSN_CONFIG_DIO_OUTPUT GPCT_SET_OPERATION -> INSN_CONFIG_ANALOG_TRIG The number of parameters for the instructions is validated by the comedi core in check_insn_config_length(). GPCT_RESET happens to work (insn->n == 1) but GPCT_SET_OPERATION would fail. The INSN_CONFIG_ANALOG_TRIG expects insn->n == 5 but GPCT_SET_OPERATION in this driver expects insn->n == 2. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed