History log of /drivers/i2c/algos/i2c-algo-pca.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5694f8a888f8f69a562e4cf939eed81ca7a5ecf2 26-Mar-2012 Jean Delvare <khali@linux-fr.org> i2c: Update the FSF address

Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/i2c/algos/i2c-algo-pca.c
4403988afc0a92b8faf59b46f51d25fafaf0e63d 30-Oct-2011 Jean Delvare <khali@linux-fr.org> i2c-algo-pca: Return standard fault codes

Adjust i2c-algo-pca to return fault codes compliant with
Documentation/i2c/fault-codes, rather than the undocumented and
vague -EREMOTEIO.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Wolfram Sang <w.sang@pengutronix.de>
/drivers/i2c/algos/i2c-algo-pca.c
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
/drivers/i2c/algos/i2c-algo-pca.c
2086ca482f89950410527425913ca48d948e9622 21-May-2010 Farid Hammane <farid.hammane@gmail.com> i2c-algo-pca: Fix coding style issues

Fix up some coding style issues. i2c-algo-pca.c has been built
successfully after applying this patch and the binary object is
still exactly the same. Other issues found by checkpatch.pl were
voluntarily not fixed, either to keep readability, or because of
false positive errors.

Signed-off-by: Farid Hammane <farid.hammane@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/i2c/algos/i2c-algo-pca.c
eec74a257f0a695688ba44c0f6c1e92dc81459be 02-Mar-2010 Jean Delvare <khali@linux-fr.org> i2c-algo-pca: Drop duplicate variable

Thanks to -Wshadow.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
/drivers/i2c/algos/i2c-algo-pca.c
2196d1cf4afab93fb64c2e5b417096e49b661612 05-May-2009 Enrik Berkhan <Enrik.Berkhan@ge.com> i2c-algo-pca: Let PCA9564 recover from unacked data byte (state 0x30)

Currently, the i2c-algo-pca driver does nothing if the chip enters state
0x30 (Data byte in I2CDAT has been transmitted; NOT ACK has been
received). Thus, the i2c bus connected to the controller gets stuck
afterwards.

I have seen this kind of error on a custom board in certain load
situations most probably caused by interference or noise.

A possible reaction is to let the controller generate a STOP condition.
This is documented in the PCA9564 data sheet (2006-09-01) and the same
is done for other NACK states as well.

Further, state 0x38 isn't handled completely, either. Try to do another
START in this case like the data sheet says. As this couldn't be tested,
I've added a comment to try to reset the chip if the START doesn't help
as suggested by Wolfram Sang.

Signed-off-by: Enrik Berkhan <Enrik.Berkhan@ge.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/i2c/algos/i2c-algo-pca.c
c454dee21d589476608957ca4f57feaabde62fab 13-Apr-2009 Jean Delvare <khali@linux-fr.org> i2c-algo-pca: Fix use of uninitialized variable in debug message

A recent change broke debugging of pca_xfer(), fix it.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
/drivers/i2c/algos/i2c-algo-pca.c
2378bc09b91b0702fac7823828a614fd8016a29f 28-Mar-2009 Wolfram Sang <w.sang@pengutronix.de> i2c-algo-pca: Use timeout for checking the state machine

We now timeout also if the state machine does not change within the
given time. For that, the driver-specific completion-functions are
extended to return true or false depending on the timeout. This then
gets checked in the algorithm.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/i2c/algos/i2c-algo-pca.c
8e99ada8deaa9033600cd2c7d0a9366b0e99ab68 28-Mar-2009 Wolfram Sang <w.sang@pengutronix.de> i2c-algo-pca: Rework waiting for a free bus

Waiting for a free bus now accepts the timeout value in jiffies and does
proper checking using time_before.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/i2c/algos/i2c-algo-pca.c
eff9ec95efaaf6b12d230f0ea7d3c295d3bc9d57 28-Mar-2009 Marco Aurelio da Costa <costa@gamic.com> i2c-algo-pca: Add PCA9665 support

Add support for the PCA9665 I2C controller.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/i2c/algos/i2c-algo-pca.c
bac3e7c2aa2575a1c71f6fa643499676ca7c12c3 28-Mar-2009 Frank Seidel <frank@f-seidel.de> i2c: Adapt debug macros for KERN_* constants

