Re: [PATCH 07/13] staging: comedi: ni_mio_common: implement global pfi,rtsi routing

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

 



On 19/09/18 17:38, Spencer E. Olson wrote:
Implement device-global config interface for ni_mio devices.  In
particular, this patch implements:
INSN_DEVICE_CONFIG_TEST_ROUTE,
INSN_DEVICE_CONFIG_CONNECT_ROUTE,
INSN_DEVICE_CONFIG_DISCONNECT_ROUTE,
INSN_DEVICE_CONFIG_GET_ROUTES
for the ni mio devices.  This means that the new abstracted signal/terminal
names can be used to define signal routing with regards to the PFI
terminals and RTSI trigger bus lines.

This also adds ability to identify PFI and RTSI channels on the PFI and
RTSI subdevices using the new device-global names.  This does not change
the values that are set for channel output selections using the subdevice
interfaces--these still require direct register values.

Annotates and updates tables of register values to reflect this new
implementation status.

Signed-off-by: Spencer E. Olson <olsonse@xxxxxxxxx>
---
  .../staging/comedi/drivers/ni_mio_common.c    | 687 ++++++++++++++++--
  drivers/staging/comedi/drivers/ni_stc.h       |  68 ++
  2 files changed, 683 insertions(+), 72 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index b033f0be9b8a..c42d480df7ff 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c

In trying an experimental application of your patches to "staging-next" (to examine the code more carefully), this (PATCH 07/13) failed to apply with "git am". When applying the failed patch manually with "patch -p1", there was one failed hunk (see below).

@@ -5040,13 +5077,17 @@ static unsigned int ni_get_rtsi_routing(struct comedi_device *dev,
  {
  	struct ni_private *devpriv = dev->private;
+ if (chan >= TRIGGER_LINE(0))
+		/* allow new and old names of rtsi channels to work. */
+		chan -= TRIGGER_LINE(0);
+
  	if (chan < 4) {
  		return NISTC_RTSI_TRIG_TO_SRC(chan,
  					      devpriv->rtsi_trig_a_output_reg);
  	} else if (chan < NISTC_RTSI_TRIG_NUM_CHAN(devpriv->is_m_series)) {
  		return NISTC_RTSI_TRIG_TO_SRC(chan,
  					      devpriv->rtsi_trig_b_output_reg);
-	} else if (chan == NISTC_RTSI_TRIG_OLD_CLK_CHAN)
+	} else if (chan == NISTC_RTSI_TRIG_OLD_CLK_CHAN) {
  		return NI_RTSI_OUTPUT_RTSI_OSC;
  	}

That is the hunk that failed to apply. The line numbers seem a bit off the original source, and the "} else if" part at the end didn't match at all.

Perhaps you need to rebase?

--
-=( Ian Abbott <abbotti@xxxxxxxxx> || Web: www.mev.co.uk )=-
-=( MEV Ltd. is a company registered in England & Wales. )=-
-=( Registered number: 02862268.  Registered address:    )=-
-=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-
_______________________________________________
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