Home
last modified time | relevance | path

Searched +full:spi +full:- +full:tx +full:- +full:delay +full:- +full:us (Results 1 – 25 of 47) sorted by relevance

12

/linux-3.3/drivers/staging/iio/gyro/
Dadxrs450_core.c6 * 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 …]
Dadis16130_core.c6 * 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 …]
Dadis16260_core.c6 * 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 …]
Dadis16080_core.c2 * 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 …]
/linux-3.3/drivers/staging/iio/meter/
Dade7759.c6 * 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 …]
Dade7754.c6 * 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 …]
Dade7753.c2 * 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 …]
Dade7758_core.c4 * 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 …]
/linux-3.3/drivers/staging/iio/accel/
Dadis16220_core.c6 * 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 …]
Dadis16203_core.c6 * 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 …]
Dadis16201_core.c6 * 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 …]
Dadis16209_core.c6 * 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 …]
Dadis16240_core.c6 * 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 …]
Dadis16204_core.c2 * 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 …]
/linux-3.3/drivers/staging/iio/imu/
Dadis16400_core.c5 * 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/spi/
Dspi-ep93xx.c2 * 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
88 * @tx: current byte in transfer to transmit
[all …]
Dspi-bitbang.c2 * 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 …]
Dspi-omap-uwire.c11 * 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 …]
Dspi-atmel.c2 * 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 …]
/linux-3.3/drivers/input/touchscreen/
Dtsc2005.c4 * Copyright (C) 2006-2010 Nokia Corporation
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #include <linux/delay.h>
31 #include <linux/spi/spi.h>
32 #include <linux/spi/tsc2005.h>
41 * 5) tsc2005_irq_thread() queues up an spi transfer to fetch the x, y, z1, z2
113 struct spi_device *spi; member
151 u8 tx = TSC2005_CMD | TSC2005_CMD_12BIT | cmd; in tsc2005_cmd() local
153 .tx_buf = &tx, in tsc2005_cmd()
163 error = spi_sync(ts->spi, &msg); in tsc2005_cmd()
[all …]
/linux-3.3/drivers/tty/serial/
Dmax3100.c12 * to use polling for flow control. TX empty IRQ is unusable, since
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
102 int tx_empty; /* last TX empty bit */
107 * (bits 0-7, bits 8-11 are irqs) */
148 if (s->parity & MAX3100_PARITY_ODD) in max3100_do_parity()
153 if (s->parity & MAX3100_7BIT) in max3100_do_parity()
[all …]
Dmax3107.c2 * 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()
99 spi_xfer.tx_buf = tx; in max3107_rw()
[all …]
/linux-3.3/drivers/net/wireless/libertas/
Dif_spi.c4 * Driver for Marvell SPI WLAN cards.
12 * Inspired by if_sdio.c, Copyright 2007-2008 Pierre Ossman
30 #include <linux/spi/libertas_spi.h>
31 #include <linux/spi/spi.h>
46 struct spi_device *spi; member
61 /* Handles all SPI communication (except for FW load) */
86 list_for_each_safe(cursor, next, &card->cmd_packet_list) { in free_if_spi_card()
88 list_del(&packet->list); in free_if_spi_card()
91 list_for_each_safe(cursor, next, &card->data_packet_list) { in free_if_spi_card()
93 list_del(&packet->list); in free_if_spi_card()
[all …]
/linux-3.3/drivers/net/can/
Dmcp251x.c2 * 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/
Drtc-ds1305.c2 * 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 …]

12