Thread (34 messages) 34 messages, 8 authors, 2023-02-01

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

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2023-01-18 09:06:24
Also in: linux-iio, lkml

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help