[PATCH 07/13] staging: comedi: ni_mio_common: implement global pfi,rtsi routing
Ian Abbott
abbotti at mev.co.uk
Wed Sep 26 09:23:45 UTC 2018
On 26/09/18 00:35, Spencer Olson wrote:
> On Tue, Sep 25, 2018 at 4:27 AM Ian Abbott <abbotti at mev.co.uk> wrote:
>>
>> 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 at umich.edu>
>>> ---
>>> .../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?
>
> After looking at this patch, it looks like this is based on my earlier
> patch that you "stamped" reviewed. The patch was titled: "staging:
> comedi: ni_mio_common: protect register write overflow". Probably
> should have included that one in this patch set or waited for more
> time between--oh well. Any suggestion on how to handle this?
Yes, I'd forgotten about that at the time and came to the same
conclusion. It's probably not worth worrying about, as the other patch
will hopefully have been applied by Greg before you submit your next
round of patches. But if you send more than one patch series with some
dependency between them, you can note it in the patch series
introductory message, and preferably add a note after the "scissors"
line of the dependent patch.
--
-=( Ian Abbott <abbotti at mev.co.uk> || 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. )=-
More information about the devel
mailing list