Home
last modified time | relevance | path

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

12

/linux/drivers/i2c/algos/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
10 tristate "I2C bit-banging interfaces"
/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
100 This driver provides support for the PS/2 ports on PA-RISC machines
115 built-in keyboard (as opposed to an external keyboard).
129 in the left-hand column will be interpreted as the corresponding key
130 in the right-hand column.
133 right-hand column will be interpreted as the key shown in the
134 left-hand column.
145 of delivering interrupts on a periodic and one-shot basis.
146 The SDC may also be connected to a battery-backed real-time
147 clock, a basic audio waveform generator, and an HP-HIL Master
[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 …]
H A Dps2-gpio.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * GPIO based serio bus driver for bit banging the PS/2 protocol
5 * Author: Danilo Krummrich <danilokrummrich@dk-develop.de>
24 #define DRIVER_NAME "ps2-gpio"
50 * interrupt interval should be ~60us. Let's allow +/- 20us for frequency
61 * |-----------------| |--------|
68 #define PS2_IRQ_MIN_INTERVAL_US (PS2_CLK_MIN_INTERVAL_US - 20)
98 struct ps2_gpio_data *drvdata = serio->port_data; in ps2_gpio_open()
100 drvdata->t_irq_last = 0; in ps2_gpio_open()
101 drvdata->tx.t_xfer_end = 0; in ps2_gpio_open()
[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/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>
46 ret__ = -ETIMEDOUT; \
57 #define GMBUS_REG_READ(reg) ioread32(dev_priv->gmbus_reg + (reg))
58 #define GMBUS_REG_WRITE(reg, val) iowrite32((val), dev_priv->gmbus_reg + (reg))
86 /* When using bit bashing for I2C, this bit needs to be set to 1 */ in intel_i2c_quirk_set()
91 if (!IS_PINEVIEW(dev_priv->dev)) in intel_i2c_quirk_set()
107 struct drm_psb_private *dev_priv = gpio->dev_priv; in get_reserved()
111 reserved = GMBUS_REG_READ(gpio->reg) & in get_reserved()
[all …]
/linux/drivers/i2c/busses/
H A Di2c-ibm_iic.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * drivers/i2c/busses/i2c-ibm_iic.c
18 * Copyright 2000-2003 MontaVista Software Inc.
20 * Original driver version was highly leveraged from i2c-elektor.c
22 * Copyright 1995-97 Simon G. Vogl
23 * 1998-99 Hans Berglund
45 #include "i2c-ibm_iic.h"
71 # define DBG(f,x...) printk(KERN_DEBUG "ibm-iic" f, ##x)
83 volatile struct iic_regs __iomem *iic = dev->vaddr; in dump_iic_regs()
84 printk(KERN_DEBUG "ibm-iic%d: %s\n", dev->idx, header); in dump_iic_regs()
[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/iio/humidity/
H A Ddht11.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * DHT11/DHT22 bit banging GPIO driver
43 * 0-bit: 22-30uS -- typically 26uS (AM2302)
44 * 1-bit: 68-75uS -- typically 70uS (AM2302)
49 * timeres > 34uS ... don't know what a 1-tick pulse is
51 * 30uS > timeres > 23uS ... don't know what a 2-tick pulse is
54 * Luckily clocks in the 33-44kHz range are quite uncommon, so we can
55 * support most systems if the threshold for decoding a pulse as 1-bit
82 /* num_edges: -1 means "no transmission in progress" */
96 dev_dbg(dht11->dev, "%d edges detected:\n", dht11->num_edges); in dht11_edges_print()
[all …]
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_i2c.c2 * Copyright 2007-8 Advanced Micro Devices, Inc.
38 /* bit banging i2c */
42 struct amdgpu_device *adev = drm_to_adev(i2c->dev); in amdgpu_i2c_pre_xfer()
43 struct amdgpu_i2c_bus_rec *rec = &i2c->rec; in amdgpu_i2c_pre_xfer()
46 mutex_lock(&i2c->mutex); in amdgpu_i2c_pre_xfer()
49 if (rec->hw_capable) { in amdgpu_i2c_pre_xfer()
50 temp = RREG32(rec->mask_clk_reg); in amdgpu_i2c_pre_xfer()
52 WREG32(rec->mask_clk_reg, temp); in amdgpu_i2c_pre_xfer()
56 temp = RREG32(rec->a_clk_reg) & ~rec->a_clk_mask; in amdgpu_i2c_pre_xfer()
57 WREG32(rec->a_clk_reg, temp); in amdgpu_i2c_pre_xfer()
[all …]
/linux/drivers/net/can/sja1000/
H A Dpeak_pci.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * Copyright (C) 2001-2025 PEAK System-Technik GmbH
8 * Author: Stéphane Grosjean <s.grosjean@peak-system.fr>
19 #include <linux/i2c-algo-bit.h>
25 MODULE_AUTHOR("Stéphane Grosjean <s.grosjean@peak-system.fr>");
26 MODULE_DESCRIPTION("Socket-CAN driver for PEAK PCAN PCI family cards");
62 #define PEAK_PC_104P_DEVICE_ID 0x0006 /* PCAN-PC/104+ cards */
63 #define PEAK_PCI_104E_DEVICE_ID 0x0007 /* PCAN-PCI/104 Express cards */
65 #define PEAK_PCIE_OEM_ID 0x0009 /* PCAN-PCI Express OEM */
66 #define PEAK_PCIEC34_DEVICE_ID 0x000A /* PCAN-PCI Express 34 (one channel) */
[all …]
/linux/drivers/spi/
H A Dspi-gpio.c1 // SPDX-License-Identifier: GPL-2.0-or-later
24 * platform_device->driver_data ... points to spi_gpio
26 * spi->controller_state ... reserved for bitbang framework code
28 * spi->controller->dev.driver_data ... points to spi_gpio->bitbang
39 /*----------------------------------------------------------------------*/
43 /*----------------------------------------------------------------------*/
51 bang = spi_controller_get_devdata(spi->controller); in spi_to_spi_gpio()
61 gpiod_set_value_cansleep(spi_gpio->sck, is_on); in setsck()
68 gpiod_set_value_cansleep(spi_gpio->mosi, is_on); in setmosi()
75 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 …]
/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/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/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/net/ethernet/smsc/
H A Dsmc91x.c1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * This is a driver for SMSC's 91C9x/91C1xx single-chip Ethernet devices.
37 * 29/09/03 Russell King - add driver model support
38 * - ethtool support
39 * - convert to use generic MII interface
40 * - add link up/down notification
41 * - don't try to handle full negotiation in
43 * - clean up (and fix stack overrun) in PHY
113 * Use power-down feature of the chip
198 spin_lock_irqsave(&lp->lock, smc_enable_flags); \
[all …]

12