Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: OMAP: SmartReflex: Move smartreflex driver to drivers/

After a clean-up of the interfaces the OMAP Smartreflex IP driver is now a
generic driver. Move it to drivers/power/avs/.

The build is controlled by the following Kconfig options:
. CONFIG_POWER_AVS: general knob for Adaptive Voltage Scaling support,
. CONFIG_POWER_AVS_OMAP: AVS(Adaptive Voltage Scaling)
support on OMAP containing the version 1 or version 2 of the SmartReflex IP,
. CONFIG_POWER_AVS_OMAP_CLASS3: Class 3 implementation of Smartreflex.

Signed-off-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: J Keerthy <j-keerthy@ti.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>

authored by

Jean Pihet and committed by
Kevin Hilman
21ff63ad 7fb149ff

+22 -25
+2 -2
arch/arm/mach-omap2/Makefile
··· 70 70 cpuidle44xx.o 71 71 obj-$(CONFIG_PM_DEBUG) += pm-debug.o 72 72 73 - obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o smartreflex.o 74 - obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o 73 + obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o 74 + obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o 75 75 76 76 AFLAGS_sleep24xx.o :=-Wa,-march=armv6 77 77 AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec)
+1 -4
arch/arm/mach-omap2/smartreflex.c drivers/power/avs/smartreflex.c
··· 3 3 * 4 4 * Author: Thara Gopinath <thara@ti.com> 5 5 * 6 - * Copyright (C) 2010 Texas Instruments, Inc. 6 + * Copyright (C) 2012 Texas Instruments, Inc. 7 7 * Thara Gopinath <thara@ti.com> 8 8 * 9 9 * Copyright (C) 2008 Nokia Corporation ··· 26 26 #include <linux/slab.h> 27 27 #include <linux/pm_runtime.h> 28 28 #include <linux/power/smartreflex.h> 29 - 30 - #include "common.h" 31 - #include "pm.h" 32 29 33 30 #define SMARTREFLEX_NAME_LEN 16 34 31 #define NVALUE_NAME_LEN 40
+3 -19
arch/arm/plat-omap/Kconfig
··· 45 45 depends on OMAP_DEBUG_DEVICES 46 46 default y if LEDS_CLASS 47 47 48 - menuconfig POWER_AVS 49 - tristate "Adaptive Voltage Scaling class support" 50 - help 51 - AVS(Adaptive Voltage Scaling) is a power management technique which 52 - finely controls the operating voltage of a device in order to optimize 53 - (i.e. reduce) its power consumption. 54 - At a given operating point the voltage is adapted depending on 55 - static factors (chip manufacturing process) and dynamic factors 56 - (temperature depending performance). 57 - AVS is also called SmartReflex on OMAP devices. 58 - 59 - Say Y here to enable Adaptive Voltage Scaling class support. 60 - 61 - if POWER_AVS 62 - 63 48 config POWER_AVS_OMAP 64 49 bool "AVS(Adaptive Voltage Scaling) support for OMAP IP versions 1&2" 65 - depends on (ARCH_OMAP3 || ARCH_OMAP4) && PM 50 + depends on POWER_AVS && (ARCH_OMAP3 || ARCH_OMAP4) && PM 66 51 help 67 - Say Y to enable AVS support on OMAP containing the version 1 or 52 + Say Y to enable AVS(Adaptive Voltage Scaling) 53 + support on OMAP containing the version 1 or 68 54 version 2 of the SmartReflex IP. 69 55 V1 is the 65nm version used in OMAP3430. 70 56 V2 is the update for the 45nm version of the IP used in OMAP3630 ··· 74 88 75 89 Class 3 implementation of Smartreflex employs continuous hardware 76 90 voltage calibration. 77 - 78 - endif # POWER_AVS 79 91 80 92 config OMAP_RESET_CLOCKS 81 93 bool "Reset unused clocks during boot"
+2
drivers/power/Kconfig
··· 308 308 Say Y to enable battery temperature measurements using 309 309 thermistor connected on BATCTRL ADC. 310 310 endif # POWER_SUPPLY 311 + 312 + source "drivers/power/avs/Kconfig"
+1
drivers/power/Makefile
··· 43 43 obj-$(CONFIG_CHARGER_MANAGER) += charger-manager.o 44 44 obj-$(CONFIG_CHARGER_MAX8997) += max8997_charger.o 45 45 obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o 46 + obj-$(CONFIG_POWER_AVS) += avs/ 46 47 obj-$(CONFIG_CHARGER_SMB347) += smb347-charger.o
+12
drivers/power/avs/Kconfig
··· 1 + menuconfig POWER_AVS 2 + tristate "Adaptive Voltage Scaling class support" 3 + help 4 + AVS is a power management technique which finely controls the 5 + operating voltage of a device in order to optimize (i.e. reduce) 6 + its power consumption. 7 + At a given operating point the voltage is adapted depending on 8 + static factors (chip manufacturing process) and dynamic factors 9 + (temperature depending performance). 10 + AVS is also called SmartReflex on OMAP devices. 11 + 12 + Say Y here to enable Adaptive Voltage Scaling class support.
+1
drivers/power/avs/Makefile
··· 1 + obj-$(CONFIG_POWER_AVS_OMAP) += smartreflex.o