ronnie
2022-10-14 1504bb53e29d3d46222c0b3ea994fc494b48e153
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
 * Copyright (C) 2016 Allwinner.
 * wangwei <wangwei@allwinnertech.com>
 *
 * SUNXI AXPnull  Driver
 *
 * SPDX-License-Identifier: GPL-2.0+
 */
 
 
#include <common.h>
#include <sunxi_power/axp.h>
#include <asm/arch/pmic_bus.h>
#ifdef PMU_DEBUG
#define axp_info(fmt...)   tick_printf("[axp][info]: "fmt)
#define axp_err(fmt...)    tick_printf("[axp][err]: "fmt)
#else
#define axp_info(fmt...)    tick_printf("[axp][info]: "fmt)
#define axp_err(fmt...)    tick_printf("[axp][err]: "fmt)
#endif
 
DECLARE_GLOBAL_DATA_PTR;
 
static int pmu_axpnull_probe(void)
{
   tick_printf("%s %s %d axpdummy probe\n", __FILE__, __func__, __LINE__);
   gd->vbus_status = AXP_VBUS_EXIST;
   return 0;
}
 
static int pmu_axpnull_set_voltage(char *name, uint set_vol, uint onoff)
{
 
   return 0;
}
 
static int pmu_axpnull_get_voltage(char *name)
{
   return 0;
 
}
 
static int pmu_axpnull_set_power_off(void)
{
   return 0;
}
 
static int pmu_axpnull_set_sys_mode(int status)
{
   return 0;
}
 
static int pmu_axpnull_get_sys_mode(void)
{
   return 0;
}
 
static int pmu_axpnull_get_key_irq(void)
{
   return 0;
}
 
 
U_BOOT_AXP_PMU_INIT(pmu_axpnull) = {
   .pmu_name        = "pmu_axpnull",
   .probe             = pmu_axpnull_probe,
   .set_voltage        = pmu_axpnull_set_voltage,
   .get_voltage        = pmu_axpnull_get_voltage,
   .set_power_off        = pmu_axpnull_set_power_off,
   .set_sys_mode        = pmu_axpnull_set_sys_mode,
   .get_sys_mode        = pmu_axpnull_get_sys_mode,
   .get_key_irq        = pmu_axpnull_get_key_irq,
   /*.set_bus_vol_limit    = axpnull_set_bus_vol_limit, */
};