On Sunday 09 July 2017 16:13:59 Liam Breck wrote: > Hi Pali, > > On Sun, Jul 9, 2017 at 2:07 AM, Pali Rohár > wrote: > > On Sunday 09 July 2017 04:16:57 Liam Breck wrote: > >> From: Liam Breck > >> > >> Support data memory update on BQ27500, 545, 425, 421, 441, 621. > >> With exception of BQ27425, these are only enabled #ifdef DEBUG, > >> as they are not tested. > >> > >> Signed-off-by: Liam Breck > >> --- > >> > >> drivers/power/supply/bq27xxx_battery.c | 164 > > > > Why under #ifdef DEBUG? Seems that this is misusing DEBUG which is > > used for other things. > > This is a temporary measure, as those definitions are not tested on > their chips. Nothing new happens in debug mode unless > monitored-battery is set in driver's DT config, and it's either a > ram-only chip or the dt_updates_nvm config option is set. > > If DEBUG isn't ok in this case, alternative suggestions? > > Thanks for your input! DEBUG can be enabled by other kernel option and should provide just more debugging functionality. But you are adding non-debug functionality under #ifdef DEBUG, which basically is "new experimental untested feature". Better way for "experimental feature" would be introduction of other kconfig switch or probably runtime module option... -- Pali Rohár pali.rohar@gmail.com