Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc: add support for bmp18x chips to the bmp085 driver

The bmp18x chip family comes in an I2C respectively SPI variant.
Hence, the bmp085 driver was split to support both buses.

Tested-by: Zhengguang Guo <zhengguang.guo@bosch-sensortec.com>
Reviewed-by: Stefan Nilsson <stefan.nilsson@unixphere.com>
Signed-off-by: Eric Andersson <eric.andersson@unixphere.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Eric Andersson and committed by
Greg Kroah-Hartman
985087db c5a86ab6

+306 -100
+22 -4
drivers/misc/Kconfig
··· 452 452 still useful. 453 453 454 454 config BMP085 455 - tristate "BMP085 digital pressure sensor" 455 + bool 456 + depends on SYSFS 457 + 458 + config BMP085_I2C 459 + tristate "BMP085 digital pressure sensor on I2C" 460 + select BMP085 461 + select REGMAP_I2C 456 462 depends on I2C && SYSFS 457 463 help 458 - If you say yes here you get support for the Bosch Sensortec 459 - BMP085 digital pressure sensor. 464 + Say Y here if you want to support Bosch Sensortec's digital pressure 465 + sensor hooked to an I2C bus. 460 466 461 467 To compile this driver as a module, choose M here: the 462 - module will be called bmp085. 468 + module will be called bmp085-i2c. 469 + 470 + config BMP085_SPI 471 + tristate "BMP085 digital pressure sensor on SPI" 472 + select BMP085 473 + select REGMAP_SPI 474 + depends on SPI_MASTER && SYSFS 475 + help 476 + Say Y here if you want to support Bosch Sensortec's digital pressure 477 + sensor hooked to an SPI bus. 478 + 479 + To compile this driver as a module, choose M here: the 480 + module will be called bmp085-spi. 463 481 464 482 config PCH_PHUB 465 483 tristate "Intel EG20T PCH/LAPIS Semicon IOH(ML7213/ML7223/ML7831) PHUB"
+2
drivers/misc/Makefile
··· 11 11 obj-$(CONFIG_ATMEL_SSC) += atmel-ssc.o 12 12 obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib.o 13 13 obj-$(CONFIG_BMP085) += bmp085.o 14 + obj-$(CONFIG_BMP085_I2C) += bmp085-i2c.o 15 + obj-$(CONFIG_BMP085_SPI) += bmp085-spi.o 14 16 obj-$(CONFIG_ICS932S401) += ics932s401.o 15 17 obj-$(CONFIG_LKDTM) += lkdtm.o 16 18 obj-$(CONFIG_TIFM_CORE) += tifm_core.o
+91
drivers/misc/bmp085-i2c.c
··· 1 + /* 2 + * Copyright (c) 2012 Bosch Sensortec GmbH 3 + * Copyright (c) 2012 Unixphere AB 4 + * 5 + * This program is free software; you can redistribute it and/or modify 6 + * it under the terms of the GNU General Public License as published by 7 + * the Free Software Foundation; either version 2 of the License, or 8 + * (at your option) any later version. 9 + * 10 + * This program is distributed in the hope that it will be useful, 11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 + * GNU General Public License for more details. 14 + * 15 + * You should have received a copy of the GNU General Public License 16 + * along with this program; if not, write to the Free Software 17 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 + */ 19 + 20 + #include <linux/module.h> 21 + #include <linux/i2c.h> 22 + #include <linux/err.h> 23 + #include "bmp085.h" 24 + 25 + #define BMP085_I2C_ADDRESS 0x77 26 + 27 + static const unsigned short normal_i2c[] = { BMP085_I2C_ADDRESS, 28 + I2C_CLIENT_END }; 29 + 30 + static int bmp085_i2c_detect(struct i2c_client *client, 31 + struct i2c_board_info *info) 32 + { 33 + if (client->addr != BMP085_I2C_ADDRESS) 34 + return -ENODEV; 35 + 36 + return bmp085_detect(&client->dev); 37 + } 38 + 39 + static int __devinit bmp085_i2c_probe(struct i2c_client *client, 40 + const struct i2c_device_id *id) 41 + { 42 + int err; 43 + struct regmap *regmap = devm_regmap_init_i2c(client, 44 + &bmp085_regmap_config); 45 + 46 + if (IS_ERR(regmap)) { 47 + err = PTR_ERR(regmap); 48 + dev_err(&client->dev, "Failed to init regmap: %d\n", err); 49 + return err; 50 + } 51 + 52 + return bmp085_probe(&client->dev, regmap); 53 + } 54 + 55 + static int bmp085_i2c_remove(struct i2c_client *client) 56 + { 57 + return bmp085_remove(&client->dev); 58 + } 59 + 60 + static const struct of_device_id bmp085_of_match[] = { 61 + { .compatible = "bosch,bmp085", }, 62 + { }, 63 + }; 64 + MODULE_DEVICE_TABLE(of, bmp085_of_match); 65 + 66 + static const struct i2c_device_id bmp085_id[] = { 67 + { BMP085_NAME, 0 }, 68 + { "bmp180", 0 }, 69 + { } 70 + }; 71 + MODULE_DEVICE_TABLE(i2c, bmp085_id); 72 + 73 + static struct i2c_driver bmp085_i2c_driver = { 74 + .driver = { 75 + .owner = THIS_MODULE, 76 + .name = BMP085_NAME, 77 + .of_match_table = bmp085_of_match 78 + }, 79 + .id_table = bmp085_id, 80 + .probe = bmp085_i2c_probe, 81 + .remove = __devexit_p(bmp085_i2c_remove), 82 + 83 + .detect = bmp085_i2c_detect, 84 + .address_list = normal_i2c 85 + }; 86 + 87 + module_i2c_driver(bmp085_i2c_driver); 88 + 89 + MODULE_AUTHOR("Eric Andersson <eric.andersson@unixphere.com>"); 90 + MODULE_DESCRIPTION("BMP085 I2C bus driver"); 91 + MODULE_LICENSE("GPL");
+91
drivers/misc/bmp085-spi.c
··· 1 + /* 2 + * Copyright (c) 2012 Bosch Sensortec GmbH 3 + * Copyright (c) 2012 Unixphere AB 4 + * 5 + * This program is free software; you can redistribute it and/or modify 6 + * it under the terms of the GNU General Public License as published by 7 + * the Free Software Foundation; either version 2 of the License, or 8 + * (at your option) any later version. 9 + * 10 + * This program is distributed in the hope that it will be useful, 11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 + * GNU General Public License for more details. 14 + * 15 + * You should have received a copy of the GNU General Public License 16 + * along with this program; if not, write to the Free Software 17 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 + */ 19 + 20 + #include <linux/module.h> 21 + #include <linux/spi/spi.h> 22 + #include <linux/err.h> 23 + #include "bmp085.h" 24 + 25 + static int __devinit bmp085_spi_probe(struct spi_device *client) 26 + { 27 + int err; 28 + struct regmap *regmap; 29 + 30 + client->bits_per_word = 8; 31 + err = spi_setup(client); 32 + if (err < 0) { 33 + dev_err(&client->dev, "spi_setup failed!\n"); 34 + return err; 35 + } 36 + 37 + regmap = devm_regmap_init_spi(client, &bmp085_regmap_config); 38 + if (IS_ERR(regmap)) { 39 + err = PTR_ERR(regmap); 40 + dev_err(&client->dev, "Failed to init regmap: %d\n", err); 41 + return err; 42 + } 43 + 44 + return bmp085_probe(&client->dev, regmap); 45 + } 46 + 47 + static int bmp085_spi_remove(struct spi_device *client) 48 + { 49 + return bmp085_remove(&client->dev); 50 + } 51 + 52 + static const struct of_device_id bmp085_of_match[] = { 53 + { .compatible = "bosch,bmp085", }, 54 + { }, 55 + }; 56 + MODULE_DEVICE_TABLE(of, bmp085_of_match); 57 + 58 + static const struct spi_device_id bmp085_id[] = { 59 + { "bmp180", 0 }, 60 + { "bmp181", 0 }, 61 + { } 62 + }; 63 + MODULE_DEVICE_TABLE(spi, bmp085_id); 64 + 65 + static struct spi_driver bmp085_spi_driver = { 66 + .driver = { 67 + .owner = THIS_MODULE, 68 + .name = BMP085_NAME, 69 + .of_match_table = bmp085_of_match 70 + }, 71 + .id_table = bmp085_id, 72 + .probe = bmp085_spi_probe, 73 + .remove = __devexit_p(bmp085_spi_remove) 74 + }; 75 + 76 + static int __init bmp085_spi_init(void) 77 + { 78 + return spi_register_driver(&bmp085_spi_driver); 79 + } 80 + 81 + static void __exit bmp085_spi_exit(void) 82 + { 83 + spi_unregister_driver(&bmp085_spi_driver); 84 + } 85 + 86 + MODULE_AUTHOR("Eric Andersson <eric.andersson@unixphere.com>"); 87 + MODULE_DESCRIPTION("BMP085 SPI bus driver"); 88 + MODULE_LICENSE("GPL"); 89 + 90 + module_init(bmp085_spi_init); 91 + module_exit(bmp085_spi_exit);
+67 -96
drivers/misc/bmp085.c
··· 2 2 * Copyright (c) 2012 Bosch Sensortec GmbH 3 3 * Copyright (c) 2012 Unixphere AB 4 4 * 5 - * This driver supports the bmp085 digital barometric pressure 6 - * and temperature sensor from Bosch Sensortec. The datasheet 7 - * is available from their website: 5 + * This driver supports the bmp085 and bmp18x digital barometric pressure 6 + * and temperature sensors from Bosch Sensortec. The datasheets 7 + * are available from their website: 8 8 * http://www.bosch-sensortec.com/content/language1/downloads/BST-BMP085-DS000-05.pdf 9 + * http://www.bosch-sensortec.com/content/language1/downloads/BST-BMP180-DS000-07.pdf 9 10 * 10 11 * A pressure measurement is issued by reading from pressure0_input. 11 12 * The return value ranges from 30000 to 110000 pascal with a resulution ··· 48 47 #include <linux/module.h> 49 48 #include <linux/device.h> 50 49 #include <linux/init.h> 51 - #include <linux/i2c.h> 52 50 #include <linux/slab.h> 53 51 #include <linux/delay.h> 54 52 #include <linux/of.h> 53 + #include "bmp085.h" 55 54 56 - #define BMP085_NAME "bmp085" 57 - #define BMP085_I2C_ADDRESS 0x77 58 55 #define BMP085_CHIP_ID 0x55 59 - 60 56 #define BMP085_CALIBRATION_DATA_START 0xAA 61 57 #define BMP085_CALIBRATION_DATA_LENGTH 11 /* 16 bit values */ 62 58 #define BMP085_CHIP_ID_REG 0xD0 ··· 65 67 #define BMP085_CONVERSION_REGISTER_XLSB 0xF8 66 68 #define BMP085_TEMP_CONVERSION_TIME 5 67 69 68 - static const unsigned short normal_i2c[] = { BMP085_I2C_ADDRESS, 69 - I2C_CLIENT_END }; 70 - 71 70 struct bmp085_calibration_data { 72 71 s16 AC1, AC2, AC3; 73 72 u16 AC4, AC5, AC6; ··· 73 78 }; 74 79 75 80 struct bmp085_data { 76 - struct i2c_client *client; 81 + struct device *dev; 82 + struct regmap *regmap; 77 83 struct mutex lock; 78 84 struct bmp085_calibration_data calibration; 79 85 u8 oversampling_setting; ··· 86 90 s32 b6; /* calculated temperature correction coefficient */ 87 91 }; 88 92 89 - static s32 bmp085_read_calibration_data(struct i2c_client *client) 93 + static s32 bmp085_read_calibration_data(struct bmp085_data *data) 90 94 { 91 95 u16 tmp[BMP085_CALIBRATION_DATA_LENGTH]; 92 - struct bmp085_data *data = i2c_get_clientdata(client); 93 96 struct bmp085_calibration_data *cali = &(data->calibration); 94 - s32 status = i2c_smbus_read_i2c_block_data(client, 95 - BMP085_CALIBRATION_DATA_START, 96 - (BMP085_CALIBRATION_DATA_LENGTH << 1), 97 - (u8 *)tmp); 97 + s32 status = regmap_bulk_read(data->regmap, 98 + BMP085_CALIBRATION_DATA_START, (u8 *)tmp, 99 + (BMP085_CALIBRATION_DATA_LENGTH << 1)); 98 100 if (status < 0) 99 101 return status; 100 - 101 - if (status != (BMP085_CALIBRATION_DATA_LENGTH << 1)) 102 - return -EIO; 103 102 104 103 cali->AC1 = be16_to_cpu(tmp[0]); 105 104 cali->AC2 = be16_to_cpu(tmp[1]); ··· 116 125 s32 status; 117 126 118 127 mutex_lock(&data->lock); 119 - status = i2c_smbus_write_byte_data(data->client, BMP085_CTRL_REG, 120 - BMP085_TEMP_MEASUREMENT); 128 + status = regmap_write(data->regmap, BMP085_CTRL_REG, 129 + BMP085_TEMP_MEASUREMENT); 121 130 if (status < 0) { 122 - dev_err(&data->client->dev, 131 + dev_err(data->dev, 123 132 "Error while requesting temperature measurement.\n"); 124 133 goto exit; 125 134 } 126 135 msleep(BMP085_TEMP_CONVERSION_TIME); 127 136 128 - status = i2c_smbus_read_i2c_block_data(data->client, 129 - BMP085_CONVERSION_REGISTER_MSB, sizeof(tmp), (u8 *)&tmp); 130 - if (status < 0) 131 - goto exit; 132 - if (status != sizeof(tmp)) { 133 - dev_err(&data->client->dev, 137 + status = regmap_bulk_read(data->regmap, BMP085_CONVERSION_REGISTER_MSB, 138 + &tmp, sizeof(tmp)); 139 + if (status < 0) { 140 + dev_err(data->dev, 134 141 "Error while reading temperature measurement result\n"); 135 - status = -EIO; 136 142 goto exit; 137 143 } 138 144 data->raw_temperature = be16_to_cpu(tmp); ··· 147 159 s32 status; 148 160 149 161 mutex_lock(&data->lock); 150 - status = i2c_smbus_write_byte_data(data->client, BMP085_CTRL_REG, 162 + status = regmap_write(data->regmap, BMP085_CTRL_REG, 151 163 BMP085_PRESSURE_MEASUREMENT + 152 164 (data->oversampling_setting << 6)); 153 165 if (status < 0) { 154 - dev_err(&data->client->dev, 166 + dev_err(data->dev, 155 167 "Error while requesting pressure measurement.\n"); 156 168 goto exit; 157 169 } ··· 160 172 msleep(2+(3 << data->oversampling_setting)); 161 173 162 174 /* copy data into a u32 (4 bytes), but skip the first byte. */ 163 - status = i2c_smbus_read_i2c_block_data(data->client, 164 - BMP085_CONVERSION_REGISTER_MSB, 3, ((u8 *)&tmp)+1); 165 - if (status < 0) 166 - goto exit; 167 - if (status != 3) { 168 - dev_err(&data->client->dev, 175 + status = regmap_bulk_read(data->regmap, BMP085_CONVERSION_REGISTER_MSB, 176 + ((u8 *)&tmp)+1, 3); 177 + if (status < 0) { 178 + dev_err(data->dev, 169 179 "Error while reading pressure measurement results\n"); 170 - status = -EIO; 171 180 goto exit; 172 181 } 173 182 data->raw_pressure = be32_to_cpu((tmp)); ··· 289 304 struct device_attribute *attr, 290 305 const char *buf, size_t count) 291 306 { 292 - struct i2c_client *client = to_i2c_client(dev); 293 - struct bmp085_data *data = i2c_get_clientdata(client); 307 + struct bmp085_data *data = dev_get_drvdata(dev); 294 308 unsigned long oversampling; 295 309 int err = kstrtoul(buf, 10, &oversampling); 296 310 ··· 306 322 static ssize_t show_oversampling(struct device *dev, 307 323 struct device_attribute *attr, char *buf) 308 324 { 309 - struct i2c_client *client = to_i2c_client(dev); 310 - struct bmp085_data *data = i2c_get_clientdata(client); 325 + struct bmp085_data *data = dev_get_drvdata(dev); 311 326 312 327 return sprintf(buf, "%u\n", bmp085_get_oversampling(data)); 313 328 } ··· 319 336 { 320 337 int temperature; 321 338 int status; 322 - struct i2c_client *client = to_i2c_client(dev); 323 - struct bmp085_data *data = i2c_get_clientdata(client); 339 + struct bmp085_data *data = dev_get_drvdata(dev); 324 340 325 341 status = bmp085_get_temperature(data, &temperature); 326 342 if (status < 0) ··· 335 353 { 336 354 int pressure; 337 355 int status; 338 - struct i2c_client *client = to_i2c_client(dev); 339 - struct bmp085_data *data = i2c_get_clientdata(client); 356 + struct bmp085_data *data = dev_get_drvdata(dev); 340 357 341 358 status = bmp085_get_pressure(data, &pressure); 342 359 if (status < 0) ··· 357 376 .attrs = bmp085_attributes, 358 377 }; 359 378 360 - static int bmp085_detect(struct i2c_client *client, struct i2c_board_info *info) 379 + int bmp085_detect(struct device *dev) 361 380 { 362 - if (client->addr != BMP085_I2C_ADDRESS) 363 - return -ENODEV; 381 + struct bmp085_data *data = dev_get_drvdata(dev); 382 + unsigned int id; 383 + int ret; 364 384 365 - if (i2c_smbus_read_byte_data(client, BMP085_CHIP_ID_REG) != BMP085_CHIP_ID) 385 + ret = regmap_read(data->regmap, BMP085_CHIP_ID_REG, &id); 386 + if (ret < 0) 387 + return ret; 388 + 389 + if (id != data->chip_id) 366 390 return -ENODEV; 367 391 368 392 return 0; 369 393 } 394 + EXPORT_SYMBOL_GPL(bmp085_detect); 370 395 371 - static void __init bmp085_get_of_properties(struct i2c_client *client, 372 - struct bmp085_data *data) 396 + static void __init bmp085_get_of_properties(struct bmp085_data *data) 373 397 { 374 398 #ifdef CONFIG_OF 375 - struct device_node *np = client->dev.of_node; 399 + struct device_node *np = data->dev->of_node; 376 400 u32 prop; 377 401 378 402 if (!np) ··· 394 408 #endif 395 409 } 396 410 397 - static int bmp085_init_client(struct i2c_client *client) 411 + static int bmp085_init_client(struct bmp085_data *data) 398 412 { 399 - struct bmp085_data *data = i2c_get_clientdata(client); 400 - int status = bmp085_read_calibration_data(client); 413 + int status = bmp085_read_calibration_data(data); 401 414 402 415 if (status < 0) 403 416 return status; 404 417 405 418 /* default settings */ 406 - data->client = client; 407 419 data->chip_id = BMP085_CHIP_ID; 408 420 data->last_temp_measurement = 0; 409 421 data->temp_measurement_period = 1*HZ; 410 422 data->oversampling_setting = 3; 411 423 412 - bmp085_get_of_properties(client, data); 424 + bmp085_get_of_properties(data); 413 425 414 426 mutex_init(&data->lock); 415 427 416 428 return 0; 417 429 } 418 430 419 - static int __devinit bmp085_probe(struct i2c_client *client, 420 - const struct i2c_device_id *id) 431 + struct regmap_config bmp085_regmap_config = { 432 + .reg_bits = 8, 433 + .val_bits = 8 434 + }; 435 + EXPORT_SYMBOL_GPL(bmp085_regmap_config); 436 + 437 + __devinit int bmp085_probe(struct device *dev, struct regmap *regmap) 421 438 { 422 439 struct bmp085_data *data; 423 440 int err = 0; ··· 431 442 goto exit; 432 443 } 433 444 434 - i2c_set_clientdata(client, data); 445 + dev_set_drvdata(dev, data); 446 + data->dev = dev; 447 + data->regmap = regmap; 435 448 436 449 /* Initialize the BMP085 chip */ 437 - err = bmp085_init_client(client); 450 + err = bmp085_init_client(data); 438 451 if (err < 0) 439 452 goto exit_free; 440 453 454 + err = bmp085_detect(dev); 455 + if (err < 0) { 456 + dev_err(dev, "%s: chip_id failed!\n", BMP085_NAME); 457 + goto exit_free; 458 + } 459 + 441 460 /* Register sysfs hooks */ 442 - err = sysfs_create_group(&client->dev.kobj, &bmp085_attr_group); 461 + err = sysfs_create_group(&dev->kobj, &bmp085_attr_group); 443 462 if (err) 444 463 goto exit_free; 445 464 446 - dev_info(&client->dev, "Successfully initialized %s!\n", BMP085_NAME); 465 + dev_info(dev, "Successfully initialized %s!\n", BMP085_NAME); 447 466 448 467 return 0; 449 468 ··· 460 463 exit: 461 464 return err; 462 465 } 466 + EXPORT_SYMBOL_GPL(bmp085_probe); 463 467 464 - static int __devexit bmp085_remove(struct i2c_client *client) 468 + int bmp085_remove(struct device *dev) 465 469 { 466 - struct bmp085_data *data = i2c_get_clientdata(client); 470 + struct bmp085_data *data = dev_get_drvdata(dev); 467 471 468 - sysfs_remove_group(&client->dev.kobj, &bmp085_attr_group); 472 + sysfs_remove_group(&data->dev->kobj, &bmp085_attr_group); 469 473 kfree(data); 470 474 471 475 return 0; 472 476 } 473 - 474 - static const struct of_device_id bmp085_of_match[] = { 475 - { .compatible = "bosch,bmp085", }, 476 - { }, 477 - }; 478 - MODULE_DEVICE_TABLE(of, bmp085_of_match); 479 - 480 - static const struct i2c_device_id bmp085_id[] = { 481 - { BMP085_NAME, 0 }, 482 - { } 483 - }; 484 - MODULE_DEVICE_TABLE(i2c, bmp085_id); 485 - 486 - static struct i2c_driver bmp085_driver = { 487 - .driver = { 488 - .owner = THIS_MODULE, 489 - .name = BMP085_NAME, 490 - .of_match_table = bmp085_of_match 491 - }, 492 - .id_table = bmp085_id, 493 - .probe = bmp085_probe, 494 - .remove = __devexit_p(bmp085_remove), 495 - 496 - .detect = bmp085_detect, 497 - .address_list = normal_i2c 498 - }; 499 - 500 - module_i2c_driver(bmp085_driver); 477 + EXPORT_SYMBOL_GPL(bmp085_remove); 501 478 502 479 MODULE_AUTHOR("Christoph Mair <christoph.mair@gmail.com>"); 503 480 MODULE_DESCRIPTION("BMP085 driver");
+33
drivers/misc/bmp085.h
··· 1 + /* 2 + * Copyright (c) 2012 Bosch Sensortec GmbH 3 + * Copyright (c) 2012 Unixphere AB 4 + * 5 + * This program is free software; you can redistribute it and/or modify 6 + * it under the terms of the GNU General Public License as published by 7 + * the Free Software Foundation; either version 2 of the License, or 8 + * (at your option) any later version. 9 + * 10 + * This program is distributed in the hope that it will be useful, 11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 + * GNU General Public License for more details. 14 + * 15 + * You should have received a copy of the GNU General Public License 16 + * along with this program; if not, write to the Free Software 17 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 + */ 19 + 20 + #ifndef _BMP085_H 21 + #define _BMP085_H 22 + 23 + #include <linux/regmap.h> 24 + 25 + #define BMP085_NAME "bmp085" 26 + 27 + extern struct regmap_config bmp085_regmap_config; 28 + 29 + int bmp085_probe(struct device *dev, struct regmap *regmap); 30 + int bmp085_remove(struct device *dev); 31 + int bmp085_detect(struct device *dev); 32 + 33 + #endif