1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /** 3 * ipoctal.h 4 * 5 * driver for the IPOCTAL boards 6 7 * Copyright (C) 2009-2012 CERN (www.cern.ch) 8 * Author: Nicolas Serafini, EIC2 SA 9 * Author: Samuel Iglesias Gonsalvez <siglesias@igalia.com> 10 */ 11 12 #ifndef _IPOCTAL_H_ 13 #define _IPOCTAL_H_ 14 15 #define NR_CHANNELS 8 16 #define IPOCTAL_MAX_BOARDS 16 17 #define MAX_DEVICES (NR_CHANNELS * IPOCTAL_MAX_BOARDS) 18 #define RELEVANT_IFLAG(iflag) ((iflag) & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) 19 20 /** 21 * struct ipoctal_stats -- Stats since last reset 22 * 23 * @tx: Number of transmitted bytes 24 * @rx: Number of received bytes 25 * @overrun: Number of overrun errors 26 * @parity_err: Number of parity errors 27 * @framing_err: Number of framing errors 28 * @rcv_break: Number of break received 29 */ 30 struct ipoctal_stats { 31 unsigned long tx; 32 unsigned long rx; 33 unsigned long overrun_err; 34 unsigned long parity_err; 35 unsigned long framing_err; 36 unsigned long rcv_break; 37 }; 38 39 #endif /* _IPOCTAL_H_ */ 40