alistair23-linux/drivers/i2c
Wolfgang Grandegger f2bd5efe72 i2c: i2c-mpc: make I2C bus speed configurable
This patch makes the I2C bus speed configurable by using the I2C node
property "clock-frequency". If the property is not defined, the old
fixed clock settings will be used for backward comptibility.

The generic I2C clock properties, especially the CPU-specific source
clock pre-scaler are defined via the OF match table:

  static const struct of_device_id mpc_i2c_of_match[] = {
	...
	{.compatible = "fsl,mpc8543-i2c",
	 .data = &(struct fsl_i2c_match_data) {
			.setclock = mpc_i2c_setclock_8xxx,
			.prescaler = 2,
		},
	},

The "data" field defines the relevant I2C setclock function and the
relevant pre-scaler for the I2C source clock frequency.

It uses arch-specific tables and functions to determine resonable
Freqency Divider Register (fdr) values for MPC83xx, MPC85xx, MPC86xx,
MPC5200 and MPC5200B.

The i2c->flags field and the corresponding FSL_I2C_DEV_* definitions
have been removed as they are obsolete.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-07 10:18:47 +01:00
..
algos i2c: Delete unused i2c-algo-sgi helper module 2009-04-06 18:12:25 +02:00
busses i2c: i2c-mpc: make I2C bus speed configurable 2009-04-07 10:18:47 +01:00
chips Move the pcf8591 driver to hwmon 2009-03-30 21:46:43 +02:00
i2c-boardinfo.c
i2c-core.c i2c-core: Some style cleanups 2009-03-28 21:34:46 +01:00
i2c-core.h
i2c-dev.c i2c-dev: Clarify the unit of ioctl I2C_TIMEOUT 2009-02-24 19:19:49 +01:00
Kconfig
Makefile