According to kerneljanitors todo list all printk calls (beginning
a new line) should have an according KERN_* constant.
Those are the changes to the debug macros in the i2c subsystem
to meet this requirement. Also changing no-debug statements
to raw printks again.

Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
/drivers/i2c/algos/i2c-algo-pca.c
c80ebe7987931ec4e80abc33ebf8aa2dad0d3763 14-Jul-2008 Wolfram Sang <w.sang@pengutronix.de> i2c-pca-algo: Fix error code

Give a more concrete error code, when the bus is not idle.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/i2c/algos/i2c-algo-pca.c
c01b0831057381c7f6e0bfb3634bac8c5f7fb256 22-Apr-2008 Wolfram Sang <w.sang@pengutronix.de> i2c-algo-pca: Extend for future drivers

The separation between algorithm and adapter was unsharp at places. This was
partly hidden by the fact, that the ISA-driver allowed just one instance and
had all private data in static variables. This patch makes neccessary
preparations to add a platform driver on top of the algorithm, while still
supporting ISA. Note: Due to lack of hardware, the ISA-driver could not be
tested except that it builds.

Concerning the core struct i2c_algo_pca_data:

- A private data field was added, all hardware dependant data may go here.
Similar to other algorithms, now a pointer to this data is passed to the
adapter's functions. In order to make as less changes as possible to the
ISA-driver, it leaves the private data empty and still only uses its static
variables.

- A "reset_chip" function pointer was added; such a functionality must come
from the adapter, not the algorithm.

- use a variable "i2c_clock" instead of a function pointer "get_clock",
allowing for write access to a default in case a wrong value was supplied.

In the algorithm-file:

- move "i2c-pca-algo.h" into "linux/i2c-algo-pca.h"
- now using per_instance timeout values (i2c_adap->timeout)
- error messages specify the device, not only the driver name
- restructure initialization to easily support "i2c_add_numbered_adapter"
- drop "retries" and "own" (i2c address) as they were unused

(The state-machine for I2C-communication was not touched.)

In the ISA-driver:

- adapt to new algorithm

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/i2c/algos/i2c-algo-pca.c
3d4382913f9a86f0d9ff47740feb427415fe7234 22-Apr-2008 Wolfram Sang <w.sang@pengutronix.de> i2c-algo-pca: Remove trailing whitespaces and unnecessary UTF

Remove trailing whitespaces to make further patches more readable. Also remove
an unnecessary UTF-char for simplicity ("us" for microseconds is fine enough).

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/i2c/algos/i2c-algo-pca.c
96de0e252cedffad61b3cb5e05662c591898e69a 19-Oct-2007 Jan Engelhardt <jengelh@gmx.de> Convert files to UTF-8 and some cleanups

* Convert files to UTF-8.

* Also correct some people's names
(one example is Eißfeldt, which was found in a source file.
Given that the author used an ß at all in a source file
indicates that the real name has in fact a 'ß' and not an 'ss',
which is commonly used as a substitute for 'ß' when limited to
7bit.)

* Correct town names (Goettingen -> Göttingen)

* Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313)

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
/drivers/i2c/algos/i2c-algo-pca.c
3269711b76ba27b78862c48398b0d313ccaa99c2 10-Dec-2006 Jean Delvare <khali@linux-fr.org> i2c: Discard the i2c algo del_bus wrappers

They are all only calling i2c_del_adapter, so we may as well do
it directly.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/i2c/algos/i2c-algo-pca.c
9e11a9fbfe48a2f65188aae64bf4f690e40ea2f4 03-Sep-2006 Jean Delvare <khali@linux-fr.org> i2c: Constify i2c_algorithm declarations, part 1

i2c: Constify i2c_algorithm declarations, part 1

Make struct i2c_algorithm declarations const in all i2c algorithm
drivers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/i2c/algos/i2c-algo-pca.c
b39ad0cf7c19fc14e8f823b1b36245f7a3711655 01-Jul-2006 Mark M. Hoffman <mhoffman@lightlink.com> [PATCH] i2c: Handle i2c_add_adapter failure in i2c algorithm drivers

Content-Disposition: inline; filename=i2c-algo-error-handling-fix.patch

