lkml.org 
[lkml]   [2023]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v1 2/2] iio: adc: adding support for pac193x
From
On 20/02/2023 13:32, marius.cristea@microchip.com wrote:
> From: Marius Cristea <marius.cristea@microchip.com>
>
> This is the iio driver for Microchip
> PAC193X series of Power Monitor with Accumulator chip family.
>
> Signed-off-by: Marius Cristea <marius.cristea@microchip.com>
> ---
> MAINTAINERS | 7 +
> drivers/iio/adc/Kconfig | 12 +
> drivers/iio/adc/Makefile | 1 +
> drivers/iio/adc/pac193x.c | 2072 +++++++++++++++++++++++++++++++++++++
> 4 files changed, 2092 insertions(+)
> create mode 100644 drivers/iio/adc/pac193x.c
>


Thank you for your patch. There is something to discuss/improve.

> +
> +#define PAC193X_NEG_PWR_CH1_BIDI(x) ((x) ? BIT(7) : 0)
> +#define PAC193X_NEG_PWR_CH2_BIDI(x) ((x) ? BIT(6) : 0)
> +#define PAC193X_NEG_PWR_CH3_BIDI(x) ((x) ? BIT(5) : 0)
> +#define PAC193X_NEG_PWR_CH4_BIDI(x) ((x) ? BIT(4) : 0)
> +#define PAC193X_NEG_PWR_CH1_BIDV(x) ((x) ? BIT(3) : 0)
> +#define PAC193X_NEG_PWR_CH2_BIDV(x) ((x) ? BIT(2) : 0)
> +#define PAC193X_NEG_PWR_CH3_BIDV(x) ((x) ? BIT(1) : 0)
> +#define PAC193X_NEG_PWR_CH4_BIDV(x) ((x) ? BIT(0) : 0)
> +
> +/*
> + * Universal Unique Identifier (UUID),
> + * 033771E0-1705-47B4-9535-D1BBE14D9A09, is
> + * reserved to Microchip for the PAC193X and must not be changed
> + */
> +#define PAC193X_DSM_UUID "033771E0-1705-47B4-9535-D1BBE14D9A09"
> +
> +enum pac193x_ids {
> + pac1934,
> + pac1933,
> + pac1932,
> + pac1931

Enums are usually uppercase.



Best regards,
Krzysztof

\
 
 \ /
  Last update: 2023-03-27 00:30    [W:0.078 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site