lkml.org 
[lkml]   [2020]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/9] regulator: da9121: Add device variant details and respective regmaps
On Fri, Nov 20, 2020 at 12:14:54PM +0000, Adam Ward wrote:

> Add ability to probe device and validate configuration, then apply a regmap
> configuration for a single or dual buck device accordingly.

This looks like it might benefit from being multiple commits - "X then
Y" type commit logs are often a warning sign of this, it's quite
difficult to review as it's doing several different things.

> +static int da9121_i2c_reg_read(struct i2c_client *client, u8 addr,
> + u8 *buf, int count)
> +{
> + struct i2c_msg xfer[2];
> + int ret;

Why is this open coding register I/O?

> + name = of_get_property(chip->dev->of_node, "compatible", NULL);
> + if (!name) {
> + dev_err(chip->dev, "Cannot get device not compatible string.\n");
> + goto error;
> + }

You shouldn't need to query the compatible string as a property, why is
the code doing this? You know what compatible was used from probe().
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-11-20 13:49    [W:0.180 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site