diff mbox

sensors can't be detected on i2c-mpc

Message ID 20090609.102054.125129248.saito@densan.co.jp (mailing list archive)
State Rejected, archived
Headers show

Commit Message

Hideo Saito June 9, 2009, 1:20 a.m. UTC
sensors can't be detected on i2c-mpc

Hi all,

The sensors can't be detected on the built-in I2C interface on the Freescale's MPC processors on linux-2.6.29.
If it is not yet fixed, I think that it is forgotten to set the following values in the class.

Signed-off-by: Hideo Saito <hsaito.ppc@gmail.com>
---

Comments

Grant Likely June 9, 2009, 3:19 a.m. UTC | #1
On Mon, Jun 8, 2009 at 7:20 PM, Hide Saito<hsaito.ppc@gmail.com> wrote:
> sensors can't be detected on i2c-mpc
>
> Hi all,
>
> The sensors can't be detected on the built-in I2C interface on the Freescale's MPC processors on linux-2.6.29.
> If it is not yet fixed, I think that it is forgotten to set the following values in the class.
>
> Signed-off-by: Hideo Saito <hsaito.ppc@gmail.com>

Since i2c probing is hit and miss at best; Most MPCxxxx SPI busses get
the i2c bus topology out of the device tree file
(arch/powerpc/boot/dts/<board-name>.dts) and do not support probing.
If the i2c device you need is missing, then add a node to the .dts
file for the missing device (there are lots of examples of this in the
dts directory).

g.
diff mbox

Patch

--- drivers/i2c/busses/i2c-mpc.c.org	2009-03-24 08:12:14.000000000 +0900
+++ drivers/i2c/busses/i2c-mpc.c	2009-06-04 08:50:34.000000000 +0900
@@ -304,16 +304,17 @@  static u32 mpc_functionality(struct i2c_
 
 static const struct i2c_algorithm mpc_algo = {
 	.master_xfer = mpc_xfer,
 	.functionality = mpc_functionality,
 };
 
 static struct i2c_adapter mpc_ops = {
 	.owner = THIS_MODULE,
+	.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.name = "MPC adapter",
 	.algo = &mpc_algo,
 	.timeout = 1,
 };
 
 static int __devinit fsl_i2c_probe(struct of_device *op, const struct of_device_id *match)
 {
 	int result = 0;