summaryrefslogtreecommitdiff
path: root/drivers/i2c/soft_i2c.c
AgeCommit message (Collapse)AuthorFilesLines
2011-04-28i2c, soft_i2c: deblock bus if switching to another i2c busHeiko Schocher1-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>
2011-01-27Fix at91 includes in soft_i2c driverRyan Mallon1-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>
2010-07-22i2c: soft_i2c: add simple GPIO implementationMike Frysinger1-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>
2010-02-12convert common files to new SoC accessJens Scharsig1-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>
2009-11-23at91: Extended soft_i2c driver for AT91SAM9263 SoCDaniel Gorsulowski1-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>
2009-06-12i2c: Create common default i2c_[set|get]_bus_speed() functionsPeter Tyser1-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>
2009-03-31soft_i2c.c compiler/linker errorJens Scharsig1-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>
2009-03-188xx: add support for new keymile kmsupx4 board.Heiko Schocher1-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>
2009-01-28soft_i2c.c add option for repeated start in i2c_read()Andrew Dyer1-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>
2008-12-16Coding style cleanup, update CHANGELOG.Wolfgang Denk1-1/+0
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-12-16i2c: merge all i2c_reg_read() and i2c_reg_write() into inline functionsTimur Tabi1-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>
2008-12-09Section name should be ".data", not "data"Trent Piepho1-1/+1
Signed-off-by: Trent Piepho <tpiepho@freescale.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-18mgsuvd: fix compiler warning when using soft_i2c driverHeiko Schocher1-0/+4
Signed-off-by: Heiko Schocher <hs@denx.de>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD1-9/+9
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18I2C: adding new "i2c bus" Command to the I2C Subsystem.Heiko Schocher1-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>
2008-10-18soft_i2c: Add CFG_I2C_INIT_BOARD optionHeiko Schocher1-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>
2008-10-18soft_i2c: prevent compiler warnings if driver does not use CPU Pins.Heiko Schocher1-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>
2008-10-18i2c: add CONFIG_I2C_MULTI_BUS for soft_i2c and mpc8260 i2c driver.Heiko Schocher1-0/+36
Signed-off-by: Heiko Schocher <hs@denx.de>
2008-08-29soft_i2c: move to drivers/i2cJean-Christophe PLAGNIOL-VILLARD1-0/+423
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>