Re: [PATCH v2 2/2] iio: adc: add Nuvoton NCT720x ADC driver

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

 



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






[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