[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240127165727.1fde5925@jic23-huawei>
Date: Sat, 27 Jan 2024 16:57:27 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Petre Rodan <petre.rodan@...dimension.ro>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org, Lars-Peter
Clausen <lars@...afoo.de>
Subject: Re: [PATCH v2 2/4] iio: pressure: hsc030pa cleanup
On Sat, 27 Jan 2024 18:03:56 +0200
Petre Rodan <petre.rodan@...dimension.ro> wrote:
> Use signed type to variable holding the result given by div_s64().
>
> Add includes based on prior reviews from Andy.
>
> Provide bus-specific technical datasheet in the _i2c.c _spi.c headers
> instead of the generic one.
Given this lists 3 things, should really be 3 patches...
They are small though so meh, if nothing else comes up to require
a v3 I might take it in the interests of expediency.
>
> Signed-off-by: Petre Rodan <petre.rodan@...dimension.ro>
> ---
> v1 -> v2 no change
> drivers/iio/pressure/hsc030pa.c | 2 +-
> drivers/iio/pressure/hsc030pa.h | 2 ++
> drivers/iio/pressure/hsc030pa_i2c.c | 6 ++++--
> drivers/iio/pressure/hsc030pa_spi.c | 5 ++++-
> 4 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/pressure/hsc030pa.c b/drivers/iio/pressure/hsc030pa.c
> index d6a51f0c335f..7e3f74d53b47 100644
> --- a/drivers/iio/pressure/hsc030pa.c
> +++ b/drivers/iio/pressure/hsc030pa.c
> @@ -406,7 +406,7 @@ int hsc_common_probe(struct device *dev, hsc_recv_fn recv)
> struct hsc_data *hsc;
> struct iio_dev *indio_dev;
> const char *triplet;
> - u64 tmp;
> + s64 tmp;
> int ret;
>
> indio_dev = devm_iio_device_alloc(dev, sizeof(*hsc));
> diff --git a/drivers/iio/pressure/hsc030pa.h b/drivers/iio/pressure/hsc030pa.h
> index d20420dba4f6..f1079a70799f 100644
> --- a/drivers/iio/pressure/hsc030pa.h
> +++ b/drivers/iio/pressure/hsc030pa.h
> @@ -10,6 +10,8 @@
>
> #include <linux/types.h>
>
> +#include <linux/iio/iio.h>
> +
> #define HSC_REG_MEASUREMENT_RD_SIZE 4
>
> struct device;
> diff --git a/drivers/iio/pressure/hsc030pa_i2c.c b/drivers/iio/pressure/hsc030pa_i2c.c
> index e2b524b36417..b5810bafef40 100644
> --- a/drivers/iio/pressure/hsc030pa_i2c.c
> +++ b/drivers/iio/pressure/hsc030pa_i2c.c
> @@ -4,14 +4,16 @@
> *
> * Copyright (c) 2023 Petre Rodan <petre.rodan@...dimension.ro>
> *
> - * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-hsc-series/documents/sps-siot-trustability-hsc-series-high-accuracy-board-mount-pressure-sensors-50099148-a-en-ciid-151133.pdf [hsc]
> - * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/common/documents/sps-siot-i2c-comms-digital-output-pressure-sensors-tn-008201-3-en-ciid-45841.pdf [i2c related]
> + * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/common/documents/sps-siot-i2c-comms-digital-output-pressure-sensors-tn-008201-3-en-ciid-45841.pdf
> + * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/common/documents/sps-siot-sleep-mode-technical-note-008286-1-en-ciid-155793.pdf
> */
>
> +#include <linux/device.h>
> #include <linux/errno.h>
> #include <linux/i2c.h>
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> +#include <linux/types.h>
>
> #include <linux/iio/iio.h>
>
> diff --git a/drivers/iio/pressure/hsc030pa_spi.c b/drivers/iio/pressure/hsc030pa_spi.c
> index a719bade8326..8d3441f1dcf9 100644
> --- a/drivers/iio/pressure/hsc030pa_spi.c
> +++ b/drivers/iio/pressure/hsc030pa_spi.c
> @@ -4,13 +4,16 @@
> *
> * Copyright (c) 2023 Petre Rodan <petre.rodan@...dimension.ro>
> *
> - * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-hsc-series/documents/sps-siot-trustability-hsc-series-high-accuracy-board-mount-pressure-sensors-50099148-a-en-ciid-151133.pdf
> + * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/common/documents/sps-siot-spi-comms-digital-ouptu-pressure-sensors-tn-008202-3-en-ciid-45843.pdf
> + * Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/common/documents/sps-siot-sleep-mode-technical-note-008286-1-en-ciid-155793.pdf
> */
>
> +#include <linux/device.h>
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> #include <linux/spi/spi.h>
> #include <linux/stddef.h>
> +#include <linux/types.h>
>
> #include <linux/iio/iio.h>
>
Powered by blists - more mailing lists