drivers/comedi/drivers/ni_routing/ni_route_values/ni_eseries.c

Source file repositories/reference/linux-study-clean/drivers/comedi/drivers/ni_routing/ni_route_values/ni_eseries.c

File Facts

System
Linux kernel
Corpus path
drivers/comedi/drivers/ni_routing/ni_route_values/ni_eseries.c
Extension
.c
Size
17931 bytes
Lines
602
Domain
Driver Families
Bucket
drivers/comedi
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0+
/*
 *  comedi/drivers/ni_routing/ni_route_values/ni_eseries.c
 *  Route information for NI_ESERIES boards.
 *
 *  COMEDI - Linux Control and Measurement Device Interface
 *  Copyright (C) 2016 Spencer E. Olson <olsonse@umich.edu>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 */

/*
 * This file includes a list of all the values of various signals routes
 * available on NI 660x hardware.  In many cases, one does not explicitly make
 * these routes, rather one might indicate that something is used as the source
 * of one particular trigger or another (using *_src=TRIG_EXT).
 *
 * The contents of this file can be generated using the tools in
 * comedi/drivers/ni_routing/tools.  This file also contains specific notes to
 * this family of devices.
 *
 * Please use those tools to help maintain the contents of this file, but be
 * mindful to not lose the notes already made in this file, since these notes
 * are critical to a complete undertsanding of the register values of this
 * family.
 */

#include "../ni_route_values.h"
#include "all.h"

/*
 * Note that for e-series devices, the backplane TRIGGER_LINE(6) is generally
 * not connected to RTSI(6).
 */

const struct family_route_values ni_eseries_route_values = {
	.family = "ni_eseries",
	.register_values = {
		/*
		 * destination = {
		 *              source          = register value,
		 *              ...
		 * }
		 */
		[B(NI_PFI(0))] = {
			[B(NI_AI_StartTrigger)]	= I(NI_PFI_OUTPUT_AI_START1),
		},
		[B(NI_PFI(1))] = {
			[B(NI_AI_ReferenceTrigger)]	= I(NI_PFI_OUTPUT_AI_START2),
		},
		[B(NI_PFI(2))] = {
			[B(NI_AI_ConvertClock)]	= I(NI_PFI_OUTPUT_AI_CONVERT),
		},
		[B(NI_PFI(3))] = {
			[B(NI_CtrSource(1))]	= I(NI_PFI_OUTPUT_G_SRC1),
		},
		[B(NI_PFI(4))] = {
			[B(NI_CtrGate(1))]	= I(NI_PFI_OUTPUT_G_GATE1),
		},
		[B(NI_PFI(5))] = {
			[B(NI_AO_SampleClock)]	= I(NI_PFI_OUTPUT_AO_UPDATE_N),
		},
		[B(NI_PFI(6))] = {
			[B(NI_AO_StartTrigger)]	= I(NI_PFI_OUTPUT_AO_START1),
		},
		[B(NI_PFI(7))] = {
			[B(NI_AI_SampleClock)]	= I(NI_PFI_OUTPUT_AI_START_PULSE),
		},
		[B(NI_PFI(8))] = {
			[B(NI_CtrSource(0))]	= I(NI_PFI_OUTPUT_G_SRC0),
		},
		[B(NI_PFI(9))] = {
			[B(NI_CtrGate(0))]	= I(NI_PFI_OUTPUT_G_GATE0),
		},
		[B(TRIGGER_LINE(0))] = {
			[B(NI_RTSI_BRD(0))]	= I(8),
			[B(NI_RTSI_BRD(1))]	= I(9),
			[B(NI_RTSI_BRD(2))]	= I(10),
			[B(NI_RTSI_BRD(3))]	= I(11),
			[B(NI_CtrSource(0))]	= I(5),
			[B(NI_CtrGate(0))]	= I(6),
			[B(NI_AI_StartTrigger)]	= I(0),

Annotation

Implementation Notes