lkml.org 
[lkml]   [2018]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] iio: magnetometer: mag3110: add optional vcc regulator operation support
Hi Anson,

On Thu, Dec 6, 2018 at 3:05 AM Anson Huang <anson.huang@nxp.com> wrote:

> static int mag3110_request(struct mag3110_data *data)
> @@ -469,17 +471,27 @@ static int mag3110_probe(struct i2c_client *client,
> struct iio_dev *indio_dev;
> int ret;
>
> + indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
> + if (!indio_dev)
> + return -ENOMEM;
> +
> + data = iio_priv(indio_dev);
> +
> + data->vcc_reg = devm_regulator_get_optional(&client->dev, "vcc");
> + if (!IS_ERR(data->vcc_reg)) {
> + ret = regulator_enable(data->vcc_reg);
> + if (ret) {
> + dev_err(&client->dev, "failed to enable VCC regulator\n");

Same comment as in the previous patch.

There is no VCC regulator as per the datasheet. There are VDD and
VDDIO power supplies, so better represent both and with the same name
they appear in the datasheet.

\
 
 \ /
  Last update: 2018-12-07 11:27    [W:0.034 / U:3.364 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site