Re: [PATCH v3 5/5] drivers: iio: adc: Add ADI MAX77541 ADC Support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux