[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z08MkR40fjfW3MXZ@smile.fi.intel.com>
Date: Tue, 3 Dec 2024 15:50:09 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Eason Yang <j2anfernee@...il.com>
Cc: avifishman70@...il.com, tmaimon77@...il.com, tali.perry1@...il.com,
venture@...gle.com, yuenn@...gle.com, benjaminfair@...gle.com,
jic23@...nel.org, lars@...afoo.de, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org, nuno.sa@...log.com,
dlechner@...libre.com, javier.carrasco.cruz@...il.com,
marcelo.schmitt@...log.com, olivier.moysan@...s.st.com,
mitrutzceclan@...il.com, tgamblin@...libre.com,
matteomartelli3@...il.com, alisadariana@...il.com,
gstols@...libre.com, thomas.bonnefille@...tlin.com,
ramona.nechita@...log.com, mike.looijmans@...ic.nl,
chanh@...amperecomputing.com, KWLIU@...oton.com,
yhyang2@...oton.com, openbmc@...ts.ozlabs.org,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] iio: adc: add Nuvoton NCT720x ADC driver
On Tue, Dec 03, 2024 at 05:15:40PM +0800, Eason Yang wrote:
> Add Nuvoton NCT7201/NCT7202 system voltage monitor 12-bit ADC driver
>
> NCT7201/NCT7202 supports up to 12 analog voltage monitor inputs and up to
> 4 SMBus addresses by ADDR pin. Meanwhile, ALERT# hardware event pins for
> independent alarm signals, and the all threshold values could be set for
> system protection without any timing delay. It also supports reset input
> RSTIN# to recover system from a fault condition.
>
> Currently, only single-edge mode conversion and threshold events support.
Please, get rid of explicit castings where the are not needed or implied, like
u16 foo;
...
foo = (u16)bar;
you have a lot of this in the code.
Second, why do you need two regmaps? How debugfs is supposed to work on the
registers that are 16-bit if you access them via 8-bit regmap and vice versa?
Can't you simply use bulk reads/writes when it makes sense and drop 16-bit
regmap completely?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists