* [PATCH] iio: chemical: atlas-ph-sensor: use regmap_bulk_read
@ 2016-02-15 2:59 Matt Ranostay
2016-02-21 20:34 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Matt Ranostay @ 2016-02-15 2:59 UTC (permalink / raw)
To: jic23; +Cc: linux-iio, Matt Ranostay
Replaced i2c_smbus_read_i2c_block_data() with regmap_bulk_read()
function call. This is to make the driver code more consistent.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
---
drivers/iio/chemical/atlas-ph-sensor.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c
index 06cd49c..93fcea9 100644
--- a/drivers/iio/chemical/atlas-ph-sensor.c
+++ b/drivers/iio/chemical/atlas-ph-sensor.c
@@ -180,10 +180,10 @@ static irqreturn_t atlas_trigger_handler(int irq, void *private)
struct atlas_data *data = iio_priv(indio_dev);
int ret;
- ret = i2c_smbus_read_i2c_block_data(data->client, ATLAS_REG_PH_DATA,
- sizeof(data->buffer[0]), (u8 *) &data->buffer);
+ ret = regmap_bulk_read(data->regmap, ATLAS_REG_PH_DATA,
+ (u8 *) &data->buffer, sizeof(data->buffer[0]));
- if (ret > 0)
+ if (!ret)
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
iio_get_time_ns());
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: chemical: atlas-ph-sensor: use regmap_bulk_read
2016-02-15 2:59 [PATCH] iio: chemical: atlas-ph-sensor: use regmap_bulk_read Matt Ranostay
@ 2016-02-21 20:34 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2016-02-21 20:34 UTC (permalink / raw)
To: Matt Ranostay; +Cc: linux-iio
On 15/02/16 02:59, Matt Ranostay wrote:
> Replaced i2c_smbus_read_i2c_block_data() with regmap_bulk_read()
> function call. This is to make the driver code more consistent.
>
> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Oops.
Applied, thanks,
Jonathan
> ---
> drivers/iio/chemical/atlas-ph-sensor.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c
> index 06cd49c..93fcea9 100644
> --- a/drivers/iio/chemical/atlas-ph-sensor.c
> +++ b/drivers/iio/chemical/atlas-ph-sensor.c
> @@ -180,10 +180,10 @@ static irqreturn_t atlas_trigger_handler(int irq, void *private)
> struct atlas_data *data = iio_priv(indio_dev);
> int ret;
>
> - ret = i2c_smbus_read_i2c_block_data(data->client, ATLAS_REG_PH_DATA,
> - sizeof(data->buffer[0]), (u8 *) &data->buffer);
> + ret = regmap_bulk_read(data->regmap, ATLAS_REG_PH_DATA,
> + (u8 *) &data->buffer, sizeof(data->buffer[0]));
>
> - if (ret > 0)
> + if (!ret)
> iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
> iio_get_time_ns());
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-21 20:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 2:59 [PATCH] iio: chemical: atlas-ph-sensor: use regmap_bulk_read Matt Ranostay
2016-02-21 20:34 ` Jonathan Cameron
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.