/linux-3.3/drivers/staging/iio/gyro/ |
D | adxrs450_core.c | 6 * Licensed under the GPL-2. 11 #include <linux/delay.h> 15 #include <linux/spi/spi.h> 27 * adxrs450_spi_read_reg_16() - read 2 bytes from a register pair 40 mutex_lock(&st->buf_lock); in adxrs450_spi_read_reg_16() 41 st->tx[0] = ADXRS450_READ_DATA | (reg_address >> 7); in adxrs450_spi_read_reg_16() 42 st->tx[1] = reg_address << 1; in adxrs450_spi_read_reg_16() 43 st->tx[2] = 0; in adxrs450_spi_read_reg_16() 44 st->tx[3] = 0; in adxrs450_spi_read_reg_16() 46 if (!(hweight32(be32_to_cpu(*(u32 *)st->tx)) & 1)) in adxrs450_spi_read_reg_16() [all …]
|
D | adis16130_core.c | 6 * Licensed under the GPL-2 or later. 9 #include <linux/delay.h> 13 #include <linux/spi/spi.h> 26 /* 1 = data-ready signal low when unread data on all channels; */ 38 #define ADIS16130_MODE_24BIT (1 << 1) /* 1 = 24-bit resolution; */ 41 * struct adis16130_state - device instance specific data 42 * @us: actual spi_device to write data 43 * @buf_lock: mutex to protect tx and rx 44 * @buf: unified tx/rx buffer 47 struct spi_device *us; member [all …]
|
D | adis16080_core.c | 2 * ADIS16080/100 Yaw Rate Gyroscope with SPI driver 6 * Licensed under the GPL-2 or later. 8 #include <linux/delay.h> 12 #include <linux/spi/spi.h> 33 * struct adis16080_state - device instance specific data 34 * @us: actual spi_device to write data 36 * @buf_lock: mutex to protect tx and rx 39 struct spi_device *us; member 51 mutex_lock(&st->buf_lock); in adis16080_spi_write() 52 st->buf[0] = val >> 8; in adis16080_spi_write() [all …]
|
D | adis16260_core.c | 6 * Licensed under the GPL-2 or later. 11 #include <linux/delay.h> 15 #include <linux/spi/spi.h> 32 * adis16260_spi_write_reg_8() - write single byte to a register 44 mutex_lock(&st->buf_lock); in adis16260_spi_write_reg_8() 45 st->tx[0] = ADIS16260_WRITE_REG(reg_address); in adis16260_spi_write_reg_8() 46 st->tx[1] = val; in adis16260_spi_write_reg_8() 48 ret = spi_write(st->us, st->tx, 2); in adis16260_spi_write_reg_8() 49 mutex_unlock(&st->buf_lock); in adis16260_spi_write_reg_8() 55 * adis16260_spi_write_reg_16() - write 2 bytes to a pair of registers [all …]
|
/linux-3.3/drivers/staging/iio/meter/ |
D | ade7759.c | 6 * Licensed under the GPL-2 or later. 11 #include <linux/delay.h> 15 #include <linux/spi/spi.h> 34 mutex_lock(&st->buf_lock); in ade7759_spi_write_reg_8() 35 st->tx[0] = ADE7759_WRITE_REG(reg_address); in ade7759_spi_write_reg_8() 36 st->tx[1] = val; in ade7759_spi_write_reg_8() 38 ret = spi_write(st->us, st->tx, 2); in ade7759_spi_write_reg_8() 39 mutex_unlock(&st->buf_lock); in ade7759_spi_write_reg_8() 52 mutex_lock(&st->buf_lock); in ade7759_spi_write_reg_16() 53 st->tx[0] = ADE7759_WRITE_REG(reg_address); in ade7759_spi_write_reg_16() [all …]
|
D | ade7758_core.c | 4 * Copyright 2010-2011 Analog Devices Inc. 6 * Licensed under the GPL-2. 11 #include <linux/delay.h> 15 #include <linux/spi/spi.h> 35 mutex_lock(&st->buf_lock); in ade7758_spi_write_reg_8() 36 st->tx[0] = ADE7758_WRITE_REG(reg_address); in ade7758_spi_write_reg_8() 37 st->tx[1] = val; in ade7758_spi_write_reg_8() 39 ret = spi_write(st->us, st->tx, 2); in ade7758_spi_write_reg_8() 40 mutex_unlock(&st->buf_lock); in ade7758_spi_write_reg_8() 55 .tx_buf = st->tx, in ade7758_spi_write_reg_16() [all …]
|
D | ade7754.c | 6 * Licensed under the GPL-2 or later. 11 #include <linux/delay.h> 15 #include <linux/spi/spi.h> 34 mutex_lock(&st->buf_lock); in ade7754_spi_write_reg_8() 35 st->tx[0] = ADE7754_WRITE_REG(reg_address); in ade7754_spi_write_reg_8() 36 st->tx[1] = val; in ade7754_spi_write_reg_8() 38 ret = spi_write(st->us, st->tx, 2); in ade7754_spi_write_reg_8() 39 mutex_unlock(&st->buf_lock); in ade7754_spi_write_reg_8() 52 mutex_lock(&st->buf_lock); in ade7754_spi_write_reg_16() 53 st->tx[0] = ADE7754_WRITE_REG(reg_address); in ade7754_spi_write_reg_16() [all …]
|
D | ade7753.c | 2 * ADE7753 Single-Phase Multifunction Metering IC with di/dt Sensor Interface 6 * Licensed under the GPL-2 or later. 11 #include <linux/delay.h> 15 #include <linux/spi/spi.h> 34 mutex_lock(&st->buf_lock); in ade7753_spi_write_reg_8() 35 st->tx[0] = ADE7753_WRITE_REG(reg_address); in ade7753_spi_write_reg_8() 36 st->tx[1] = val; in ade7753_spi_write_reg_8() 38 ret = spi_write(st->us, st->tx, 2); in ade7753_spi_write_reg_8() 39 mutex_unlock(&st->buf_lock); in ade7753_spi_write_reg_8() 52 mutex_lock(&st->buf_lock); in ade7753_spi_write_reg_16() [all …]
|
/linux-3.3/drivers/staging/iio/accel/ |
D | adis16220_core.c | 6 * Licensed under the GPL-2 or later. 9 #include <linux/delay.h> 13 #include <linux/spi/spi.h> 26 * adis16220_spi_write_reg_8() - write single byte to a register 38 mutex_lock(&st->buf_lock); in adis16220_spi_write_reg_8() 39 st->tx[0] = ADIS16220_WRITE_REG(reg_address); in adis16220_spi_write_reg_8() 40 st->tx[1] = val; in adis16220_spi_write_reg_8() 42 ret = spi_write(st->us, st->tx, 2); in adis16220_spi_write_reg_8() 43 mutex_unlock(&st->buf_lock); in adis16220_spi_write_reg_8() 49 * adis16220_spi_write_reg_16() - write 2 bytes to a pair of registers [all …]
|
D | adis16203_core.c | 6 * Licensed under the GPL-2 or later. 9 #include <linux/delay.h> 13 #include <linux/spi/spi.h> 27 * adis16203_spi_write_reg_8() - write single byte to a register 39 mutex_lock(&st->buf_lock); in adis16203_spi_write_reg_8() 40 st->tx[0] = ADIS16203_WRITE_REG(reg_address); in adis16203_spi_write_reg_8() 41 st->tx[1] = val; in adis16203_spi_write_reg_8() 43 ret = spi_write(st->us, st->tx, 2); in adis16203_spi_write_reg_8() 44 mutex_unlock(&st->buf_lock); in adis16203_spi_write_reg_8() 50 * adis16203_spi_write_reg_16() - write 2 bytes to a pair of registers [all …]
|
D | adis16201_core.c | 6 * Licensed under the GPL-2 or later. 9 #include <linux/delay.h> 13 #include <linux/spi/spi.h> 35 * adis16201_spi_write_reg_8() - write single byte to a register 47 mutex_lock(&st->buf_lock); in adis16201_spi_write_reg_8() 48 st->tx[0] = ADIS16201_WRITE_REG(reg_address); in adis16201_spi_write_reg_8() 49 st->tx[1] = val; in adis16201_spi_write_reg_8() 51 ret = spi_write(st->us, st->tx, 2); in adis16201_spi_write_reg_8() 52 mutex_unlock(&st->buf_lock); in adis16201_spi_write_reg_8() 58 * adis16201_spi_write_reg_16() - write 2 bytes to a pair of registers [all …]
|
D | adis16209_core.c | 6 * Licensed under the GPL-2 or later. 9 #include <linux/delay.h> 13 #include <linux/spi/spi.h> 28 * adis16209_spi_write_reg_8() - write single byte to a register 40 mutex_lock(&st->buf_lock); in adis16209_spi_write_reg_8() 41 st->tx[0] = ADIS16209_WRITE_REG(reg_address); in adis16209_spi_write_reg_8() 42 st->tx[1] = val; in adis16209_spi_write_reg_8() 44 ret = spi_write(st->us, st->tx, 2); in adis16209_spi_write_reg_8() 45 mutex_unlock(&st->buf_lock); in adis16209_spi_write_reg_8() 51 * adis16209_spi_write_reg_16() - write 2 bytes to a pair of registers [all …]
|
D | adis16204_core.c | 2 * ADIS16204 Programmable High-g Digital Impact Sensor and Recorder 6 * Licensed under the GPL-2 or later. 11 #include <linux/delay.h> 15 #include <linux/spi/spi.h> 30 * adis16204_spi_write_reg_8() - write single byte to a register 42 mutex_lock(&st->buf_lock); in adis16204_spi_write_reg_8() 43 st->tx[0] = ADIS16204_WRITE_REG(reg_address); in adis16204_spi_write_reg_8() 44 st->tx[1] = val; in adis16204_spi_write_reg_8() 46 ret = spi_write(st->us, st->tx, 2); in adis16204_spi_write_reg_8() 47 mutex_unlock(&st->buf_lock); in adis16204_spi_write_reg_8() [all …]
|
D | adis16240_core.c | 6 * Licensed under the GPL-2 or later. 12 #include <linux/delay.h> 16 #include <linux/spi/spi.h> 33 * adis16240_spi_write_reg_8() - write single byte to a register 45 mutex_lock(&st->buf_lock); in adis16240_spi_write_reg_8() 46 st->tx[0] = ADIS16240_WRITE_REG(reg_address); in adis16240_spi_write_reg_8() 47 st->tx[1] = val; in adis16240_spi_write_reg_8() 49 ret = spi_write(st->us, st->tx, 2); in adis16240_spi_write_reg_8() 50 mutex_unlock(&st->buf_lock); in adis16240_spi_write_reg_8() 56 * adis16240_spi_write_reg_16() - write 2 bytes to a pair of registers [all …]
|
/linux-3.3/drivers/spi/ |
D | spi-ep93xx.c | 2 * Driver for Cirrus Logic EP93xx SPI controller. 4 * Copyright (C) 2010-2011 Mika Westerberg 6 * Explicit FIFO handling code was inspired by amba-pl022 driver. 8 * Chip select support using other than built-in GPIOs by H. Hartley Sweeten. 10 * For more information about the SPI controller see documentation on Cirrus 22 #include <linux/delay.h> 32 #include <linux/spi/spi.h> 68 /* maximum depth of RX/TX FIFO */ 72 * struct ep93xx_spi - EP93xx SPI controller structure 89 * @rx: current byte in transfer to receive [all …]
|
D | spi-bitbang.c | 2 * polling/bitbanging SPI master controller driver utilities 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 #include <linux/delay.h> 29 #include <linux/spi/spi.h> 30 #include <linux/spi/spi_bitbang.h> 33 /*----------------------------------------------------------------------*/ 36 * FIRST PART (OPTIONAL): word-at-a-time spi_transfer support. 37 * Use this for GPIO or shift-register level hardware APIs. 39 * spi_bitbang_cs is in spi_device->controller_state, which is unavailable 41 * used, though maybe they're called from controller-aware code. [all …]
|
D | spi-atmel.c | 2 * Driver for Atmel AT32 and AT91 SPI Controllers 16 #include <linux/delay.h> 17 #include <linux/dma-mapping.h> 20 #include <linux/spi/spi.h> 28 /* SPI register offsets */ 169 (((value) & ((1 << SPI_##name##_SIZE) - 1)) << SPI_##name##_OFFSET) 171 (((value) >> SPI_##name##_OFFSET) & ((1 << SPI_##name##_SIZE) - 1)) 173 ( ((old) & ~(((1 << SPI_##name##_SIZE) - 1) << SPI_##name##_OFFSET)) \ 178 __raw_readl((port)->regs + SPI_##reg) 180 __raw_writel((value), (port)->regs + SPI_##reg) [all …]
|
D | spi-omap-uwire.c | 11 * Copyright (C) 2005 David Brownell (ported to 2.6 SPI interface) 38 #include <linux/delay.h> 46 #include <linux/spi/spi.h> 47 #include <linux/spi/spi_bitbang.h> 54 #include <asm/mach-types.h> 161 return -1; in wait_uwire_csr_flag() 180 static void uwire_chipselect(struct spi_device *spi, int value) in uwire_chipselect() argument 182 struct uwire_state *ust = spi->controller_state; in uwire_chipselect() 191 if (value == BITBANG_CS_INACTIVE || old_cs != spi->chip_select) { in uwire_chipselect() 198 uwire_set_clk1_div(ust->div1_idx); in uwire_chipselect() [all …]
|
/linux-3.3/drivers/tty/serial/ |
D | max3100.c | 14 * always asking us for attention. 34 * The initial minor number is 209 in the low-density serial port: 43 #include <linux/delay.h> 49 #include <linux/spi/spi.h> 99 struct spi_device *spi; member 107 * (bits 0-7, bits 8-11 are irqs) */ 116 int rx_enabled; /* if we should rx chars */ 148 if (s->parity & MAX3100_PARITY_ODD) in max3100_do_parity() 153 if (s->parity & MAX3100_7BIT) in max3100_do_parity() 169 if (s->parity & MAX3100_7BIT) in max3100_calc_parity() [all …]
|
D | max3107.c | 2 * max3107.c - spi uart protocol driver for Maxim 3107 24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 30 #include <linux/delay.h> 37 #include <linux/spi/spi.h> 77 const struct baud_table *baud_tbl = s->baud_tbl; in get_new_brg() 87 /* Perform SPI transfer for write/read of device register(s) */ 88 int max3107_rw(struct max3107_port *s, u8 *tx, u8 *rx, int len) in max3107_rw() argument 93 /* Initialize SPI ,message */ in max3107_rw() 96 /* Initialize SPI transfer */ in max3107_rw() 100 spi_xfer.rx_buf = rx; in max3107_rw() [all …]
|
/linux-3.3/drivers/staging/iio/imu/ |
D | adis16400_core.c | 5 * 3d Magnetometers via SPI 19 #include <linux/delay.h> 23 #include <linux/spi/spi.h> 46 * adis16400_spi_write_reg_8() - write single byte to a register 58 mutex_lock(&st->buf_lock); in adis16400_spi_write_reg_8() 59 st->tx[0] = ADIS16400_WRITE_REG(reg_address); in adis16400_spi_write_reg_8() 60 st->tx[1] = val; in adis16400_spi_write_reg_8() 62 ret = spi_write(st->us, st->tx, 2); in adis16400_spi_write_reg_8() 63 mutex_unlock(&st->buf_lock); in adis16400_spi_write_reg_8() 69 * adis16400_spi_write_reg_16() - write 2 bytes to a pair of registers [all …]
|
/linux-3.3/drivers/net/can/ |
D | mcp251x.c | 2 * CAN bus driver for Microchip 251x CAN Controller with SPI Interface 17 * - Sascha Hauer, Marc Kleine-Budde, Pengutronix 18 * - Simon Kallweit, intefo AG 32 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 65 #include <linux/delay.h> 67 #include <linux/dma-mapping.h> 76 #include <linux/spi/spi.h> 79 /* SPI interface instruction set */ 202 * Buffer size required for the largest SPI transfer (i.e., reading a 213 static int mcp251x_enable_dma; /* Enable SPI DMA. Default: 0 (Off) */ [all …]
|
/linux-3.3/drivers/rtc/ |
D | rtc-ds1305.c | 2 * rtc-ds1305.c -- driver for DS1305 and DS1306 SPI RTC chips 18 #include <linux/spi/spi.h> 19 #include <linux/spi/ds1305.h> 25 * otherwise you're reading it. All non-bitmask values are BCD. 31 * - Need fancy "hours" encoding in 12hour mode 32 * - Don't rely on the "day-of-week" field (or tm_wday) 33 * - Are a 21st-century clock (2000 <= year < 2100) 54 * NOTE ALSO that while we could generate once-a-second IRQs (UIE), we 80 /* trickle bits are defined in <linux/spi/ds1305.h> */ 89 struct spi_device *spi; member [all …]
|
/linux-3.3/drivers/net/ethernet/sfc/ |
D | falcon.c | 3 * Copyright 2005-2006 Fen Systems Ltd. 4 * Copyright 2006-2010 Solarflare Communications Inc. 12 #include <linux/delay.h> 23 #include "spi.h" 34 * 8 KB, 16-bit address, 32 B write block */ 39 * 128 KB, 24-bit address, 32 KB erase block, 256 B write block */ 48 * I2C bus - this is a bit-bashing interface using GPIO pins 98 /* Wait up to 50 ms for slave to let us pull SCL high */ 105 struct efx_nic *efx = channel->efx; in falcon_push_irq_moderation() 110 if (channel->irq_moderation) { in falcon_push_irq_moderation() [all …]
|
/linux-3.3/drivers/net/ethernet/atheros/atlx/ |
D | atl2.h | 1 /* atl2.h -- atl2 driver definitions 8 * Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved. 22 * Temple Place - Suite 330, Boston, MA 02111-1307, USA. 38 #include <linux/delay.h> 53 ((a)->hw_addr + (reg)))) 55 #define ATL2_WRITE_FLUSH(a) (ioread32((a)->hw_addr)) 57 #define ATL2_READ_REG(a, reg) (ioread32((a)->hw_addr + (reg))) 60 ((a)->hw_addr + (reg)))) 62 #define ATL2_READ_REGB(a, reg) (ioread8((a)->hw_addr + (reg))) 65 ((a)->hw_addr + (reg)))) [all …]
|