diff --git a/drivers/amlogic/pmu/Kconfig b/drivers/amlogic/pmu/Kconfig new file mode 100755 index 000000000000..561677ee1cb7 --- /dev/null +++ b/drivers/amlogic/pmu/Kconfig @@ -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 diff --git a/drivers/amlogic/pmu/Makefile b/drivers/amlogic/pmu/Makefile new file mode 100755 index 000000000000..c04d36e55a2d --- /dev/null +++ b/drivers/amlogic/pmu/Makefile @@ -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 diff --git a/drivers/amlogic/pmu/aml_pmu_algorithm.o_shipped b/drivers/amlogic/pmu/aml_pmu_algorithm.o_shipped new file mode 100644 index 000000000000..07812650e9bf Binary files /dev/null and b/drivers/amlogic/pmu/aml_pmu_algorithm.o_shipped differ diff --git a/drivers/amlogic/pmu/aml_pmu_module.c b/drivers/amlogic/pmu/aml_pmu_module.c new file mode 100644 index 000000000000..76109427ebc9 --- /dev/null +++ b/drivers/amlogic/pmu/aml_pmu_module.c @@ -0,0 +1,44 @@ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +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");