On Thu, Feb 17, 2022 at 5:27 PM Andrea Merello <andrea.merello@xxxxxxxxx> 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