Lines Matching +full:buffered +full:- +full:negative

1 // SPDX-License-Identifier: GPL-2.0+
25 * matches at least half of the data sheets :-/.
30 * Many non-memory chips have multiple registers and {addr} is used
31 * as the register index. Some non-memory chips have only one register
42 * successive reads using the I2C auto-incrementing memory pointer.
44 * If you are manipulating a large memory with 2-byte addresses, use
95 * When multiple buses are present, the list is an array of bus-address
126 #define DEFAULT_ADDR_LEN (-1)
156 return -ENODEV; in i2c_get_cur_bus()
163 return -ENODEV; in i2c_get_cur_bus()
185 * i2c_init_board() - Board-specific I2C bus init
187 * This function is the default no-op implementation of I2C bus
188 * initialization. This function can be overridden by board-specific
196 /* TODO: Implement architecture-specific get/set functions */
199 * i2c_get_bus_speed() - Return I2C bus speed
212 * TODO: Implement architecture-specific get/set functions
222 * i2c_set_bus_speed() - Configure I2C bus speed
232 * Returns zero on success, negative value on error.
238 return -1; in i2c_set_bus_speed()
245 * get_alen() - Small parser helper function to get address length
257 alen = arg[j+1] - '0'; in get_alen()
279 * do_i2c_read() - Handle the "i2c read" command-line command
282 * @argc: Command-line argument count
283 * @argv: Array of command-line arguments
285 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
312 * 2 bytes long. Some day it might be 3 bytes long :-). in do_i2c_read()
331 if (!ret && alen != -1) in do_i2c_read()
371 * 2 bytes long. Some day it might be 3 bytes long :-). in do_i2c_write()
385 if (!ret && alen != -1) in do_i2c_write()
394 if (argc == 6 && !strcmp(argv[5], "-s")) { in do_i2c_write()
402 i2c_chip->flags &= ~DM_I2C_CHIP_WR_ADDRESS; in do_i2c_write()
411 * Repeated addressing - perform <length> separate in do_i2c_write()
414 while (length-- > 0) { in do_i2c_write()
416 i2c_chip->flags |= DM_I2C_CHIP_WR_ADDRESS; in do_i2c_write()
498 * do_i2c_md() - Handle the "i2c md" command-line command
501 * @argc: Command-line argument count
502 * @argv: Array of command-line arguments
504 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
544 * 2 bytes long. Some day it might be 3 bytes long :-). in do_i2c_md()
561 if (!ret && alen != -1) in do_i2c_md()
605 nbytes -= linebytes; in do_i2c_md()
617 * do_i2c_mw() - Handle the "i2c mw" command-line command
620 * @argc: Command-line argument count
621 * @argv: Array of command-line arguments
623 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
659 if (!ret && alen != -1) in do_i2c_mw()
677 while (count-- > 0) { in do_i2c_mw()
701 * do_i2c_crc() - Handle the "i2c crc32" command-line command
704 * @argc: Command-line argument count
705 * @argv: Array of command-line arguments
709 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
747 if (!ret && alen != -1) in do_i2c_crc()
757 printf ("CRC32 for %08lx ... %08lx ==> ", addr, addr + count - 1); in do_i2c_crc()
764 while (count-- > 0) { in do_i2c_crc()
784 * mod_i2c_mem() - Handle the "i2c mm" and "i2c nm" command-line command
787 * @argc: Command-line argument count
788 * @argv: Array of command-line arguments
792 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
848 if (!ret && alen != -1) in mod_i2c_mem()
856 * the next value. A non-converted value exits. in mod_i2c_mem()
889 else if (nbytes == -2) in mod_i2c_mem()
901 nbytes = endp - console_buffer; in mod_i2c_mem()
934 * do_i2c_probe() - Handle the "i2c probe" command-line command
937 * @argc: Command-line argument count
938 * @argv: Array of command-line arguments
940 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
951 int addr = -1; in do_i2c_probe()
1009 * do_i2c_loop() - Handle the "i2c loop" command-line command
1012 * @argc: Command-line argument count
1013 * @argv: Array of command-line arguments
1015 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
1020 * {length} - Number of bytes to read
1021 * {delay} - A DECIMAL number and defaults to 1000 uSec
1053 if (!ret && alen != -1) in do_i2c_loop()
1178 " Buffered DQMB inputs\n", in do_sdram()
1179 " On-card PLL\n", in do_sdram()
1181 " Buffered address/control lines\n" in do_sdram()
1390 printf ("Min clock delay, back-to-back random column addresses " in do_sdram()
1567 ((data[32] >> 4) & 0x0F) - 10, data[32] & 0x0F); in do_sdram()
1575 (data[32] & 0x80) ? '-' : '+', in do_sdram()
1585 ((data[33] >> 4) & 0x0F) - 10, data[33] & 0x0F); in do_sdram()
1593 (data[33] & 0x80) ? '-' : '+', in do_sdram()
1605 (data[34] & 0x80) ? '-' : '+', in do_sdram()
1617 (data[35] & 0x80) ? '-' : '+', in do_sdram()
1692 printf("Bus %d:\t%s", bus->req_seq, bus->name); in show_bus()
1694 printf(" (active %d)", bus->seq); in show_bus()
1702 chip->chip_addr, dev->name, chip->offset_len, in show_bus()
1703 chip->flags); in show_bus()
1709 * do_i2c_show_bus() - Handle the "i2c bus" command-line command
1712 * @argc: Command-line argument count
1713 * @argv: Array of command-line arguments
1737 printf("Bus %d:\t%s", i, I2C_ADAP_NR(i)->name); in do_i2c_show_bus()
1744 printf("->%s@0x%2x:%d", in do_i2c_show_bus()
1771 return -1; in do_i2c_show_bus()
1773 printf("Bus %d:\t%s", i, I2C_ADAP_NR(i)->name); in do_i2c_show_bus()
1779 printf("->%s@0x%2x:%d", in do_i2c_show_bus()
1794 * do_i2c_bus_num() - Handle the "i2c dev" command-line command
1797 * @argc: Command-line argument count
1798 * @argv: Array of command-line arguments
1800 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
1817 bus_no = bus->seq; in do_i2c_bus_num()
1819 bus_no = -1; in do_i2c_bus_num()
1829 return -1; in do_i2c_bus_num()
1847 * do_i2c_bus_speed() - Handle the "i2c speed" command-line command
1850 * @argc: Command-line argument count
1851 * @argv: Array of command-line arguments
1853 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
1890 * do_i2c_mm() - Handle the "i2c mm" command-line command
1893 * @argc: Command-line argument count
1894 * @argv: Array of command-line arguments
1896 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
1905 * do_i2c_nm() - Handle the "i2c nm" command-line command
1908 * @argc: Command-line argument count
1909 * @argv: Array of command-line arguments
1911 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
1920 * do_i2c_reset() - Handle the "i2c reset" command-line command
1923 * @argc: Command-line argument count
1924 * @argv: Array of command-line arguments
1940 i2c_init(I2C_ADAP->speed, I2C_ADAP->slaveaddr); in do_i2c_reset()
1989 * do_i2c() - Handle the "i2c" command-line command
1992 * @argc: Command-line argument count
1993 * @argv: Array of command-line arguments
1995 * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
2010 argc--; in do_i2c()
2016 return c->cmd(cmdtp, flag, argc, argv); in do_i2c()
2025 "bus [muxtype:muxaddr:muxchannel] - show I2C bus info\n"
2028 "crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
2031 "i2c dev [dev] - show or set current I2C bus\n"
2034 "i2c edid chip - print EDID configuration information\n"
2036 "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n"
2037 "i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n"
2038 "i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n"
2039 "i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
2040 "i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
2041 "i2c probe [address] - test for and show device(s) on the I2C bus\n"
2042 "i2c read chip address[.0, .1, .2] length memaddress - read to memory\n"
2043 "i2c write memaddress chip address[.0, .1, .2] length [-s] - write memory\n"
2044 " to I2C; the -s option selects bulk write in a single transaction\n"
2046 "i2c flags chip [flags] - set or get chip flags\n"
2047 "i2c olen chip [offset_length] - set or get chip offset length\n"
2049 "i2c reset - re-init the I2C Controller\n"
2051 "i2c sdram chip - print SDRAM configuration information\n"
2053 "i2c speed [speed] - show or set I2C bus speed";
2058 "I2C sub-system",