hc
2023-11-06 15ade055295d13f95d49e3d99b09f3bbfb4a43e7
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
/*
 * Header for ZTE's Power Domain Driver support
 *
 * Copyright (C) 2017 ZTE Ltd.
 *
 * Author: Baoyou Xie <baoyou.xie@linaro.org>
 * License terms: GNU General Public License (GPL) version 2
 */
 
#ifndef __ZTE_ZX2967_PM_DOMAIN_H
#define __ZTE_ZX2967_PM_DOMAIN_H
 
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
 
enum {
   REG_CLKEN,
   REG_ISOEN,
   REG_RSTEN,
   REG_PWREN,
   REG_PWRDN,
   REG_ACK_SYNC,
 
   /* The size of the array - must be last */
   REG_ARRAY_SIZE,
};
 
enum zx2967_power_polarity {
   PWREN,
   PWRDN,
};
 
struct zx2967_pm_domain {
   struct generic_pm_domain dm;
   const u16 bit;
   const enum zx2967_power_polarity polarity;
   const u16 *reg_offset;
};
 
int zx2967_pd_probe(struct platform_device *pdev,
           struct generic_pm_domain **zx_pm_domains,
           int domain_num);
 
#endif /* __ZTE_ZX2967_PM_DOMAIN_H */