| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * BMI160 - Bosch IMU, I2C bits |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2016, Intel Corporation. |
|---|
| 5 | | - * |
|---|
| 6 | | - * This file is subject to the terms and conditions of version 2 of |
|---|
| 7 | | - * the GNU General Public License. See the file COPYING in the main |
|---|
| 8 | | - * directory of this archive for more details. |
|---|
| 9 | 6 | * |
|---|
| 10 | 7 | * 7-bit I2C slave address is: |
|---|
| 11 | 8 | * - 0x68 if SDO is pulled to GND |
|---|
| .. | .. |
|---|
| 27 | 24 | |
|---|
| 28 | 25 | regmap = devm_regmap_init_i2c(client, &bmi160_regmap_config); |
|---|
| 29 | 26 | if (IS_ERR(regmap)) { |
|---|
| 30 | | - dev_err(&client->dev, "Failed to register i2c regmap %d\n", |
|---|
| 31 | | - (int)PTR_ERR(regmap)); |
|---|
| 27 | + dev_err(&client->dev, "Failed to register i2c regmap: %pe\n", |
|---|
| 28 | + regmap); |
|---|
| 32 | 29 | return PTR_ERR(regmap); |
|---|
| 33 | 30 | } |
|---|
| 34 | 31 | |
|---|
| .. | .. |
|---|
| 36 | 33 | name = id->name; |
|---|
| 37 | 34 | |
|---|
| 38 | 35 | return bmi160_core_probe(&client->dev, regmap, name, false); |
|---|
| 39 | | -} |
|---|
| 40 | | - |
|---|
| 41 | | -static int bmi160_i2c_remove(struct i2c_client *client) |
|---|
| 42 | | -{ |
|---|
| 43 | | - bmi160_core_remove(&client->dev); |
|---|
| 44 | | - |
|---|
| 45 | | - return 0; |
|---|
| 46 | 36 | } |
|---|
| 47 | 37 | |
|---|
| 48 | 38 | static const struct i2c_device_id bmi160_i2c_id[] = { |
|---|
| .. | .. |
|---|
| 72 | 62 | .of_match_table = of_match_ptr(bmi160_of_match), |
|---|
| 73 | 63 | }, |
|---|
| 74 | 64 | .probe = bmi160_i2c_probe, |
|---|
| 75 | | - .remove = bmi160_i2c_remove, |
|---|
| 76 | 65 | .id_table = bmi160_i2c_id, |
|---|
| 77 | 66 | }; |
|---|
| 78 | 67 | module_i2c_driver(bmi160_i2c_driver); |
|---|