From 1579fc067f6e4f958e06db6bf3d170b753cd36d0 Mon Sep 17 00:00:00 2001 From: Mike Looijmans Date: Mon, 16 Mar 2020 07:34:03 +0100 Subject: iio/gyro/bmg160: Add support for BMI088 chip The BMI088 is pin-compatible with the BMI055, and provides both gyro and accel functions. The gyro part is similar to the BMI055 and this adds the chip to the list of supported devices for the gyro part. The accel part of the chip is not compatible with anything existing already. Signed-off-by: Mike Looijmans Signed-off-by: Jonathan Cameron --- drivers/iio/gyro/bmg160_i2c.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/iio/gyro/bmg160_i2c.c') diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c index 4fc9c6a3321f..de15c6fc3381 100644 --- a/drivers/iio/gyro/bmg160_i2c.c +++ b/drivers/iio/gyro/bmg160_i2c.c @@ -42,6 +42,7 @@ static int bmg160_i2c_remove(struct i2c_client *client) static const struct acpi_device_id bmg160_acpi_match[] = { {"BMG0160", 0}, {"BMI055B", 0}, + {"BMI088B", 0}, {}, }; @@ -50,6 +51,7 @@ MODULE_DEVICE_TABLE(acpi, bmg160_acpi_match); static const struct i2c_device_id bmg160_i2c_id[] = { {"bmg160", 0}, {"bmi055_gyro", 0}, + {"bmi088_gyro", 0}, {} }; -- cgit v1.2.3-59-g8ed1b From 442140989f2d777d9cf02622c76f0ac8a4b891b3 Mon Sep 17 00:00:00 2001 From: Nishant Malpani Date: Sun, 22 Mar 2020 22:53:06 +0530 Subject: iio: gyro: bmg160_i2c: Use vsprintf extension %pe for symbolic error name Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging. Signed-off-by: Nishant Malpani Signed-off-by: Jonathan Cameron --- drivers/iio/gyro/bmg160_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/iio/gyro/bmg160_i2c.c') diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c index de15c6fc3381..b3fa46bd02cb 100644 --- a/drivers/iio/gyro/bmg160_i2c.c +++ b/drivers/iio/gyro/bmg160_i2c.c @@ -21,8 +21,8 @@ static int bmg160_i2c_probe(struct i2c_client *client, regmap = devm_regmap_init_i2c(client, &bmg160_regmap_i2c_conf); if (IS_ERR(regmap)) { - dev_err(&client->dev, "Failed to register i2c regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&client->dev, "Failed to register i2c regmap: %pe\n", + regmap); return PTR_ERR(regmap); } -- cgit v1.2.3-59-g8ed1b