[Gta04-owner] Using BMP085
Neil Jerram
neil at ossau.homelinux.net
Wed May 30 10:13:55 CEST 2012
Christoph Mair <christoph.mair at gmail.com> writes:
> On Fri, May 25, 2012 at 11:34 PM, Neil Jerram <neil at ossau.homelinux.net> wrote:
>> So is there a more correct fix that should go into the board file? (Or
>> possibly already has, since I'm still only running 3.2.0-gta04+.)
>
> IIRC there is already something in the board file but either it is not
> compiled in due to a wrong #ifdef or the entry is somehow wrong.
> You have to specify that there is a chip on I2C bus "2" at address
> "0x77" which can be controlled with the "bmp085" driver.. but I can't
> remember the correct code ;-)
The code in the board file looks plausible to me, and appears to contain
those details that you mentioned:
static struct i2c_board_info __initdata gta04_i2c2_boardinfo[] = {
...
#ifdef CONFIG_BMP085
{
I2C_BOARD_INFO("bmp085", 0x77),
.type = "bmp085",
.platform_data = &bmp085_info,
.irq = OMAP_GPIO_IRQ(BMP085_EOC_IRQ_GPIO),
},
#endif
...
}
However in my (which means NeilBrown's) kernel build, the BMP085 driver
is built as a module, and a search for CONFIG_BMP085 gives
./include/generated/autoconf.h:3596:#define CONFIG_BMP085_MODULE 1
but nothing that defines CONFIG_BMP085 without the trailing "_MODULE".
Is is the case that that board file code would only work if the BMP085
driver was built in?
Regards,
Neil
More information about the Gta04-owner
mailing list