lkml.org 
[lkml]   [2023]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 5/5] drivers: iio: adc: Add ADI MAX77541 ADC Support
On Wed, Jan 18, 2023 at 09:38:12AM +0300, Okan Sahin wrote:
> The MAX77541 has an 8-bit Successive Approximation Register (SAR) ADC
> with four multiplexers for supporting the telemetry feature.

...

> + * Copyright (c) 2022 Analog Devices, Inc.

HNY!

...

> +#include <linux/bitfield.h>
> +#include <linux/iio/iio.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/platform_device.h>
> +#include <linux/regmap.h>

> +#include <linux/regulator/driver.h>
> +#include <linux/regulator/of_regulator.h>

What for these two?
Make sure the list of inclusions is not semi-random.

> +#include <linux/units.h>

+ Blank line.

> +#include <linux/mfd/max77541.h>

...

> + *val = DIV_ROUND_CLOSEST(ABSOLUTE_ZERO_MILLICELSIUS,
> + 1725);

This is perfectly one line, please, reduce number of LoCs by unwrapping
such cases.

...

> + if (ret)
> + return ret;

+ Blank line.

> + reg_val = FIELD_GET(MAX77541_BITS_MX_CFG1_RNG, reg_val);

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-03-26 23:45    [W:0.206 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site