summaryrefslogtreecommitdiff
path: root/drivers/i2c/soft_i2c.c
Commit message (Collapse)AuthorAgeLines
* i2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEEDMarek Vasut2013-08-03-4/+4
| | | | | | | | | | | | | | | | In case only the CONFIG_SYS_I2C_SPEED is set in configuration file, the CONFIG_SYS_I2C_SOFT_SPEED is defined as CONFIG_SYS_I2C_SPEED. The CONFIG_SYS_I2C_SOFT_SPEED is then used throughout the driver. Unfortunatelly, due to a typo in the driver, instead of defining CONFIG_SYS_I2C_SOFT_SPEED, an CONFIG_SYS_SOFT_I2C_SPEED was defined and therefore the driver failed to compile. The same applies for CONFIG_SYS_I2C_SOFT_SLAVE , where the swap happens as well. This patch fixes the issue. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Heiko Schocher <hs@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini2013-07-24-47/+57
|\ | | | | | | | | | | | | | | | | | | | | The sandburst-specific i2c drivers have been deleted, conflict was just over the SPDX conversion. Conflicts: board/sandburst/common/ppc440gx_i2c.c board/sandburst/common/ppc440gx_i2c.h Signed-off-by: Tom Rini <trini@ti.com>
| * i2c, soft-i2c: switch to new multibus/multiadapter supportHeiko Schocher2013-07-23-47/+57
| | | | | | | | | | | | | | | | | | - added to soft_i2c driver new multibus/multiadpater support - adapted all config files, which uses this driver Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stephen Warren <swarren@wwwdotorg.org>
* | Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-17/+1
|/ | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* soft_i2c: add necessary includes for AVR32Andreas Bießmann2012-12-11-0/+3
| | | | Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
* arm: Remove support for lpc2292Marek Vasut2012-10-26-3/+0
| | | | | | This stuff has been rotting in the tree for a year now. Remove it. Signed-off-by: Marek Vasut <marex@denx.de>
* console: Squelch pre-console output in console functionsGraeme Russ2011-10-01-1/+0
| | | | | | | | | | There are some locations in the code which anticipate printf() being called before the console is ready by squelching printf() on gd->have_console. Move this squelching into printf(), vprintf(), puts() and putc(). Also make tstc() and getc() return 0 if console is not yet initialised Signed-off-by: Graeme Russ <graeme.russ@gmail.com> Tested-by: Simon Glass <sjg@chromium.org>
* i2c, soft_i2c: deblock bus if switching to another i2c busHeiko Schocher2011-04-28-0/+1
| | | | | | | | | | | | Deblock i2c bus when switching to another i2c bus, if using i2c_set_bus_num(). Signed-off-by: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de> cc: Detlev Zundel <dzu@denx.de> cc: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
* Fix at91 includes in soft_i2c driverRyan Mallon2011-01-27-3/+1
| | | | | | | | Make at91 header includes in soft_i2c depend only on CONFIG_AT91FAMILY rather than individual SoCs. Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> Acked-by: Reinhard Meyer<u-boot@emk-elektronik.de>
* i2c: soft_i2c: add simple GPIO implementationMike Frysinger2010-07-22-0/+52
| | | | | | | | | | | Since the vast majority of GPIO I2C implementations behave the same way, support the common GPIO framework with default settings. This adds two new defines CONFIG_SOFT_I2C_GPIO_{SCL,SDA} so that boards which want GPIO I2C support need only define these. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Tested-by: Thomas Chou <thomas@wytron.com.tw>
* convert common files to new SoC accessJens Scharsig2010-02-12-5/+6
| | | | | | | | * add's a warning to all files, which need update to new SoC access * convert common files in cpu/../at91 and a lot of drivers to use c stucture SoC access Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
* at91: Extended soft_i2c driver for AT91SAM9263 SoCDaniel Gorsulowski2009-11-23-0/+5
| | | | | | | | While hard_i2c support is not available (see http://lists.denx.de/pipermail/u-boot/2009-March/049751.html), this patch enables soft_i2c on AT91SAM9263 SoC. Signed-off-by: Daniel Gorsulowski <Daniel.Gorsulowski@esd.eu>
* i2c: Create common default i2c_[set|get]_bus_speed() functionsPeter Tyser2009-06-12-14/+0
| | | | | | | | | | | | | New default, weak i2c_get_bus_speed() and i2c_set_bus_speed() functions replace a number of architecture-specific implementations. Also, providing default functions will allow all boards to enable CONFIG_I2C_CMD_TREE. This was previously not possible since the tree-form of the i2c command provides the ability to display and modify the i2c bus speed which requires i2c_[set|get]_bus_speed() to be present. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* soft_i2c.c compiler/linker errorJens Scharsig2009-03-31-5/+1
| | | | | | | | | | | | | | | | This patch fix the compiler/linker errors common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed' common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed' if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef (wrong define order) and removes additional empty lines Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
* 8xx: add support for new keymile kmsupx4 board.Heiko Schocher2009-03-18-1/+1
| | | | | | | | | | | | | This patch adds support for the kmsupx4 board from Keymile, based on a Freescale MPC852T CPU - serial console on SMC1 - 32 MB SDRAM - 32 MB NOR Flash - Ethernet over SCC3 - I2C Bitbang Signed-off-by: Heiko Schocher <hs@denx.de>
* soft_i2c.c add option for repeated start in i2c_read()Andrew Dyer2009-01-27-1/+11
| | | | | | | | | | | | | | | | This patch adds a #define to optionally change the behaviour of i2c_read() in soft_i2c.c to send an I2C repeated start instead of a stop-start between sending the device address pointer write and reading back the data. The current behaviour is retained as the default. While most devices will work either way, I have a smart battery(*) that requires repeated start, and someone at some point found a device that required a stop-start. (*) http://www.inspired-energy.com/Standard_Products/NL2054/NL2054%20Rev1.0%20Data%20Sheet.pdf Signed-off-by: Andrew Dyer <adyer@righthandtech.com>
* Coding style cleanup, update CHANGELOG.Wolfgang Denk2008-12-16-1/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* i2c: merge all i2c_reg_read() and i2c_reg_write() into inline functionsTimur Tabi2008-12-15-19/+0
| | | | | | | | | | All implementations of the functions i2c_reg_read() and i2c_reg_write() are identical. We can save space and simplify the code by converting these functions into inlines and putting them in i2c.h. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-By: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Section name should be ".data", not "data"Trent Piepho2008-12-09-1/+1
| | | | | Signed-off-by: Trent Piepho <tpiepho@freescale.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* mgsuvd: fix compiler warning when using soft_i2c driverHeiko Schocher2008-10-18-0/+4
| | | | Signed-off-by: Heiko Schocher <hs@denx.de>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-9/+9
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* I2C: adding new "i2c bus" Command to the I2C Subsystem.Heiko Schocher2008-10-18-1/+14
| | | | | | | With this Command it is possible to add new I2C Busses, which are behind 1 .. n I2C Muxes. Details see README. Signed-off-by: Heiko Schocher <hs@denx.de>
* soft_i2c: Add CFG_I2C_INIT_BOARD optionHeiko Schocher2008-10-18-0/+11
| | | | | | | This patch adds the option for a boardspecific I2C deblocking mechanism for the soft i2c driver. Signed-off-by: Heiko Schocher <hs@denx.de>
* soft_i2c: prevent compiler warnings if driver does not use CPU Pins.Heiko Schocher2008-10-18-37/+6
| | | | | | | | | | | | | | | | | | | | | This patch fixes the following warnings, when using the soft_i2c driver using no CPU pins on MPC82xx or MPC8xx systems: soft_i2c.c: In function 'send_reset': soft_i2c.c:93: warning: unused variable 'immr' soft_i2c.c: In function 'send_start': soft_i2c.c:124: warning: unused variable 'immr' soft_i2c.c: In function 'send_stop': soft_i2c.c:146: warning: unused variable 'immr' soft_i2c.c: In function 'send_ack': soft_i2c.c:171: warning: unused variable 'immr' soft_i2c.c: In function 'write_byte': soft_i2c.c:196: warning: unused variable 'immr' soft_i2c.c: In function 'read_byte': soft_i2c.c:244: warning: unused variable 'immr' Signed-off-by: Heiko Schocher <hs@denx.de>
* i2c: add CONFIG_I2C_MULTI_BUS for soft_i2c and mpc8260 i2c driver.Heiko Schocher2008-10-18-0/+36
| | | | Signed-off-by: Heiko Schocher <hs@denx.de>
* soft_i2c: move to drivers/i2cJean-Christophe PLAGNIOL-VILLARD2008-08-29-0/+423
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>