summaryrefslogtreecommitdiffstats
path: root/commands/i2c.c
Commit message (Collapse)AuthorAgeFilesLines
* commands: i2c: Listen for CTRL-C when probingAndrey Smirnov2017-01-101-1/+1
| | | | | | | | | Allow I2C bus probing to be interrupted early by sending CTRL-C. This is usefull when calling the tool without any arguments and one of the busses is misconfigured (waiting for 100+ failures is pretty inconvenient). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* documentation: i2c_read() does not expect any "DATA".Andreas Geisenhainer2016-04-281-1/+1
| | | | | | | Remove information about DATA from help text. Signed-off-by: Andreas Geisenhainer <Andreas.Geisenhainer@atsonline.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i2c_probe: fix wrong start and stop addressesMiquel Raynal2016-04-151-1/+1
| | | | | | | | | | This patch fixes the wrong range of i2c addresses used by the i2c_probe command when a stop address is provided. In this case the start address (startaddr) was taking the value of the stop address and the stop address (stopaddr) was always set to its default value. Signed-off-by: Miquel Raynal <raynal.miquel@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i2c_probe: Make command easier to work withSascha Hauer2015-11-191-19/+37
| | | | | | | | Instead of insisting on multiple parameters just use sane defaults. This allows us to scan all addresses on all busses which is normally what one wants to get an overview over devices on i2c busses. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: i2c: add message if write is not successfulSilvio Fricke2014-07-141-1/+5
| | | | | Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: i2c: simplify i2c wide access logicSilvio Fricke2014-07-141-4/+4
| | | | | Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: i2c: verbose option doesn't need argumentSilvio Fricke2014-07-141-2/+2
| | | | | Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: harmonize in-barebox documentationHolger Schurig2014-05-141-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does probably too much, but it's hard (and very cumbersome/time consuming) to break it out. What is does is this: * each command has one short description, e.g. "list MUX configuration" * made sure the short descriptions start lowercase * each command has one usage. That string contains just the options, e.g. "[-npn]". It's not part of the long help text. * that is, it doesn't say "[OPTIONS]" anymore, every usable option is listed by character in this (short) option string (the long description is in the long help text, as before) * help texts have been reworked, to make them - sometimes smaller - sometimes describe the options better - more often present themselves in a nicer format * all long help texts are now created with BUSYBOX_CMD_HELP_ macros, no more 'static const __maybe_unused char cmd_foobar_help[]' * made sure the long help texts starts uppercase * because cmdtp->name and cmdtp->opts together provide the new usage, all "Usage: foobar" texts have been removed from the long help texts * BUSYBOX_CMD_HELP_TEXT() provides the trailing newline by itself, this is nicer in the source code * BUSYBOX_CMD_HELP_OPT() provides the trailing newline by itself * made sure no line gets longer than 77 characters * delibertely renamed cmdtp->usage, so that we can get compile-time errors (e.g. in out-of-tree modules that use register_command() * the 'help' command can now always emit the usage, even without compiled long help texts * 'help -v' gives a list of commands with their short description, this is similar like the old "help" command before my patchset * 'help -a' gives out help of all commands Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: group 'help' outputHolger Schurig2014-05-141-0/+3
| | | | | | | | | | | | | | | | | | | The old output of "help" was just producing a long list, that usually scrolled of the screen (even on a X11 terminal). This list is more compact, and also sorted by groups. The old output format (plus grouping) is now available with 'help -v'. Example: Information commands: ?, devinfo, help, iomem, meminfo, version Boot commands: boot, bootm, go, loadb, loads, loadx, loady, saves, uimage ... Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: i2c: change 0X to 0xJan Luebbe2013-04-091-1/+1
| | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-4/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'master' into nextSascha Hauer2012-05-161-1/+1
|\
| * i2c: Fix barebox crash when 'count' is not set for i2c_read commandAlexander Shiyan2012-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | Running i2c_read without the 'count' setting causes an error and reboots. barebox@Phytec phyCORE-i.MX27:/ i2c_read -b 1 -a 0x4a -r 0x00 ERROR: out of memory no stack data available Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | i2c: Added switch for allowing usage 16bit register addressesAlexander Shiyan2012-05-131-9/+17
|/ | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: remove struct command pointer from commandsSascha Hauer2012-02-271-3/+3
| | | | | | This is unused in all commands and thus can be removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: add i2c commandsEric Bénard2010-05-261-0/+214
theses commands allow low level access to i2c bus and can be useful to setup an i2c device without having to add code, compile and flash barebox. Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>