9
0
Fork 0
Commit Graph

36 Commits

Author SHA1 Message Date
Sascha Hauer 45d593bc5e Merge branch 'for-next/mips' 2014-07-04 17:26:05 +02:00
Antony Pavlov 3ad9434f2f i2c: i2c_gpio: add devicetree support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-25 08:34:48 +02:00
Antony Pavlov daa3e125ab i2c: versatile: add devicetree support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-23 08:45:55 +02:00
Lucas Stach bcd83cc862 i2c: add Tegra driver
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 14:17:12 +02:00
Sascha Hauer c9b67dc0f3 i2c: i.MX: move to earlier initcall
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-28 08:45:11 +01:00
Sascha Hauer ed039cd72b Merge branch 'for-next/omap-drivers' 2013-12-06 08:23:27 +01:00
Sascha Hauer 7f5b61ab14 i2c: omap: Add devicetree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 15:35:12 +01:00
Sascha Hauer b67b2671c2 treewide: Add missing includes
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:04 +01:00
Jan Weitzel 0abb8a6c2a i2c-omap: fix reported revison
Report correct major and minor revision
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 11:13:10 +02:00
Sascha Hauer fc15b013b3 i2c: omap: remove unncessary printf
A printf in the driver should be dev_* and contain useful information.
Both is not the case, remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 16:25:55 +02:00
Jan Weitzel c988b8bf7f i2c-omap: Update driver
The driver didn't work well with at24 driver. NACKS are lost.
Errors are lost in isr due to the local variable err. Also we didn't wait for
bus free in omap_i2c_xfer_msg.

Fix issues and get other improvements from linux kernel

Tested on OMAP4 and AM335x

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 16:24:37 +02:00
Jan Weitzel aaf6fdce2f i2c-omap: fix am33xx and omap3 fclk_rate
commit f64ed12b accidentally swap fclk_rate from am33xx and omap3.
Revert this change.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-31 12:03:25 +02:00
Teresa Gámez f64ed12bb6 i2c-omap: Remove cpu_is functions completely
This patch removes the call of the cpu_is_* functions completely
and uses id_tables instead.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-23 20:35:22 +02:00
Teresa Gámez 5e7c87a269 ARM: AM33xx: Add i2c support for AM33xx
Added device register functions and cpu_is_am33xx()
function.
Adapted the i2c-omap driver. AM335x has a lower
clock rate and the timeout of polling the isr function
had to be increased.

Based on a patch from Shravan Kumar <shravan.k@phytec.in>.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 08:05:54 +02:00
Teresa Gámez 15f011138a i2c-omap: cleanup cpu_is functions
cpu_is_omap2430() is set when CONFIG_ARCH_OMAP is enabled.
This fits for all OMAP/AM33xx boards supported in barebox.
Cleaned up all conditions that use the cpu_is_omap2430().
Also removed some unused defines.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 08:05:54 +02:00
Sascha Hauer 711b4ae3f0 i2c: fsl: Add devicetree probe support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 15:53:11 +02:00
Alexander Shiyan 6a256321b8 Use new device_platform_driver() macro for drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Jean-Christophe PLAGNIOL-VILLARD fcbb4c7472 i2c: add versatile support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD 32a9da73c2 i2c: add i2c-gpio support
Based on linux 3.7-rc2

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0e9a078d20 i2c: adapter: register it's own device
so we can show the this of i2c busses
set the bus device as parent of all devices.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:53 +01:00
Sascha Hauer 93fbc1ce22 i2c i.MX: fixup clock support for powerpc
This produced a warning on powerpc since the conversion to common clk support
on i.MX.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 17:49:44 +02:00
Sascha Hauer 94de405d8f Merge branch 'for-next/imx-clk' 2012-10-04 15:24:57 +02:00
Sascha Hauer 8a67a0a035 i2c i.MX: Switch to clock support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:57 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
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>
2012-09-17 10:57:41 +02:00
Renaud Barbier f8e0d68214 i2c: adapt the i2c-imx driver to mpc85xx machines
A function to calculate the frequency divider and digital filter sampling rate
for the 85xx processors is added to the i2c-imx driver. Hence, this driver is
usable on IMX and 85xx machines.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 11:16:48 +02:00
Renaud Barbier b977801ac1 IMX driver: replace imx -> fsl
The IMX i2c driver is to be used by SOCs on both the ARM and PPC architetures.
Use a more neutral name for the structure, function names and #define.
The driver name is now "i2c-fsl".

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 11:16:48 +02:00
Sascha Hauer f97a4b0c53 I2C i.MX: disable driver for i.MX1
Although the driver could work on this hardware, i.MX1 support
currently lacks the necessary clocks resulting in linker errors.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:28 +02:00
Alexander Aring 8007b25bdf i2c-omap: add i2c omap4 support
Added i2c support for omap4. Tested on pcm049.

Driver based on linux kernel implementation.
Also added a shift to access 16-bit registers
to make support for OMAP730/850 possible.

If accessing a non existing slave the bus will go into arbitration mode.
It's unable to recover from it.

Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-21 12:46:01 +01:00
Rosen Kolev 502ecda2d1 Allow data-only i2c transfers
Modified the i2c_imx driver to support data-only transfers, without
command byte.  This allows to construct more complex i2c transfers
and support non genuine devices like Atmel ATxx secure memory, where the
master reads data after a write command.

Signed-off-by: Rosen Kolev <rosen.kolev@amk-drives.bg>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-07 15:42:48 +02:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Jean-Christophe PLAGNIOL-VILLARD 39b599cb6b i2c: convert to struct resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-23 13:52:19 +08:00
Sascha Hauer 426a70d8d9 i2c i.MX: convert to struct resource
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-19 00:12:50 +08:00
Eric Bénard 2f07c8f415 i2c-imx: sync with kernel's driver
strange behaviour was observed with actual driver : bus lock, probe of
absent adresses, wrong data read.
This patch sync the driver with linux's one and after a few tests, we
don't see anymore strange behaviour (tested on i.MX27).

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Marc Reilly <marc@cpdesign.com.au>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-14 10:05:12 +01:00
Marc Reilly b82ee742d0 i2c-imx: wait for STOP before disabling controller
Makes sure that the STOP condition is transmitted before the I2C
controller is disabled.
This fixes a problem where writing to an external EEPROM was not working
because the EEPROM waits until the STOP before initiating the write
internally.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-01 10:01:14 +02:00
Jean-Christophe PLAGNIOL-VILLARD 6a0ce693be i2c: move busses to drivers/i2c/busses
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-20 08:57:22 +02:00