power management: load switch

added support of exit in load switch. Same is called before sleep and
again init when switch is exited.

Signed-off-by: Ajay <ajay@moxiedevices.com>
alligned

Signed-off-by: Ajay <ajay@moxiedevices.com>
removed commented code

Signed-off-by: Ajay <ajay@moxiedevices.com>
led load: pwm: removed unnecessary #defines

few hash defines were defined in PWM as well ass config. They should come
from config only. Deleted definition from PWM.h and used defined in config
file.

Signed-off-by: Ajay <ajay@moxiedevices.com>
pwm.h: removed commented portion

Signed-off-by: Ajay <ajay@moxiedevices.com>
pwm.h: added duplicate inclusion protection

Signed-off-by: Ajay <ajay@moxiedevices.com>
led load: pi: frequency definition moved to config.h

PWM frequency definition should come from config file.

Signed-off-by: Ajay <ajay@moxiedevices.com>
pwm: new fuctions: enable disable

added new function enable/disable pwm. Added in source file which use them
too.

Signed-off-by: Ajay <ajay@moxiedevices.com>
update duty cycle changed

Signed-off-by: Ajay <ajay@moxiedevices.com>
pwm: polarity inversion function changed

Signed-off-by: Ajay <ajay@moxiedevices.com>
init routine for led load

Signed-off-by: Ajay <ajay@moxiedevices.com>
added load init routine

Signed-off-by: Ajay <ajay@moxiedevices.com>
pwm: removed unnecessary functions

Signed-off-by: Ajay <ajay@moxiedevices.com>
sleep: set micro into low power state before sleep

Before sleep micro need to be moved to low power state.

Signed-off-by: Ajay <ajay@moxiedevices.com>
temp: changed disable functions to proper fuctions

Signed-off-by: Ajay <ajay@moxiedevices.com>
makefile: corrected file name

Signed-off-by: Ajay <ajay@moxiedevices.com>
defined NULL pointer

Signed-off-by: Ajay <ajay@moxiedevices.com>
defined fn pointer typedef for void fn(void)

Signed-off-by: Ajay <ajay@moxiedevices.com>
power management: added proper support

power_mgmt.c and power_mgmt.h manages power of device.

Only sleep mode is supported currently
1) When it is detected to got to power_save
--- all prepare function for ip or functionality are called. These
functions should be registered directly to power mgmt driver

--- device goes to low power state(32 khz)

--- device moves to sleep state

--- on interrupt device exits from sleep

--- again device in in normal power mode

--- power exit function of each driver/functionality is called. These
functions should be registered before calling

Signed-off-by: Ajay <ajay@moxiedevices.com>
conditional macro supporting power management

Signed-off-by: Ajay <ajay@moxiedevices.com>