| /linux/drivers/usb/typec/tcpm/ |
| H A D | tcpm.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright 2015-2017 Google, Inc 213 VDM_STATE_ERR_BUSY = -3, 214 VDM_STATE_ERR_SEND = -2, 215 VDM_STATE_ERR_TMOUT = -1, 244 * Based on "Table 6-14 Fixed Supply PDO - Sink" of "USB Power Delivery Specification Revision 3.0, 284 * @min_volt: Actual min voltage at the local port 285 * @req_min_volt: Requested min voltage to the port partner 286 * @max_volt: Actual max voltage at the local port 287 * @req_max_volt: Requested max voltage to the port partner [all …]
|
| /linux/drivers/usb/host/ |
| H A D | xhci-dbgtty.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * xhci-dbgtty.c - tty glue for xHCI debug capability 16 #include "xhci-dbgcap.h" 24 return dbc->priv; in dbc_to_port() 28 dbc_kfifo_to_req(struct dbc_port *port, char *packet) in dbc_kfifo_to_req() argument 32 len = kfifo_len(&port->port.xmit_fifo); in dbc_kfifo_to_req() 39 if (port->tx_boundary) in dbc_kfifo_to_req() 40 len = min(port->tx_boundary, len); in dbc_kfifo_to_req() 42 len = kfifo_out(&port->port.xmit_fifo, packet, len); in dbc_kfifo_to_req() 44 if (port->tx_boundary) in dbc_kfifo_to_req() [all …]
|
| /linux/drivers/scsi/libsas/ |
| H A D | sas_port.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Serial Attached SCSI (SAS) Port class 15 static bool phy_is_wideport_member(struct asd_sas_port *port, struct asd_sas_phy *phy) in phy_is_wideport_member() argument 17 struct sas_ha_struct *sas_ha = phy->ha; in phy_is_wideport_member() 19 if (memcmp(port->attached_sas_addr, phy->attached_sas_addr, in phy_is_wideport_member() 20 SAS_ADDR_SIZE) != 0 || (sas_ha->strict_wide_ports && in phy_is_wideport_member() 21 memcmp(port->sas_addr, phy->sas_addr, SAS_ADDR_SIZE) != 0)) in phy_is_wideport_member() 29 struct asd_sas_port *port = phy->port; in sas_resume_port() local 30 struct sas_ha_struct *sas_ha = phy->ha; in sas_resume_port() 31 struct sas_internal *si = to_sas_internal(sas_ha->shost->transportt); in sas_resume_port() [all …]
|
| /linux/drivers/char/ |
| H A D | virtio_console.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 28 #include <linux/dma-mapping.h> 44 /* Used for exporting per-port information to debugfs */ 57 .name = "virtio-ports", 68 /* The hvc device associated with this console port */ 114 * This is a per-device struct that stores data common to all the 115 * ports for that device (vdev->priv). 145 * guest->host transfers, one for host->guest transfers 150 * A control packet buffer for guest->host requests, protected 155 /* Array of per-port IO virtqueues */ [all …]
|
| /linux/drivers/tty/serial/ |
| H A D | milbeaut_usio.c | 1 // SPDX-License-Identifier: GPL-2.0 15 #define USIO_NAME "mlb-usio-uart" 65 static void mlb_usio_stop_tx(struct uart_port *port) in mlb_usio_stop_tx() argument 67 writew(readw(port->membase + MLB_USIO_REG_FCR) & ~MLB_USIO_FCR_FTIE, in mlb_usio_stop_tx() 68 port->membase + MLB_USIO_REG_FCR); in mlb_usio_stop_tx() 69 writeb(readb(port->membase + MLB_USIO_REG_SCR) & ~MLB_USIO_SCR_TBIE, in mlb_usio_stop_tx() 70 port->membase + MLB_USIO_REG_SCR); in mlb_usio_stop_tx() 73 static void mlb_usio_tx_chars(struct uart_port *port) in mlb_usio_tx_chars() argument 75 struct tty_port *tport = &port->state->port; in mlb_usio_tx_chars() 78 writew(readw(port->membase + MLB_USIO_REG_FCR) & ~MLB_USIO_FCR_FTIE, in mlb_usio_tx_chars() [all …]
|
| H A D | timbuart.c | 1 // SPDX-License-Identifier: GPL-2.0 25 struct uart_port port; member 35 static void timbuart_mctrl_check(struct uart_port *port, u32 isr, u32 *ier); 39 static void timbuart_stop_rx(struct uart_port *port) in timbuart_stop_rx() argument 42 u32 ier = ioread32(port->membase + TIMBUART_IER) & ~RXFLAGS; in timbuart_stop_rx() 43 iowrite32(ier, port->membase + TIMBUART_IER); in timbuart_stop_rx() 46 static void timbuart_stop_tx(struct uart_port *port) in timbuart_stop_tx() argument 49 u32 ier = ioread32(port->membase + TIMBUART_IER) & ~TXBAE; in timbuart_stop_tx() 50 iowrite32(ier, port->membase + TIMBUART_IER); in timbuart_stop_tx() 53 static void timbuart_start_tx(struct uart_port *port) in timbuart_start_tx() argument [all …]
|
| H A D | meson_uart.c | 1 // SPDX-License-Identifier: GPL-2.0 89 static void meson_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) in meson_uart_set_mctrl() argument 93 static unsigned int meson_uart_get_mctrl(struct uart_port *port) in meson_uart_get_mctrl() argument 98 static unsigned int meson_uart_tx_empty(struct uart_port *port) in meson_uart_tx_empty() argument 102 val = readl(port->membase + AML_UART_STATUS); in meson_uart_tx_empty() 107 static void meson_uart_stop_tx(struct uart_port *port) in meson_uart_stop_tx() argument 111 val = readl(port->membase + AML_UART_CONTROL); in meson_uart_stop_tx() 113 writel(val, port->membase + AML_UART_CONTROL); in meson_uart_stop_tx() 116 static void meson_uart_stop_rx(struct uart_port *port) in meson_uart_stop_rx() argument 120 val = readl(port->membase + AML_UART_CONTROL); in meson_uart_stop_rx() [all …]
|
| H A D | bcm63xx_uart.c | 1 // SPDX-License-Identifier: GPL-2.0 37 * - rx fifo full 38 * - rx fifo above threshold 39 * - rx fifo not empty for too long 53 * - tx fifo empty 54 * - tx fifo below threshold 73 static inline unsigned int bcm_uart_readl(struct uart_port *port, in bcm_uart_readl() argument 76 return __raw_readl(port->membase + offset); in bcm_uart_readl() 79 static inline void bcm_uart_writel(struct uart_port *port, in bcm_uart_writel() argument 82 __raw_writel(value, port->membase + offset); in bcm_uart_writel() [all …]
|
| H A D | altera_uart.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * altera_uart.c -- Altera UART driver 5 * Based on mcf.c -- Freescale ColdFire UART driver 7 * (C) Copyright 2003-2007, Greg Ungerer <gerg@snapgear.com> 53 #define ALTERA_UART_STATUS_DCTS_MSK 0x0400 /* CTS logic-level change */ 74 * Local per-uart structure. 77 struct uart_port port; member 83 static u32 altera_uart_readl(struct uart_port *port, int reg) in altera_uart_readl() argument 85 return readl(port->membase + (reg << port->regshift)); in altera_uart_readl() 88 static void altera_uart_writel(struct uart_port *port, u32 dat, int reg) in altera_uart_writel() argument [all …]
|
| H A D | sprd_serial.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2012-2015 Spreadtrum Communications Inc. 10 #include <linux/dma-mapping.h> 11 #include <linux/dma/sprd-dma.h> 131 struct uart_port port; member 144 static int sprd_start_dma_rx(struct uart_port *port); 145 static int sprd_tx_dma_config(struct uart_port *port); 159 static inline unsigned int serial_in(struct uart_port *port, in serial_in() argument 162 return readl_relaxed(port->membase + offset); in serial_in() 165 static inline void serial_out(struct uart_port *port, unsigned int offset, in serial_out() argument [all …]
|
| H A D | rda-uart.c | 1 // SPDX-License-Identifier: GPL-2.0+ 117 struct uart_port port; member 121 #define to_rda_uart_port(port) container_of(port, struct rda_uart_port, port) argument 125 static inline void rda_uart_write(struct uart_port *port, u32 val, in rda_uart_write() argument 128 writel(val, port->membase + off); in rda_uart_write() 131 static inline u32 rda_uart_read(struct uart_port *port, unsigned int off) in rda_uart_read() argument 133 return readl(port->membase + off); in rda_uart_read() 136 static unsigned int rda_uart_tx_empty(struct uart_port *port) in rda_uart_tx_empty() argument 142 uart_port_lock_irqsave(port, &flags); in rda_uart_tx_empty() 144 val = rda_uart_read(port, RDA_UART_STATUS); in rda_uart_tx_empty() [all …]
|
| H A D | esp32_acm.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 17 #define DRIVER_NAME "esp32s3-acm" 41 .compatible = "esp,esp32s3-acm", 48 static void esp32s3_acm_write(struct uart_port *port, unsigned long reg, u32 v) in esp32s3_acm_write() argument 50 writel(v, port->membase + reg); in esp32s3_acm_write() 53 static u32 esp32s3_acm_read(struct uart_port *port, unsigned long reg) in esp32s3_acm_read() argument 55 return readl(port->membase + reg); in esp32s3_acm_read() 58 static u32 esp32s3_acm_tx_fifo_free(struct uart_port *port) in esp32s3_acm_tx_fifo_free() argument 60 u32 status = esp32s3_acm_read(port, USB_SERIAL_JTAG_EP1_CONF_REG); in esp32s3_acm_tx_fifo_free() 65 static u32 esp32s3_acm_tx_fifo_cnt(struct uart_port *port) in esp32s3_acm_tx_fifo_cnt() argument [all …]
|
| H A D | atmel_serial.c | 1 // SPDX-License-Identifier: GPL-2.0+ 18 #include <linux/clk-provider.h> 24 #include <linux/dma-mapping.h> 40 /* Revisit: We should calculate this based on the actual port settings */ 57 static void atmel_start_rx(struct uart_port *port); 58 static void atmel_stop_rx(struct uart_port *port); 62 /* Use device name ttyAT, major 204 and minor 154-169. This is necessary if we 71 /* Use device name ttyS, major 4, minor 64-68. This is the usual serial port 104 * at91: 6 USARTs and one DBGU port (SAM9260) 110 * We wrap our port structure around the generic uart_port. [all …]
|
| H A D | esp32_uart.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 #define DRIVER_NAME "esp32-uart" 93 struct uart_port port; member 128 .compatible = "esp,esp32-uart", 131 .compatible = "esp,esp32s3-uart", 139 static const struct esp32_uart_variant *port_variant(struct uart_port *port) in port_variant() argument 141 return port->private_data; in port_variant() 144 static void esp32_uart_write(struct uart_port *port, unsigned long reg, u32 v) in esp32_uart_write() argument 146 writel(v, port->membase + reg); in esp32_uart_write() 149 static u32 esp32_uart_read(struct uart_port *port, unsigned long reg) in esp32_uart_read() argument [all …]
|
| H A D | liteuart.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2019-2020 Antmicro <www.antmicro.com> 25 * The definitions below are true for LiteX SoC configured for 8-bit CSR Bus, 26 * 32-bit aligned. 46 struct uart_port port; member 51 #define to_liteuart_port(port) container_of(port, struct liteuart_port, port) argument 71 static void liteuart_update_irq_reg(struct uart_port *port, bool set, u8 mask) in liteuart_update_irq_reg() argument 73 struct liteuart_port *uart = to_liteuart_port(port); in liteuart_update_irq_reg() 76 uart->irq_reg |= mask; in liteuart_update_irq_reg() 78 uart->irq_reg &= ~mask; in liteuart_update_irq_reg() [all …]
|
| H A D | digicolor-usart.c | 1 // SPDX-License-Identifier: GPL-2.0+ 77 struct uart_port port; member 83 static bool digicolor_uart_tx_full(struct uart_port *port) in digicolor_uart_tx_full() argument 85 return !!(readb_relaxed(port->membase + UA_STATUS_FIFO) & in digicolor_uart_tx_full() 89 static bool digicolor_uart_rx_empty(struct uart_port *port) in digicolor_uart_rx_empty() argument 91 return !!(readb_relaxed(port->membase + UA_STATUS_FIFO) & in digicolor_uart_rx_empty() 95 static void digicolor_uart_stop_tx(struct uart_port *port) in digicolor_uart_stop_tx() argument 97 u8 int_enable = readb_relaxed(port->membase + UA_INT_ENABLE); in digicolor_uart_stop_tx() 100 writeb_relaxed(int_enable, port->membase + UA_INT_ENABLE); in digicolor_uart_stop_tx() 103 static void digicolor_uart_start_tx(struct uart_port *port) in digicolor_uart_start_tx() argument [all …]
|
| H A D | lpc32xx_hs.c | 1 // SPDX-License-Identifier: GPL-2.0+ 28 #include <linux/soc/nxp/lpc32xx-misc.h> 88 struct uart_port port; member 97 static void wait_for_xmit_empty(struct uart_port *port) in wait_for_xmit_empty() argument 103 port->membase))) == 0) in wait_for_xmit_empty() 105 if (--timeout == 0) in wait_for_xmit_empty() 111 static void wait_for_xmit_ready(struct uart_port *port) in wait_for_xmit_ready() argument 117 port->membase))) < 32) in wait_for_xmit_ready() 119 if (--timeout == 0) in wait_for_xmit_ready() 125 static void lpc32xx_hsuart_console_putchar(struct uart_port *port, unsigned char ch) in lpc32xx_hsuart_console_putchar() argument [all …]
|
| /linux/drivers/usb/gadget/function/ |
| H A D | u_serial.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * u_serial.c - utilities for USB gadget "serial port"/TTY support 10 * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com) 39 * "serial port" functionality through the USB gadget stack. Each such 40 * port is exposed through a /dev/ttyGS* node. 42 * After this module has been loaded, the individual TTY port can be requested 46 * host issues a config change event. Data can only flow when the port is 49 * A given TTY port can be made available in multiple configurations. 56 * Configurations may expose more than one TTY port. For example, if 67 * gserial <---> gs_port ... links will be null when the USB link is [all …]
|
| /linux/drivers/scsi/bfa/ |
| H A D | bfa_port.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc. 4 * Copyright (c) 2014- QLogic Corporation. 8 * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter. 18 BFA_TRC_FILE(CNA, PORT); 21 bfa_port_stats_swap(struct bfa_port_s *port, union bfa_port_stats_u *stats) in bfa_port_stats_swap() argument 45 * @param[in] port - Pointer to the port module 46 * status - Return status from the f/w 51 bfa_port_enable_isr(struct bfa_port_s *port, bfa_status_t status) in bfa_port_enable_isr() argument 53 bfa_trc(port, status); in bfa_port_enable_isr() [all …]
|
| /linux/drivers/usb/serial/ |
| H A D | generic.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2010 - 2013 Johan Hovold (jhovold@gmail.com) 6 * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com) 40 struct device *dev = &serial->interface->dev; in usb_serial_generic_probe() 42 dev_info(dev, "The \"generic\" usb-serial driver is only for testing and one-off prototypes.\n"); in usb_serial_generic_probe() 43 dev_info(dev, "Tell linux-usb@vger.kernel.org to add your device to a proper driver.\n"); in usb_serial_generic_probe() 51 struct device *dev = &serial->interface->dev; in usb_serial_generic_calc_num_ports() 54 num_ports = max(epds->num_bulk_in, epds->num_bulk_out); in usb_serial_generic_calc_num_ports() 58 return -ENODEV; in usb_serial_generic_calc_num_ports() 105 int usb_serial_generic_open(struct tty_struct *tty, struct usb_serial_port *port) in usb_serial_generic_open() argument [all …]
|
| /linux/drivers/tty/ |
| H A D | vcc.c | 1 // SPDX-License-Identifier: GPL-2.0 46 /* Microseconds that thread will delay waiting for a vcc port ref */ 53 #define VCC_CTL_BREAK -1 54 #define VCC_CTL_HUP -2 108 * vcc_table_add() - Add VCC port to the VCC table 109 * @port: pointer to the VCC port 111 * Return: index of the port in the VCC table on success, 112 * -1 on failure 114 static int vcc_table_add(struct vcc_port *port) in vcc_table_add() argument 122 vcc_table[i] = port; in vcc_table_add() [all …]
|
| /linux/drivers/net/wan/ |
| H A D | hd64572.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Hitachi (now Renesas) SCA-II HD64572 driver for Linux 5 * Copyright (C) 1998-2008 Krzysztof Halasa <khc@pm.waw.pl> 7 * Source of information: HD64572 SCA-II User's Manual 11 * Packet buffer descriptor rings - starting from card->rambase: 17 * Packet data buffers - starting from card->rambase + buff_offset: 44 #define get_msci(port) ((port)->chan ? MSCI1_OFFSET : MSCI0_OFFSET) argument 45 #define get_dmac_rx(port) ((port)->chan ? DMAC1RX_OFFSET : DMAC0RX_OFFSET) argument 46 #define get_dmac_tx(port) ((port)->chan ? DMAC1TX_OFFSET : DMAC0TX_OFFSET) argument 48 #define sca_in(reg, card) readb((card)->scabase + (reg)) [all …]
|
| /linux/drivers/pci/controller/ |
| H A D | pcie-xilinx-dma-pl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/irqchip/irq-msi-lib.h> 19 #include "pcie-xilinx-common.h" 62 /* Root Port Error Register definitions */ 67 /* Root Port Interrupt Register definitions */ 70 /* Root Port Status/control Register definitions */ 86 * struct xilinx_pl_dma_variant - PL DMA PCIe variant information 102 * struct pl_dma_pcie - PCIe port information 133 static inline u32 pcie_read(struct pl_dma_pcie *port, u32 reg) in pcie_read() argument 135 if (port->variant->version == QDMA) in pcie_read() [all …]
|
| /linux/drivers/media/pci/smipcie/ |
| H A D | smipcie-main.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 /* set port mux.*/ in smi_hw_init() 32 /* Port A */ in smi_hw_init() 40 /* Port B */ in smi_hw_init() 184 i2c_set_adapdata(&dev->i2c_bus[0], dev); in smi_i2c_init() 185 strscpy(dev->i2c_bus[0].name, "SMI-I2C0", sizeof(dev->i2c_bus[0].name)); in smi_i2c_init() 186 dev->i2c_bus[0].owner = THIS_MODULE; in smi_i2c_init() 187 dev->i2c_bus[0].dev.parent = &dev->pci_dev->dev; in smi_i2c_init() 188 dev->i2c_bus[0].algo_data = &dev->i2c_bit[0]; in smi_i2c_init() 189 dev->i2c_bit[0].data = dev; in smi_i2c_init() [all …]
|
| /linux/sound/core/seq/ |
| H A D | seq_ports.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 24 NOTE: the current implementation of the port structure as a linked list is 26 subscribers of a port we first need to find the address of the port 36 dynamicly kmalloced. When a port is added or deleted we can simply allocate 43 /* return pointer to port structur 47 struct snd_seq_client_port *port; snd_seq_port_use_ptr() local 69 struct snd_seq_client_port *port, *found; snd_seq_port_query_nearest() local 114 snd_seq_create_port(struct snd_seq_client * client,int port,struct snd_seq_client_port ** port_ret) snd_seq_create_port() argument 213 clear_subscriber_list(struct snd_seq_client * client,struct snd_seq_client_port * port,struct snd_seq_port_subs_info * grp,int is_src) clear_subscriber_list() argument 251 port_delete(struct snd_seq_client * client,struct snd_seq_client_port * port) port_delete() argument 273 snd_seq_delete_port(struct snd_seq_client * client,int port) snd_seq_delete_port() argument 299 struct snd_seq_client_port *port, *tmp; snd_seq_delete_all_ports() local 325 snd_seq_set_port_info(struct snd_seq_client_port * port,struct snd_seq_port_info * info) snd_seq_set_port_info() argument 371 snd_seq_get_port_info(struct snd_seq_client_port * port,struct snd_seq_port_info * info) snd_seq_get_port_info() argument 427 subscribe_port(struct snd_seq_client * client,struct snd_seq_client_port * port,struct snd_seq_port_subs_info * grp,struct snd_seq_port_subscribe * info,int send_ack) subscribe_port() argument 452 unsubscribe_port(struct snd_seq_client * client,struct snd_seq_client_port * port,struct snd_seq_port_subs_info * grp,struct snd_seq_port_subscribe * info,int send_ack) unsubscribe_port() argument 495 check_and_subscribe_port(struct snd_seq_client * client,struct snd_seq_client_port * port,struct snd_seq_subscribers * subs,bool is_src,bool exclusive,bool ack) check_and_subscribe_port() argument 540 __delete_and_unsubscribe_port(struct snd_seq_client * client,struct snd_seq_client_port * port,struct snd_seq_subscribers * subs,bool is_src,bool ack) __delete_and_unsubscribe_port() argument 562 delete_and_unsubscribe_port(struct snd_seq_client * client,struct snd_seq_client_port * port,struct snd_seq_subscribers * subs,bool is_src,bool ack) delete_and_unsubscribe_port() argument 716 snd_seq_event_port_detach(int client,int port) snd_seq_event_port_detach() argument [all...] |