mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 10:12:16 +09:00
drivers/amlogic: add pmu driver
Change-Id: I4855949427ea4482462654bc02f562d2a11badbb Signed-off-by: Dongjin Kim <tobetter@gmail.com>
This commit is contained in:
committed by
Dongjin Kim
parent
f8e1f50751
commit
6710b75688
9
drivers/amlogic/pmu/Kconfig
Executable file
9
drivers/amlogic/pmu/Kconfig
Executable 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
15
drivers/amlogic/pmu/Makefile
Executable 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
|
||||
BIN
drivers/amlogic/pmu/aml_pmu_algorithm.o_shipped
Normal file
BIN
drivers/amlogic/pmu/aml_pmu_algorithm.o_shipped
Normal file
Binary file not shown.
44
drivers/amlogic/pmu/aml_pmu_module.c
Normal file
44
drivers/amlogic/pmu/aml_pmu_module.c
Normal 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");
|
||||
Reference in New Issue
Block a user