[Gta04-owner] hmc5883 crash in 3.3
Andreas Kemnade
andreas at kemnade.info
Wed Apr 11 23:17:15 CEST 2012
Hi,
On Wed, 2012-04-11 at 20:57 +0200, Belisko Marek wrote:
> Hi,
>
> I finally setup my gta04 and using Neil's 3.3gta04 kernel.
> Just want to add hmc5883 support (can be used existing 5843 staging iio driver)
> with following patch (+ enable hmc5843):
> diff --git a/arch/arm/mach-omap2/board-omap3gta04.c
> b/arch/arm/mach-omap2/board-omap3gta04.c
> index c7e899c..67b46a0 100644
> --- a/arch/arm/mach-omap2/board-omap3gta04.c
> +++ b/arch/arm/mach-omap2/board-omap3gta04.c
> @@ -1003,6 +1003,12 @@ static struct i2c_board_info __initdata
> gta04_i2c2_boardinfo[] = {
> .type = "bma150",
> },
> #endif
> +#ifdef CONFIG_SENSORS_HMC5843
> +{
> + I2C_BOARD_INFO("hmc5843", 0x1E),
> + .type = "hmc5843",
> +}
> +#endif
> /* FIXME: add other drivers for HMC5883, BMA180, Si472x, Camera */
> };
>
For testing, the same can also be achieved using:
echo hmc5843 0x1e >/sys/bus/i2c/devices/i2c-2/new_device
> With change kernel gives oops during start:
>
> [ 14.508178] bus: 'i2c': add driver hmc5843
> [ 14.512634] bus: 'i2c': driver_probe_device: matched device 2-001e
> with driver hmc5843
> [ 14.521057] bus: 'i2c': really_probe: probing driver hmc5843 with
> device 2-001e
> [ 14.532257] HMC5843 initialized
> [ 14.535919] device: '(null)': device_add (null)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> This line is from added pr_info in:
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 74dda4f..74cecc0 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -973,6 +973,7 @@ int device_add(struct device *dev)
Hmm, looks like the pointer dev->p is somehow messed up.
>
> Can anybody give some light what I'm missing?
>
As I have tried the userspace way shown above and there is also the
same backtracke, I guess the problem should be really in the iio driver.
Greetings
Andreas Kemnade
More information about the Gta04-owner
mailing list