It is possible for i2c_add_adapter() to fail. Several I2C algorithm
drivers ignore that fact. This (compile-tested only) patch fixes them.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/i2c/algos/i2c-algo-pca.c
605070952f0b41caaa211c47b02eeac703529008 25-Sep-2005 Jean Delvare <khali@linux-fr.org> [PATCH] i2c: Discard explicit static initializations to 0

Kill explicit static initializations to 0 in 10 i2c drivers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

drivers/i2c/algos/i2c-algo-pca.c | 2 +-
drivers/i2c/algos/i2c-algo-sibyte.c | 2 +-
drivers/i2c/busses/i2c-ali15x3.c | 4 ++--
drivers/i2c/busses/i2c-amd756.c | 2 +-
drivers/i2c/busses/i2c-iop3xx.c | 2 +-
drivers/i2c/busses/i2c-piix4.c | 8 ++++----
drivers/i2c/busses/i2c-sis5595.c | 4 ++--
drivers/i2c/busses/i2c-sis630.c | 2 +-
drivers/i2c/busses/i2c-sis96x.c | 2 +-
drivers/i2c/busses/i2c-via.c | 2 +-
10 files changed, 15 insertions(+), 15 deletions(-)
/drivers/i2c/algos/i2c-algo-pca.c
c7a46533ff7ef9e1c51bae6e54208527c5275b24 11-Aug-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: Kill i2c_algorithm.id (5/7)

Merge the algorithm id part (16 upper bits) of the i2c adapters ids
into the definition of the adapters ids directly. After that, we don't
need to OR both ids together for each i2c_adapter structure.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/i2c/algos/i2c-algo-pca.c
1d8b9e1bad35fa3ea829990b9056c2a257d8fe79 11-Aug-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: Kill i2c_algorithm.id (4/7)

There are no more users of i2c_algorithm.id, so we can finally drop
this structure member.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/i2c/algos/i2c-algo-pca.c
87c3d7a8bc0ff5c8d4481e509b407b6be1859925 11-Aug-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: Kill i2c_algorithm.id (3/7)

Don't rely on i2c_algorithm.id to alter the i2c adapter's id, use the
I2C_ALGO_* value directly instead, because i2c_algorithm will soon
have no id member no more.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/i2c/algos/i2c-algo-pca.c
975185880d55676b1352047e82a0cb84173c6c28 11-Aug-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: Kill i2c_algorithm.name (1/7)

The name member of the i2c_algorithm is never used, although all
drivers conscientiously fill it. We can drop it completely, this
structure doesn't need to have a name.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/i2c/algos/i2c-algo-pca.c
48edcb65ddcd93b6421831ad133599aacea9724a 10-Aug-2005 Ian Campbell <icampbell@arcom.com> [PATCH] I2C: i2c-algo-pca -- gracefully handle a busy bus

I've been running with this patch for a while now, and while I've never
seen it trigger except with buggy hardware I think it is a cleaner way
to handle a busy bus. I had -EBUSY until about 10 minutes ago but -EIO
seems to be what most of the existing algo drivers will return in the
same circumstances.

Signed-off-by: Ian Campbell <icampbell@arcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/i2c/algos/i2c-algo-pca.c
46b615f453202dbcf66452b500ab69c0e2148593 19-May-2005 Tobias Klauser <tklauser@nuerscht.ch> [PATCH] I2C: Spelling fixes for drivers/i2c/algos/i2c-algo-pca.c

This patch fixes the some misspellings and a trailing whitespace in
the comments.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/i2c/algos/i2c-algo-pca.c
44bbe87e9017efa050bb1b506c6822f1f3bb94d7 04-May-2005 Steven Cole <elenstev@mesatop.com> [PATCH] Spelling fixes for drivers/i2c.

Here are some spelling corrections for drivers/i2c.

occured -> occurred
intialization -> initialization
Everytime -> Every time
transfering -> transferring
relevent -> relevant
continous -> continuous
neccessary -> necessary
explicitely -> explicitly
Celcius -> Celsius
differenciate -> differentiate

Signed-off-by: Steven Cole <elenstev@mesatop.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/i2c/algos/i2c-algo-pca.c
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
/drivers/i2c/algos/i2c-algo-pca.c