mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 00:43:12 +00:00
Now that the SPDX tag is in all tty files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Jiri Slaby <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Stefan Wahren <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Ray Jui <[email protected]> Cc: Scott Branden <[email protected]> Cc: [email protected] Cc: "James E.J. Bottomley" <[email protected]> Cc: Helge Deller <[email protected]> Cc: Joachim Eastwood <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Tobias Klauser <[email protected]> Cc: Russell King <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Richard Genoud <[email protected]> Cc: Alexander Shiyan <[email protected]> Cc: Baruch Siach <[email protected]> Cc: Pat Gefre <[email protected]> Cc: "Guilherme G. Piccoli" <[email protected]> Cc: Jason Wessel <[email protected]> Cc: Vladimir Zapolskiy <[email protected]> Cc: Sylvain Lemieux <[email protected]> Cc: Carlo Caione <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Liviu Dudau <[email protected]> Cc: Sudeep Holla <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Andy Gross <[email protected]> Cc: David Brown <[email protected]> Cc: "Andreas Färber" <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Kevin Cernekee <[email protected]> Cc: Laxman Dewangan <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Jonathan Hunter <[email protected]> Cc: Barry Song <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: Maxime Coquelin <[email protected]> Cc: Alexandre Torgue <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Peter Korsgaard <[email protected]> Cc: Timur Tabi <[email protected]> Cc: Tony Prisk <[email protected]> Cc: Michal Simek <[email protected]> Cc: "Sören Brinkmann" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
116 lines
2.8 KiB
C
116 lines
2.8 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
/****************************************************************************
|
|
*
|
|
* Driver for the IFX spi modem.
|
|
*
|
|
* Copyright (C) 2009, 2010 Intel Corp
|
|
* Jim Stanley <[email protected]>
|
|
*
|
|
*****************************************************************************/
|
|
#ifndef _IFX6X60_H
|
|
#define _IFX6X60_H
|
|
|
|
#define DRVNAME "ifx6x60"
|
|
#define TTYNAME "ttyIFX"
|
|
|
|
#define IFX_SPI_MAX_MINORS 1
|
|
#define IFX_SPI_TRANSFER_SIZE 2048
|
|
#define IFX_SPI_FIFO_SIZE 4096
|
|
|
|
#define IFX_SPI_HEADER_OVERHEAD 4
|
|
#define IFX_RESET_TIMEOUT msecs_to_jiffies(50)
|
|
|
|
/* device flags bitfield definitions */
|
|
#define IFX_SPI_STATE_PRESENT 0
|
|
#define IFX_SPI_STATE_IO_IN_PROGRESS 1
|
|
#define IFX_SPI_STATE_IO_READY 2
|
|
#define IFX_SPI_STATE_TIMER_PENDING 3
|
|
#define IFX_SPI_STATE_IO_AVAILABLE 4
|
|
|
|
/* flow control bitfields */
|
|
#define IFX_SPI_DCD 0
|
|
#define IFX_SPI_CTS 1
|
|
#define IFX_SPI_DSR 2
|
|
#define IFX_SPI_RI 3
|
|
#define IFX_SPI_DTR 4
|
|
#define IFX_SPI_RTS 5
|
|
#define IFX_SPI_TX_FC 6
|
|
#define IFX_SPI_RX_FC 7
|
|
#define IFX_SPI_UPDATE 8
|
|
|
|
#define IFX_SPI_PAYLOAD_SIZE (IFX_SPI_TRANSFER_SIZE - \
|
|
IFX_SPI_HEADER_OVERHEAD)
|
|
|
|
#define IFX_SPI_IRQ_TYPE DETECT_EDGE_RISING
|
|
#define IFX_SPI_GPIO_TARGET 0
|
|
#define IFX_SPI_GPIO0 0x105
|
|
|
|
#define IFX_SPI_STATUS_TIMEOUT (2000*HZ)
|
|
|
|
/* values for bits in power status byte */
|
|
#define IFX_SPI_POWER_DATA_PENDING 1
|
|
#define IFX_SPI_POWER_SRDY 2
|
|
|
|
struct ifx_spi_device {
|
|
/* Our SPI device */
|
|
struct spi_device *spi_dev;
|
|
|
|
/* Port specific data */
|
|
struct kfifo tx_fifo;
|
|
spinlock_t fifo_lock;
|
|
unsigned long signal_state;
|
|
|
|
/* TTY Layer logic */
|
|
struct tty_port tty_port;
|
|
struct device *tty_dev;
|
|
int minor;
|
|
|
|
/* Low level I/O work */
|
|
struct tasklet_struct io_work_tasklet;
|
|
unsigned long flags;
|
|
dma_addr_t rx_dma;
|
|
dma_addr_t tx_dma;
|
|
|
|
int modem; /* Modem type */
|
|
int use_dma; /* provide dma-able addrs in SPI msg */
|
|
long max_hz; /* max SPI frequency */
|
|
|
|
spinlock_t write_lock;
|
|
int write_pending;
|
|
spinlock_t power_lock;
|
|
unsigned char power_status;
|
|
|
|
unsigned char *rx_buffer;
|
|
unsigned char *tx_buffer;
|
|
dma_addr_t rx_bus;
|
|
dma_addr_t tx_bus;
|
|
unsigned char spi_more;
|
|
unsigned char spi_slave_cts;
|
|
|
|
struct timer_list spi_timer;
|
|
|
|
struct spi_message spi_msg;
|
|
struct spi_transfer spi_xfer;
|
|
|
|
struct {
|
|
/* gpio lines */
|
|
unsigned short srdy; /* slave-ready gpio */
|
|
unsigned short mrdy; /* master-ready gpio */
|
|
unsigned short reset; /* modem-reset gpio */
|
|
unsigned short po; /* modem-on gpio */
|
|
unsigned short reset_out; /* modem-in-reset gpio */
|
|
/* state/stats */
|
|
int unack_srdy_int_nb;
|
|
} gpio;
|
|
|
|
/* modem reset */
|
|
unsigned long mdm_reset_state;
|
|
#define MR_START 0
|
|
#define MR_INPROGRESS 1
|
|
#define MR_COMPLETE 2
|
|
wait_queue_head_t mdm_reset_wait;
|
|
void (*swap_buf)(unsigned char *buf, int len, void *end);
|
|
};
|
|
|
|
#endif /* _IFX6X60_H */
|