[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <60b6965b-7a14-8b7c-c9b9-c463fc0ad88c@collabora.com>
Date: Thu, 7 Jul 2022 00:09:38 +0300
From: Dmitry Osipenko <dmitry.osipenko@...labora.com>
To: Shreeya Patel <shreeya.patel@...labora.com>, jic23@...nel.org,
lars@...afoo.de, robh+dt@...nel.org, Zhigang.Shi@...eon.com,
krisman@...labora.com
Cc: linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel@...labora.com,
alvaro.soliverez@...labora.com, andy.shevchenko@...il.com,
digetx@...il.com, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v6 2/2] iio: light: Add support for ltrf216a sensor
On 6/15/22 16:51, Shreeya Patel wrote:
> +static int ltrf216a_probe(struct i2c_client *client)
> +{
> + struct ltrf216a_data *data;
> + 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);
> + i2c_set_clientdata(client, indio_dev);
> + data->client = client;
> +
> + mutex_init(&data->lock);
> +
> + indio_dev->info = <rf216a_info;
> + indio_dev->name = LTRF216A_DRV_NAME;
> + indio_dev->channels = ltrf216a_channels;
> + indio_dev->num_channels = ARRAY_SIZE(ltrf216a_channels);
> + indio_dev->modes = INDIO_DIRECT_MODE;
> +
> + /* reset sensor, chip fails to respond to this, so ignore any errors */
> + ltrf216a_reset(indio_dev);
Shouldn't SW resetting be done after enabling sensor? Perhaps that's why
it fails to respond?
--
Best regards,
Dmitry
Powered by blists - more mailing lists