Home
last modified time | relevance | path

Searched +full:bit +full:- +full:banging (Results 1 – 25 of 32) sorted by relevance

12

/linux/drivers/i2c/algos/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
10 tristate "I2C bit-banging interfaces"
H A Di2c-algo-bit.c1 // SPDX-License-Identifier: GPL-2.0+
3 * i2c-algo-bit.c: i2c driver algorithms for bit-shift adapters
5 * Copyright (C) 1995-2000 Simon G. Vogl
17 #include <linux/i2c-algo-bit.h>
20 /* ----- global defines ----------------------------------------------- */
33 /* ----- global variables --------------------------------------------- */
35 static int bit_test; /* see if the line-setting functions work */
37 MODULE_PARM_DESC(bit_test, "lines testing - 0 off; 1 report; 2 fail if stuck");
43 "debug level - 0 off; 1 normal; 2 verbose; 3 very verbose");
46 /* --- setting states on the bus with the right timing: --------------- */
[all …]
/linux/Documentation/devicetree/bindings/iio/adc/
H A Davia-hx711.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/iio/adc/avia-hx711.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Andreas Klinger <ak@it-klinger.de>
13 Bit-banging driver using two GPIOs:
14 - sck-gpio gives a clock to the sensor with 24 cycles for data retrieval
17 - dout-gpio is the sensor data the sensor responds to the clock
25 - avia,hx711
27 sck-gpios:
[all …]
/linux/Documentation/devicetree/bindings/iio/proximity/
H A Dparallax-ping.yaml1 # SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/iio/proximity/parallax-ping.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Andreas Klinger <ak@it-klinger.de>
13 Bit-banging driver using one GPIO:
14 - ping-gpios is raised by the driver to start measurement
15 - direction of ping-gpio is then switched into input with an interrupt
19 http://parallax.com/sites/default/files/downloads/28041-LaserPING-2m-Rangefinder-Guide.pdf
20 http://parallax.com/sites/default/files/downloads/28015-PING-Documentation-v1.6.pdf
[all …]
H A Ddevantech-srf04.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/iio/proximity/devantech-srf04.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Andreas Klinger <ak@it-klinger.de>
13 Bit-banging driver using two GPIOs:
14 - trigger-gpio is raised by the driver to start sending out an ultrasonic
16 - echo-gpio is held high by the sensor after sending ultrasonic burst
20 https://www.robot-electronics.co.uk/htm/srf04tech.htm
22 https://www.maxbotix.com/documents/LV-MaxSonar-EZ_Datasheet.pdf
[all …]
/linux/drivers/input/serio/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
113 This driver provides support for the PS/2 ports on PA-RISC machines
131 of delivering interrupts on a periodic and one-shot basis.
132 The SDC may also be connected to a battery-backed real-time
133 clock, a basic audio waveform generator, and an HP-HIL Master
199 echo -n "serio_raw" > /sys/bus/serio/devices/serioX/drvctl
231 When used for the E3 mailboard, a non-standard key table
268 tristate "OLPC AP-SP input support"
272 in the OLPC XO-1.75 and XO-4 laptops.
282 Select this option to enable the Hyper-V Keyboard driver.
[all …]
H A Dolpc_apsp.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (C) 2011-2013 One Laptop Per Child
19 * The OLPC XO-1.75 and XO-4 laptops do not have a hardware PS/2 controller.
20 * Instead, the OLPC firmware runs a bit-banging PS/2 implementation on an
21 * otherwise-unused slow processor which is included in the Marvell MMP2/MMP3
74 struct olpc_apsp *priv = port->port_data; in olpc_apsp_write()
78 if (port == priv->padio) in olpc_apsp_write()
83 dev_dbg(priv->dev, "olpc_apsp_write which=%x val=%x\n", which, val); in olpc_apsp_write()
85 u32 sts = readl(priv->base + COMMAND_FIFO_STATUS); in olpc_apsp_write()
88 priv->base + SECURE_PROCESSOR_COMMAND); in olpc_apsp_write()
[all …]
/linux/drivers/gpu/drm/gma500/
H A Dintel_gmbus.c3 * Copyright © 2006-2008,2010 Intel Corporation
27 * Chris Wilson <chris@chris-wilson.co.uk>
31 #include <linux/i2c-algo-bit.h>
44 ret__ = -ETIMEDOUT; \
55 #define GMBUS_REG_READ(reg) ioread32(dev_priv->gmbus_reg + (reg))
56 #define GMBUS_REG_WRITE(reg, val) iowrite32((val), dev_priv->gmbus_reg + (reg))
84 /* When using bit bashing for I2C, this bit needs to be set to 1 */ in intel_i2c_quirk_set()
89 if (!IS_PINEVIEW(dev_priv->dev)) in intel_i2c_quirk_set()
105 struct drm_psb_private *dev_priv = gpio->dev_priv; in get_reserved()
109 reserved = GMBUS_REG_READ(gpio->reg) & in get_reserved()
[all …]
/linux/Documentation/misc-devices/
H A Dc2port.rst1 .. SPDX-License-Identifier: GPL-2.0
23 --------
26 C2 Interface used for in-system programming of micro controllers.
28 By using this driver you can reprogram the in-system flash without EC2
33 ----------
38 - AN127: FLASH Programming via the C2 Interface at
41 - C2 Specification at
44 however it implements a two wire serial communication protocol (bit
45 banging) designed to enable in-system programming, debugging, and
46 boundary-scan testing on low pin-count Silicon Labs devices. Currently
[all …]
/linux/Documentation/driver-api/gpio/
H A Dintro.rst17 A "General Purpose Input/Output" (GPIO) is a flexible software-controlled
20 represents a bit connected to a particular pin, or "ball" on Ball Grid Array
25 System-on-Chip (SOC) processors heavily rely on GPIOs. In some cases, every
26 non-dedicated pin can be configured as a GPIO; and most chips have at least
31 Most PC southbridges have a few dozen GPIO-capable pins (with only the BIOS
36 - Output values are writable (high=1, low=0). Some chips also have
38 value might be driven, supporting "wire-OR" and similar schemes for the
41 - Input values are likewise readable (1, 0). Some chips support readback
42 of pins configured as "output", which is very useful in such "wire-OR"
44 input de-glitch/debounce logic, sometimes with software controls.
[all …]
H A Ddrivers-on-gpio.rst6 the right in-kernel and userspace APIs/ABIs for the job, and that these
10 - leds-gpio: drivers/leds/leds-gpio.c will handle LEDs connected to GPIO
13 - ledtrig-gpio: drivers/leds/trigger/ledtrig-gpio.c will provide a LED trigger,
15 (and that LED may in turn use the leds-gpio as per above).
17 - gpio-keys: drivers/input/keyboard/gpio_keys.c is used when your GPIO line
20 - gpio-keys-polled: drivers/input/keyboard/gpio_keys_polled.c is used when your
24 - gpio_mouse: drivers/input/mouse/gpio_mouse.c is used to provide a mouse with
29 - gpio-beeper: drivers/input/misc/gpio-beeper.c is used to provide a beep from
31 off/on, for an actual PWM waveform, see pwm-gpio below.)
33 - pwm-gpio: drivers/pwm/pwm-gpio.c is used to toggle a GPIO with a high
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/
H A Dbus.c30 * i2c-algo-bit
50 bus->func->drive_scl(bus, state); in nvkm_i2c_bus_setscl()
57 bus->func->drive_sda(bus, state); in nvkm_i2c_bus_setsda()
64 return bus->func->sense_scl(bus); in nvkm_i2c_bus_getscl()
71 return bus->func->sense_sda(bus); in nvkm_i2c_bus_getsda()
75 * !i2c-algo-bit (off-chip i2c bus / hw i2c / internal bit-banging algo)
87 ret = bus->func->xfer(bus, msgs, num); in nvkm_i2c_bus_xfer()
111 if (bus->func->init) in nvkm_i2c_bus_init()
112 bus->func->init(bus); in nvkm_i2c_bus_init()
114 mutex_lock(&bus->mutex); in nvkm_i2c_bus_init()
[all …]
/linux/drivers/media/pci/pt3/
H A Dpt3_i2c.c1 // SPDX-License-Identifier: GPL-2.0
49 if ((cbuf->num_cmds % 2) == 0) in cmdbuf_add()
50 cbuf->tmp = cmd; in cmdbuf_add()
52 cbuf->tmp |= cmd << 4; in cmdbuf_add()
53 buf_idx = cbuf->num_cmds / 2; in cmdbuf_add()
54 if (buf_idx < ARRAY_SIZE(cbuf->data)) in cmdbuf_add()
55 cbuf->data[buf_idx] = cbuf->tmp; in cmdbuf_add()
57 cbuf->num_cmds++; in cmdbuf_add()
63 if (cbuf->num_cmds % 2) in put_end()
91 cmdbuf_add(cbuf, (i == size - 1) ? I_DATA_H_NOP : I_DATA_L_NOP); in put_byte_read()
[all …]
/linux/drivers/fsi/
H A Dfsi-master-gpio.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * A FSI master controller, using a simple GPIO bit-banging interface
18 #include "fsi-master.h"
54 if (!master->no_delays) in clock_toggle()
56 gpiod_set_value(master->gpio_clk, 0); in clock_toggle()
57 if (!master->no_delays) in clock_toggle()
59 gpiod_set_value(master->gpio_clk, 1); in clock_toggle()
67 if (!master->no_delays) in sda_clock_in()
69 gpiod_set_value(master->gpio_clk, 0); in sda_clock_in()
72 gpiod_get_value(master->gpio_data); in sda_clock_in()
[all …]
/linux/drivers/spi/
H A Dspi-gpio.c1 // SPDX-License-Identifier: GPL-2.0-or-later
25 * platform_device->driver_data ... points to spi_gpio
27 * spi->controller_state ... reserved for bitbang framework code
29 * spi->controller->dev.driver_data ... points to spi_gpio->bitbang
40 /*----------------------------------------------------------------------*/
44 /*----------------------------------------------------------------------*/
52 bang = spi_controller_get_devdata(spi->controller); in spi_to_spi_gpio()
62 gpiod_set_value_cansleep(spi_gpio->sck, is_on); in setsck()
69 gpiod_set_value_cansleep(spi_gpio->mosi, is_on); in setmosi()
76 if (spi->mode & SPI_3WIRE) in getmiso()
[all …]
/linux/Documentation/PCI/
H A Dpci.rst1 .. SPDX-License-Identifier: GPL-2.0
7 :Authors: - Martin Mares <mj@ucw.cz>
8 - Grant Grundler <grundler@parisc-linux.org>
11 Since each CPU architecture implements different chip-sets and PCI devices
18 by Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman.
22 However, keep in mind that all documents are subject to "bit rot".
26 "Linux PCI" <linux-pci@atrey.karlin.mff.cuni.cz> mailing list.
38 supporting hot-pluggable PCI, CardBus, and Express-Card in a single driver].
45 - Enable the device
46 - Request MMIO/IOP resources
[all …]
H A Dpci-error-recovery.rst1 .. SPDX-License-Identifier: GPL-2.0
8 :Authors: - Linas Vepstas <linasvepstas@gmail.com>
9 - Richard Lary <rlary@us.ibm.com>
10 - Mike Mason <mmlnx@us.ibm.com>
17 and the PCI-host bridges found on IBM Power4, Power5 and Power6-based
32 including multiple instances of a device driver on multi-function
34 waiting for some i/o-space register to change, when it never will.
39 is forced by the need to handle multi-function devices, that is,
42 of reset it desires, the choices being a simple re-enabling of I/O
47 After a reset and/or a re-enabling of I/O, all drivers are
[all …]
/linux/drivers/gpu/drm/radeon/
H A Dradeon_i2c.c2 * Copyright 2007-8 Advanced Micro Devices, Inc.
58 if (radeon_connector->router.ddc_valid) in radeon_ddc_probe()
62 ret = i2c_transfer(&radeon_connector->ddc_bus->aux.ddc, msgs, 2); in radeon_ddc_probe()
64 ret = i2c_transfer(&radeon_connector->ddc_bus->adapter, msgs, 2); in radeon_ddc_probe()
83 /* bit banging i2c */
88 struct radeon_device *rdev = i2c->dev->dev_private; in pre_xfer()
89 struct radeon_i2c_bus_rec *rec = &i2c->rec; in pre_xfer()
92 mutex_lock(&i2c->mutex); in pre_xfer()
95 * holds the i2c port in a bad state - switch hw i2c away before in pre_xfer()
96 * doing DDC - do this for all r200s/r300s/r400s for safety sake in pre_xfer()
[all …]
/linux/drivers/net/ethernet/natsemi/
H A Dns83820.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Questions/comments/discussion to linux-ns83820@kvack.org.
16 * 20010414 0.1 - created
17 * 20010622 0.2 - basic rx and tx.
18 * 20010711 0.3 - added duplex and link state detection support.
19 * 20010713 0.4 - zero copy, no hangs.
20 * 0.5 - 64 bit dma support (davem will hate me for this)
21 * - disable jumbo frames to avoid tx hangs
22 * - work around tx deadlocks on my 1.02 card via
24 * 20010810 0.6 - use pci dma api for ringbuffers, work on ia64
[all …]
/linux/include/linux/
H A Di2c.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * i2c.h - definitions for the Linux i2c bus interface
4 * Copyright (C) 1995-2000 Simon G. Vogl
5 * Copyright (C) 2013-2019 Wolfram Sang <wsa@kernel.org>
30 /* --- General options ------------------------------------------------ */
69 * i2c_master_recv - issue a single I2C message in master receive mode
83 * i2c_master_recv_dmasafe - issue a single I2C message in master receive mode
99 * i2c_master_send - issue a single I2C message in master transmit mode
113 * i2c_master_send_dmasafe - issue a single I2C message in master transmit mode
195 * struct i2c_device_identity - i2c client device identification
[all …]
/linux/drivers/media/dvb-frontends/
H A Ds5h1409.c1 // SPDX-License-Identifier: GPL-2.0-or-later
300 /* 8 bit registers, 16 bit values */
306 struct i2c_msg msg = { .addr = state->config->demod_address, in s5h1409_writereg()
309 ret = i2c_transfer(state->i2c, &msg, 1); in s5h1409_writereg()
315 return (ret != 1) ? -1 : 0; in s5h1409_writereg()
325 { .addr = state->config->demod_address, .flags = 0, in s5h1409_readreg()
327 { .addr = state->config->demod_address, .flags = I2C_M_RD, in s5h1409_readreg()
330 ret = i2c_transfer(state->i2c, msg, 2); in s5h1409_readreg()
339 struct s5h1409_state *state = fe->demodulator_priv; in s5h1409_softreset()
345 state->is_qam_locked = 0; in s5h1409_softreset()
[all …]
/linux/Documentation/ABI/stable/
H A Dsysfs-driver-mlxreg-io1 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/asic_health
6 0 - health failed, 2 - health OK, 3 - ASIC in booting state.
10 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/cpld1_version
11 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/cpld2_version
20 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/fan_dir
25 forward direction - relevant bit is set 0;
26 reversed direction - relevant bit is set 1.
30 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/cpld3_version
39 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/jtag_enable
48 What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/select_iio
[all …]
/linux/arch/powerpc/platforms/powermac/
H A Dlow_i2c.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (C) 2003-2005 Ben. Herrenschmidt (benh@kernel.crashing.org)
13 * For now, keywest, PMU and SMU, though we could add Cuda, or other bit
14 * banging busses found on older chipsets in earlier machines if we ever need
19 * as the interrupt is currently used by i2c-keywest. In the long run, we
20 * might want to get rid of those high-level interfaces to linux i2c layer
107 * i2c-keywest */
182 name, __kw_state_names[host->state], isr); \
196 return readb(host->base + (((unsigned int)reg) << host->bsteps)); in __kw_read_reg()
202 writeb(val, host->base + (((unsigned)reg) << host->bsteps)); in __kw_write_reg()
[all …]
/linux/drivers/net/wireless/realtek/rtl818x/rtl8187/
H A Ddev.c1 // SPDX-License-Identifier: GPL-2.0-only
13 * Hin-Tak Leung <htl10@users.sourceforge.net>
38 MODULE_AUTHOR("Hin-Tak Leung <htl10@users.sourceforge.net>");
118 kfree(urb->context); in rtl8187_iowrite_async_cb()
142 dr = &buf->dr; in rtl8187_iowrite_async()
144 dr->bRequestType = RTL8187_REQT_WRITE; in rtl8187_iowrite_async()
145 dr->bRequest = RTL8187_REQ_SET_REG; in rtl8187_iowrite_async()
146 dr->wValue = addr; in rtl8187_iowrite_async()
147 dr->wIndex = 0; in rtl8187_iowrite_async()
148 dr->wLength = cpu_to_le16(len); in rtl8187_iowrite_async()
[all …]
/linux/drivers/i2c/busses/
H A Di2c-npcm7xx.c1 // SPDX-License-Identifier: GPL-2.0
125 #define NPCM_I2CTXF_CTL 0x12 /* Tx-FIFO Control */
128 #define NPCM_I2CTXF_STS 0x1A /* Tx-FIFO Status */
129 #define NPCM_I2CRXF_STS 0x1C /* Rx-FIFO Status */
130 #define NPCM_I2CRXF_CTL 0x1E /* Rx-FIFO Control */
150 #define NPCM_I2CST_XMIT BIT(0) /* Transmit mode */
151 #define NPCM_I2CST_MASTER BIT(1) /* Master mode */
152 #define NPCM_I2CST_NMATCH BIT(2) /* New match */
153 #define NPCM_I2CST_STASTR BIT(3) /* Stall after start */
154 #define NPCM_I2CST_NEGACK BIT(4) /* Negative ACK */
[all …]

12