--- zzzz-none-000/linux-2.6.39.4/drivers/base/power/main.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/drivers/base/power/main.c 2021-11-10 13:23:10.000000000 +0000 @@ -16,6 +16,12 @@ * domain dependencies may differ from the ancestral dependencies that the * subsystem list maintains. */ +/****************************************************************** + + Includes Intel Corporation's changes/modifications dated: 12/2011. + Changed/modified portions - Copyright(c) 2011, Intel Corporation. + +******************************************************************/ #include #include @@ -31,6 +37,12 @@ #include "../base.h" #include "power.h" +#ifdef CONFIG_ARCH_GEN3 +int suspend_device(struct device *dev, pm_message_t state); +int resume_device(struct device *dev, pm_message_t state); +#endif + + /* * The entries in the dpm_list list are in a depth first order, simply * because children are guaranteed to be discovered after parents, and @@ -49,7 +61,11 @@ static DEFINE_MUTEX(dpm_list_mtx); static pm_message_t pm_transition; +#ifdef CONFIG_ARCH_GEN3 +int async_error; +#else static int async_error; +#endif /** * device_pm_init - Initialize the PM-related part of a device object. @@ -577,6 +593,12 @@ pm_dev_err(dev, pm_transition, " async", error); put_device(dev); } +#ifdef CONFIG_ARCH_GEN3 +int resume_device(struct device *dev, pm_message_t state) +{ + return device_resume(dev,state,false); +} +#endif static bool is_async(struct device *dev) { @@ -886,7 +908,6 @@ pm_op(dev, &dev->pwr_domain->ops, state); } - End: dev->power.is_suspended = !error; Unlock: @@ -923,7 +944,12 @@ return __device_suspend(dev, pm_transition, false); } - +#ifdef CONFIG_ARCH_GEN3 +int suspend_device(struct device *dev, pm_message_t state) +{ + return __device_suspend(dev, state, false); +} +#endif /** * dpm_suspend - Execute "suspend" callbacks for all non-sysdev devices. * @state: PM transition of the system being carried out.