Home
last modified time | relevance | path

Searched full:sda (Results 1 – 25 of 693) sorted by relevance

12345678910>>...28

/openbmc/u-boot/drivers/i2c/
H A Di2c-gpio.c33 /* sda, scl */
37 static int i2c_gpio_sda_get(struct gpio_desc *sda) in i2c_gpio_sda_get() argument
39 return dm_gpio_get_value(sda); in i2c_gpio_sda_get()
42 static void i2c_gpio_sda_set(struct gpio_desc *sda, int bit) in i2c_gpio_sda_set() argument
45 dm_gpio_set_dir_flags(sda, GPIOD_IS_IN); in i2c_gpio_sda_set()
47 dm_gpio_set_dir_flags(sda, GPIOD_IS_OUT); in i2c_gpio_sda_set()
59 static void i2c_gpio_write_bit(struct gpio_desc *scl, struct gpio_desc *sda, in i2c_gpio_write_bit() argument
64 i2c_gpio_sda_set(sda, bit); in i2c_gpio_write_bit()
70 static int i2c_gpio_read_bit(struct gpio_desc *scl, struct gpio_desc *sda, in i2c_gpio_read_bit() argument
77 value = i2c_gpio_sda_get(sda); in i2c_gpio_read_bit()
[all …]
H A Di2c-versatile.c21 #define SDA BIT(1) macro
30 writel(SDA, priv->base + (state ? I2C_SET_REG : I2C_CLEAR_REG)); in versatile_sda_set()
36 int v = !!(readl(priv->base + I2C_CONTROL_REG) & SDA); in versatile_sda_get()
56 /* start: SDA goes from high to low while SCL is high */
65 /* stop: SDA goes from low to high while SCL is high */
74 /* read a bit from the SDA line (data or ACK/NACK) */
84 /* write a bit on the SDA line */
93 /* send a reset sequence of 9 clocks with SDA high */
/openbmc/u-boot/arch/arm/mach-imx/
H A Di2c-mxv7.c17 int sda, scl; in force_idle_bus() local
22 gpio_direction_input(p->sda.gp); in force_idle_bus()
25 imx_iomux_v3_setup_pad(p->sda.gpio_mode); in force_idle_bus()
28 sda = gpio_get_value(p->sda.gp); in force_idle_bus()
30 if ((sda & scl) == 1) in force_idle_bus()
33 printf("%s: sda=%d scl=%d sda.gp=0x%x scl.gp=0x%x\n", __func__, in force_idle_bus()
34 sda, scl, p->sda.gp, p->scl.gp); in force_idle_bus()
44 sda = gpio_get_value(p->sda.gp); in force_idle_bus()
46 if ((sda & scl) == 1) in force_idle_bus()
52 printf("%s: failed to clear bus, sda=%d scl=%d\n", in force_idle_bus()
[all …]
/openbmc/linux/Documentation/devicetree/bindings/i2c/
H A Di2c-gpio.yaml20 sda-gpios:
22 gpio used for the sda signal, this should be flagged as
36 i2c-gpio,sda-output-only:
37 description: sda as output only
54 description: sda and scl gpio, alternative for {sda,scl}-gpios
56 i2c-gpio,sda-open-drain:
60 the GPIO line used for SDA into open drain mode, and that something is
70 i2c-gpio,sda-has-no-pullup:
72 description: sda is used in a non-compliant way and has no pull-up.
74 with i2c-gpio,sda-open-drain.
[all …]
H A Dsnps,designware-i2c.yaml42 ICPU_CFG:TWI_DELAY registers to setup the SDA hold time.
68 i2c-sda-hold-time-ns:
70 The property should contain the SDA hold time in nanoseconds. This option
80 i2c-sda-falling-time-ns:
82 The property should contain the SDA falling time in nanoseconds.
117 i2c-sda-hold-time-ns = <300>;
118 i2c-sda-falling-time-ns = <300>;
H A Dsamsung,s3c2410-i2c.yaml35 The order of the GPIOs should be the following:: <SDA, SCL>. The GPIO
54 samsung,i2c-sda-delay:
57 Delay (in ns) applied to data line (SDA) edges.
121 samsung,i2c-sda-delay = <100>;
140 samsung,i2c-sda-delay = <100>;
157 samsung,i2c-sda-delay = <100>;
H A Dhisilicon,ascend910-i2c.yaml35 i2c-sda-falling-time-ns:
41 i2c-sda-hold-time-ns:
65 i2c-sda-falling-time-ns = <56>;
67 i2c-sda-hold-time-ns = <56>;
/openbmc/linux/Documentation/i2c/
H A Dgpio-fault-injection.rst30 "sda"
33 By reading this file, you get the current state of SDA. By writing, you can
35 "echo 0 > sda" you force SDA low and thus, data cannot be transmitted. The bus
39 succeed because SDA is still pinned low until you manually release it again
40 with "echo 1 > sda". A test with an automatic release can be done with the
46 The following fault injectors create situations where SDA will be held low by a
48 there are I2C client devices which detect a stuck SDA on their side and release
50 device deglitching and monitoring the I2C bus. It could also detect a stuck SDA
61 transmitted. Because the device will ACK its presence, this results in SDA
62 being pulled low by the device while SCL is high. So, similar to the "sda" file
[all …]
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dce/
H A Ddce_i2c_sw.c30 #define SDA true macro
109 write_bit_to_ddc(ddc_handle, SDA, (byte >> shift) & 1); in write_byte_sw()
123 /* The display sends ACK by preventing the SDA from going high in write_byte_sw()
125 * If the SDA goes high after that bit, it's a NACK in write_byte_sw()
130 write_bit_to_ddc(ddc_handle, SDA, true); in write_byte_sw()
141 ack = !read_bit_from_ddc(ddc_handle, SDA); in write_byte_sw()
173 if (read_bit_from_ddc(ddc_handle, SDA)) in read_byte_sw()
190 * SDA low means ACK, SDA high means NACK in read_byte_sw()
193 write_bit_to_ddc(ddc_handle, SDA, !more); in read_byte_sw()
206 write_bit_to_ddc(ddc_handle, SDA, true); in read_byte_sw()
[all …]
/openbmc/linux/drivers/i2c/busses/
H A Di2c-acorn.c20 #define SDA 0x01 macro
25 * SDA outputs as well (which may be different from the
32 u_int ioc_control = ioc_readb(IOC_CONTROL) & ~(SCL | SDA); in ioc_setscl()
47 u_int ioc_control = ioc_readb(IOC_CONTROL) & ~(SCL | SDA); in ioc_setsda()
51 ones |= SDA; in ioc_setsda()
53 ones &= ~SDA; in ioc_setsda()
67 return (ioc_readb(IOC_CONTROL) & SDA) != 0; in ioc_getsda()
87 force_ones = FORCE_ONES | SCL | SDA; in i2c_ioc_init()
H A Di2c-gpio.c22 struct gpio_desc *sda; member
36 * Toggle SDA by changing the output value of the pin. This is only
44 gpiod_set_value_cansleep(priv->sda, state); in i2c_gpio_setsda_val()
64 return gpiod_get_value_cansleep(priv->sda); in i2c_gpio_getsda()
104 WIRE_ATTRIBUTE(sda);
139 /* ADDR (7 bit) + RD (1 bit) + Client ACK, keep SDA hi (1 bit) */ in fops_incomplete_addr_phase_set()
158 /* 0x00 (8 bit) + Client ACK, keep SDA hi (1 bit) */ in fops_incomplete_write_byte_set()
222 * really started the transfer. Interrupt on falling SDA did only in fops_lose_arbitration_set()
289 debugfs_create_file_unsafe("sda", 0600, priv->debug_dir, priv, &fops_sda); in i2c_gpio_fault_injector_init()
315 device_property_read_bool(dev, "i2c-gpio,sda-open-drain"); in i2c_gpio_get_properties()
[all …]
/openbmc/linux/drivers/staging/sm750fb/
H A Dddk750_swi2c.c19 * a point in time where the SCL or SDA may be changed.
29 * the SDA may only be changed in section 2. and section 4. The table
38 * Tx Start SDA | | H | | L |
41 * Tx Stop SDA | | L | | H |
44 * Tx bit H SDA | | H | | |
47 * Tx bit L SDA | | L | | |
107 * value - Bit value to set to the SCL or SDA (0 = low, 1 = high)
141 * This function set/reset the SDA GPIO pin
144 * value - Bit value to set to the SCL or SDA (0 = low, 1 = high)
178 * This function read the data from the SDA GPIO pin
[all …]
/openbmc/linux/drivers/media/usb/gspca/
H A Dw996Xcf.c178 w9968cf_write_sb(sd, 0x0011); /* SDE=1, SDA=0, SCL=1 */ in w9968cf_smbus_start()
179 w9968cf_write_sb(sd, 0x0010); /* SDE=1, SDA=0, SCL=0 */ in w9968cf_smbus_start()
184 w9968cf_write_sb(sd, 0x0010); /* SDE=1, SDA=0, SCL=0 */ in w9968cf_smbus_stop()
185 w9968cf_write_sb(sd, 0x0011); /* SDE=1, SDA=0, SCL=1 */ in w9968cf_smbus_stop()
186 w9968cf_write_sb(sd, 0x0013); /* SDE=1, SDA=1, SCL=1 */ in w9968cf_smbus_stop()
192 int sda; in w9968cf_smbus_write_byte() local
195 sda = (v & 0x80) ? 2 : 0; in w9968cf_smbus_write_byte()
197 /* SDE=1, SDA=sda, SCL=0 */ in w9968cf_smbus_write_byte()
198 w9968cf_write_sb(sd, 0x10 | sda); in w9968cf_smbus_write_byte()
199 /* SDE=1, SDA=sda, SCL=1 */ in w9968cf_smbus_write_byte()
[all …]
/openbmc/linux/drivers/gpu/drm/loongson/
H A Dlsdc_i2c.c76 /* set state on the li2c->sda pin */ in lsdc_gpio_i2c_set_sda()
77 return __lsdc_gpio_i2c_set(li2c, li2c->sda, state); in lsdc_gpio_i2c_set_sda()
90 /* read value from the li2c->sda pin */ in lsdc_gpio_i2c_get_sda()
91 return __lsdc_gpio_i2c_get(li2c, li2c->sda); in lsdc_gpio_i2c_get_sda()
133 li2c->sda = 0x01; /* pin 0 */ in lsdc_create_i2c_chan()
136 li2c->sda = 0x04; /* pin 2 */ in lsdc_create_i2c_chan()
175 drm_info(ddev, "%s(sda pin mask=%u, scl pin mask=%u) created\n", in lsdc_create_i2c_chan()
176 adapter->name, li2c->sda, li2c->scl); in lsdc_create_i2c_chan()
/openbmc/linux/Documentation/admin-guide/device-mapper/
H A Ddm-ebs.rst42 Emulate 1 sector = 512 bytes logical block size on /dev/sda starting at
45 ebs /dev/sda 1024 1
47 Emulate 2 sector = 1KiB logical block size on /dev/sda starting at
49 This presumes 2KiB logical blocksize on /dev/sda or less to work:
51 ebs /dev/sda 128 2 4
/openbmc/linux/drivers/hwmon/
H A Dmax31760.c46 struct sensor_device_attribute sda; member
414 struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr); in lut_show() local
419 ret = regmap_read(state->regmap, REG_LUT(sda->index), &regval); in lut_show()
430 struct sensor_device_attribute *sda = to_sensor_dev_attr(devattr); in lut_store() local
439 ret = regmap_write(state->regmap, REG_LUT(sda->index), pwm); in lut_store()
490 struct sensor_device_attribute *sda; in max31760_create_lut_nodes() local
495 sda = &lut->sda; in max31760_create_lut_nodes()
500 sda->dev_attr.attr.mode = 0644; in max31760_create_lut_nodes()
501 sda->index = i; in max31760_create_lut_nodes()
502 sda->dev_attr.show = lut_show; in max31760_create_lut_nodes()
[all …]
H A Demc1403.c38 struct sensor_device_attribute *sda = to_sensor_dev_attr(attr); in temp_show() local
43 retval = regmap_read(data->regmap, sda->index, &val); in temp_show()
52 struct sensor_device_attribute_2 *sda = to_sensor_dev_attr_2(attr); in bit_show() local
57 retval = regmap_read(data->regmap, sda->nr, &val); in bit_show()
60 return sprintf(buf, "%d\n", !!(val & sda->index)); in bit_show()
66 struct sensor_device_attribute *sda = to_sensor_dev_attr(attr); in temp_store() local
73 retval = regmap_write(data->regmap, sda->index, in temp_store()
83 struct sensor_device_attribute_2 *sda = to_sensor_dev_attr_2(attr); in bit_store() local
91 retval = regmap_update_bits(data->regmap, sda->nr, sda->index, in bit_store()
92 val ? sda->index : 0); in bit_store()
[all …]
/openbmc/linux/arch/arm/mach-sa1100/
H A Dassabet.c116 #define SDA GPIO_GPIO(15) macro
124 GPSR = SDA; in adv7171_start()
126 GPCR = SDA; in adv7171_start()
133 GPSR = SDA; in adv7171_stop()
145 GPSR = SDA; in adv7171_send()
147 GPCR = SDA; in adv7171_send()
154 GPSR = SDA; in adv7171_send()
156 GPDR &= ~SDA; in adv7171_send()
159 if (GPLR & SDA) in adv7171_send()
162 GPCR = SCK | SDA; in adv7171_send()
[all …]
/openbmc/openbmc/poky/meta-selftest/recipes-test/images/
H A Dwic-image-minimal.wks5 part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
6 part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
7 part /media --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label uuid-…
8 part /mnt --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label core --…
/openbmc/linux/arch/riscv/boot/dts/starfive/
H A Djh7100-common.dtsi111 i2c-sda-hold-time-ns = <300>;
112 i2c-sda-falling-time-ns = <500>;
131 i2c-sda-hold-time-ns = <300>;
132 i2c-sda-falling-time-ns = <100>;
141 i2c-sda-hold-time-ns = <300>;
142 i2c-sda-falling-time-ns = <500>;
/openbmc/linux/drivers/i2c/algos/
H A Di2c-algo-bit.c117 /* assert: scl, sda are high */ in i2c_start()
185 /* read ack: SDA should be pulled down by slave, or it may in i2c_outb()
187 * Always report ACK if SDA is write-only. in i2c_outb()
189 ack = !adap->getsda || !getsda(adap); /* ack: sda is pulled low -> success */ in i2c_outb()
195 /* assert: scl is low (sda undef) */ in i2c_outb()
234 int scl, sda, ret; in test_bus() local
243 pr_info("%s: SDA is write-only, testing not possible\n", name); in test_bus()
247 sda = adap->getsda ? getsda(adap) : 1; in test_bus()
249 if (!scl || !sda) { in test_bus()
250 pr_warn("%s: bus seems to be busy (scl=%d, sda=%d)\n", name, scl, sda); in test_bus()
[all …]
/openbmc/linux/arch/arc/boot/dts/
H A Dabilis_tb101_dvk.dts37 i2c-sda-hold-time-ns = <432>;
40 i2c-sda-hold-time-ns = <432>;
43 i2c-sda-hold-time-ns = <432>;
46 i2c-sda-hold-time-ns = <432>;
49 i2c-sda-hold-time-ns = <432>;
H A Dabilis_tb100_dvk.dts37 i2c-sda-hold-time-ns = <432>;
40 i2c-sda-hold-time-ns = <432>;
43 i2c-sda-hold-time-ns = <432>;
46 i2c-sda-hold-time-ns = <432>;
49 i2c-sda-hold-time-ns = <432>;
/openbmc/u-boot/arch/arm/include/asm/mach-imx/
H A Dmxc_i2c.h19 struct i2c_pin_ctrl sda; member
36 * sda-gpio: specify the gpio related to SDA pin
69 .sda = { \
81 .sda = { \
/openbmc/linux/include/linux/platform_data/
H A Di2c-gpio.h15 * @sda_is_open_drain: SDA is configured as open drain, i.e. the pin
19 * @sda_is_output_only: SDA output drivers can't be turned off.
20 * This is for clients that can only read SDA/SCL.
21 * @sda_has_no_pullup: SDA is used in a non-compliant way and has no pull-up.

12345678910>>...28