[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vezc+ieFE23unzNdcz5YeuduOO7OJWyS=HvEUAE4=x7Ag@mail.gmail.com>
Date: Mon, 21 Feb 2022 21:32:00 +0100
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Andrea Merello <andrea.merello@...il.com>
Cc: jic23@...nel.org, mchehab+huawei@...nel.org,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, lars@...afoo.de, robh+dt@...nel.org,
matt.ranostay@...sulko.com, ardeleanalex@...il.com,
jacopo@...ndi.org, Andrea Merello <andrea.merello@....it>
Subject: Re: [v3 12/13] iio: imu: add BNO055 I2C driver
On Thu, Feb 17, 2022 at 5:27 PM Andrea Merello <andrea.merello@...il.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
Powered by blists - more mailing lists