2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-22 20:43:56 +08:00
linux-next/drivers/i2c/busses
Wolfram Sang c01b083105 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>
2008-04-22 22:16:46 +02:00
..
i2c-acorn.c make i2c-acorn tristate 2007-07-15 16:40:52 -07:00
i2c-ali15x3.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-ali1535.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-ali1563.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00
i2c-amd756-s4882.c i2c: Declare more i2c_adapter parent devices 2007-02-13 22:09:03 +01:00
i2c-amd756.c i2c-amd756: Fix off-by-one 2008-03-12 14:15:00 +01:00
i2c-amd8111.c i2c: Rename the PEC functionality bit 2007-10-13 23:56:33 +02:00
i2c-at91.c i2c: Spelling fixes 2008-01-14 21:53:30 +01:00
i2c-au1550.c i2c-au1550: Convert to platform driver 2008-01-27 18:14:52 +01:00
i2c-bfin-twi.c i2c-bfin-twi: Register adapter with a specific bus number 2008-01-27 18:14:52 +01:00
i2c-davinci.c i2c-davinci: Fix lost interrupt 2008-04-11 12:07:05 +02:00
i2c-elektor.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
i2c-gpio.c i2c-gpio: Initialize adapter class 2007-12-12 13:45:24 +01:00
i2c-hydra.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
i2c-i801.c i2c-i801: Add support for the ICH10 2008-02-24 20:03:42 +01:00
i2c-i810.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00
i2c-ibm_iic.c i2c-ibm_iic: Fast mode parm desc fixup 2008-04-11 12:07:04 +02:00
i2c-ibm_iic.h i2c-ibm_iic: Whitespace cleanup 2008-01-27 18:14:45 +01:00
i2c-iop3xx.c i2c: Don't uselessly set i2c_adapter.retries 2008-01-27 18:14:47 +01:00
i2c-iop3xx.h [PATCH] i2c-iop3xx: Avoid addressing self 2006-07-12 15:43:06 -07:00
i2c-ixp2000.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-mpc.c mpc-i2c: Propagate error values properly 2008-01-27 18:14:52 +01:00
i2c-mv64xxx.c [I2C] i2c-mv64xxx: Don't set i2c_adapter.retries 2008-01-26 15:04:01 +00:00
i2c-nforce2.c i2c-nforce2: The nForce2 can do block transactions 2008-01-27 18:14:44 +01:00
i2c-ocores.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
i2c-omap.c i2c-omap: Fix unhandled fault 2008-03-23 20:28:20 +01:00
i2c-parport-light.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
i2c-parport.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
i2c-parport.h i2c-parport: Add support for One For All remote JP1 interface 2007-02-13 22:09:02 +01:00
i2c-pasemi.c i2c-pasemi: use i2c_add_numbered_adapter() 2008-01-27 18:14:44 +01:00
i2c-pca-isa.c i2c-algo-pca: Extend for future drivers 2008-04-22 22:16:46 +02:00
i2c-piix4.c i2c-piix4: Drop redundant PCI function number check 2008-01-27 18:14:51 +01:00
i2c-pmcmsp.c i2c: Storage class should be before const qualifier 2008-02-24 20:03:42 +01:00
i2c-pnx.c Add missing newlines to some uses of dev_<level> messages 2007-10-18 14:37:28 -07:00
i2c-powermac.c i2c: Spelling fixes 2008-01-14 21:53:30 +01:00
i2c-prosavage.c i2c: Discard the i2c algo del_bus wrappers 2006-12-10 21:21:33 +01:00
i2c-pxa.c [ARM] pxa: separate GPIOs and their mode definitions to pxa2xx-gpio.h 2008-04-19 11:29:04 +01:00
i2c-s3c2410.c i2c-s3c2410: Build fix 2007-08-14 18:37:15 +02:00
i2c-savage4.c i2c-savage4: Delete many unused defines 2007-07-12 14:12:31 +02:00
i2c-sibyte.c i2c-sibyte: Remove the bus scan module parameter 2008-01-27 18:14:50 +01:00
i2c-simtec.c i2c: New Simtec I2C bus driver 2007-05-01 23:26:34 +02:00
i2c-sis96x.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-sis630.c Replace remaining references to "driverfs" with "sysfs". 2007-02-17 19:13:42 +01:00
i2c-sis5595.c i2c-sis5595: Resolve resource conflict with sis5595 2007-07-12 14:12:30 +02:00
i2c-stub.c i2c-stub: Use a single array for byte and word operations 2008-01-27 18:14:45 +01:00
i2c-taos-evm.c i2c: New bus driver for the TAOS evaluation modules 2007-07-12 14:12:31 +02:00
i2c-tiny-usb.c i2c-tiny-usb: New VID/PID pair 2008-04-11 12:07:05 +02:00
i2c-versatile.c i2c: New ARM Versatile/Realview bus driver 2006-12-10 21:21:32 +01:00
i2c-via.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
i2c-viapro.c i2c-viapro: Add support for the VT8237S 2008-01-27 18:14:51 +01:00
i2c-voodoo3.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00
Kconfig plat-orion: make i2c-mv64xxx available for all Orion families 2008-03-27 14:51:40 -04:00
Makefile i2c: some overdue driver removal 2008-01-27 18:14:46 +01:00
scx200_acb.c PCI: Remove users of pci_enable_device_bars() 2008-02-01 15:04:27 -08:00
scx200_i2c.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00