···110110111111#ifdef CONFIG_POWER_AVS_OMAP112112extern int omap_devinit_smartreflex(void);113113-extern void omap_enable_smartreflex_on_init(void);114113#else115114static inline int omap_devinit_smartreflex(void)116115{117116 return -EINVAL;118117}119119-120120-static inline void omap_enable_smartreflex_on_init(void) {}121118#endif122119123120#ifdef CONFIG_TWL4030_CORE
-13
arch/arm/mach-omap2/sr_device.c
···2626#include "control.h"2727#include "pm.h"28282929-static bool sr_enable_on_init;3030-3129/* Read EFUSE values from control registers for OMAP3430 */3230static void __init sr_set_nvalues(struct omap_volt_data *volt_data,3331 struct omap_sr_data *sr_data)···142144143145 sr_set_nvalues(volt_data, sr_data);144146145145- sr_data->enable_on_init = sr_enable_on_init;146146-147147exit:148148 i++;149149···168172 return -EINVAL;169173}170174#endif171171-172172-/*173173- * API to be called from board files to enable smartreflex174174- * autocompensation at init.175175- */176176-void __init omap_enable_smartreflex_on_init(void)177177-{178178- sr_enable_on_init = true;179179-}180175181176static const char * const omap4_sr_instances[] = {182177 "mpu",
-4
drivers/soc/ti/smartreflex.c
···198198 */199199static int sr_late_init(struct omap_sr *sr_info)200200{201201- struct omap_sr_data *pdata = sr_info->pdev->dev.platform_data;202201 int ret = 0;203202204203 if (sr_class->notify && sr_class->notify_flags && sr_info->irq) {···207208 goto error;208209 disable_irq(sr_info->irq);209210 }210210-211211- if (pdata && pdata->enable_on_init)212212- sr_start_vddautocomp(sr_info);213211214212 return ret;215213
-3
include/linux/power/smartreflex.h
···273273 * @senn_avgweight SENNAVGWEIGHT value of the sr AVGWEIGHT register274274 * @senp_avgweight SENPAVGWEIGHT value of the sr AVGWEIGHT register275275 * @nvalue_count: Number of distinct nvalues in the nvalue table276276- * @enable_on_init: whether this sr module needs to enabled at277277- * boot up or not.278276 * @nvalue_table: table containing the efuse offsets and nvalues279277 * corresponding to them.280278 * @voltdm: Pointer to the voltage domain associated with the SR···288290 u32 senn_avgweight;289291 u32 senp_avgweight;290292 int nvalue_count;291291- bool enable_on_init;292293 struct omap_sr_nvalue_table *nvalue_table;293294 struct voltagedomain *voltdm;294295};