drivers/amlogic: add pmu driver

Change-Id: I4855949427ea4482462654bc02f562d2a11badbb

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
This commit is contained in:
Mauro Ribeiro
2014-10-15 01:24:07 -03:00
committed by Dongjin Kim
parent f8e1f50751
commit 6710b75688
4 changed files with 68 additions and 0 deletions

9
drivers/amlogic/pmu/Kconfig Executable file
View File

@@ -0,0 +1,9 @@
menu "Amlogic PMU battery algorithm Support"
config AML_PMU_ALGORITHM_SUPPORT
tristate "Amlogic PMU battery algorithm support"
select AML_RTC
help
Say y if your pmu device need this algorithm support
endmenu

15
drivers/amlogic/pmu/Makefile Executable file
View File

@@ -0,0 +1,15 @@
#############################################################
#
# NOTE:
#
# AMLOGIC_BOARD_HAS_PMU is general switch to compile on-board
# PMU drivers, ALL new added PMU driver should be depend on
# this config
#
############################################################
obj-$(CONFIG_AML_PMU_ALGORITHM_SUPPORT) += aml_pmu_dev.o
aml_pmu_dev-objs =
aml_pmu_dev-objs += aml_pmu_module.o
aml_pmu_dev-objs += aml_pmu_algorithm.o

Binary file not shown.

View File

@@ -0,0 +1,44 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/device.h>
#include <linux/workqueue.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/compiler.h>
#include <linux/module.h>
#include <linux/uts.h>
#include <linux/utsname.h>
#include <generated/utsrelease.h>
#include <linux/version.h>
#include <linux/delay.h>
#include <linux/kthread.h>
#include <linux/slab.h>
#include <linux/debugfs.h>
#include <linux/amlogic/aml_pmu_common.h>
#include <linux/amlogic/aml_rtc.h>
#include <linux/amlogic/battery_parameter.h>
extern struct aml_pmu_api aml_pmu_common_api;
static int aml_pmu_algorithm_init(void)
{
aml_pmu_register_api(&aml_pmu_common_api);
return 0;
}
static void aml_pmu_algorithm_exit(void)
{
aml_pmu_clear_api();
}
module_init(aml_pmu_algorithm_init);
module_exit(aml_pmu_algorithm_exit);
MODULE_DESCRIPTION("Amlogic PMU algorithm modules");
MODULE_AUTHOR("tao.zeng@amlogic.com");
MODULE_LICENSE("Proprietary");