lkml.org 
[lkml]   [2022]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [v3 12/13] iio: imu: add BNO055 I2C driver
On Thu, Feb 17, 2022 at 5:27 PM Andrea Merello <andrea.merello@gmail.com> wrote:
>
> This path adds an I2C driver for communicating to a BNO055 IMU via I2C
> bus and it enables the BNO055 core driver to work in this scenario.

...

> +#include <linux/i2c.h>
> +#include <linux/regmap.h>
> +#include <linux/module.h>

Keep it sorted?

...

> +static int bno055_i2c_probe(struct i2c_client *client,
> + const struct i2c_device_id *id)

You may switch it to use ->probe_new() (you may leave I2C ID table for
possibility to instantiate this via user space).

...

> + struct regmap *regmap =
> + devm_regmap_init_i2c(client, &bno055_regmap_config);

Please, split the definition and assignment.

> + if (IS_ERR(regmap)) {
> + dev_err(&client->dev, "Unable to init register map");
> + return PTR_ERR(regmap);

return dev_err_probe(...);

...

> + .probe = bno055_i2c_probe,
> + .id_table = bno055_i2c_id

Missed comma.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-02-21 21:33    [W:0.226 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site