Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * Copyright (C) ST-Ericsson SA 2010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  * Author: Bengt Jonsson <bengt.jonsson@stericsson.com> for ST-Ericsson,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  *	   Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #ifndef DBX500_REGULATOR_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define DBX500_REGULATOR_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)  * struct dbx500_regulator_info - dbx500 regulator information
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)  * @desc: regulator description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)  * @is_enabled: status of the regulator
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)  * @epod_id: id for EPOD (power domain)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)  * @is_ramret: RAM retention switch for EPOD (power domain)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) struct dbx500_regulator_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	struct regulator_desc desc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	bool is_enabled;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	u16 epod_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	bool is_ramret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	bool exclude_from_power_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) void power_state_active_enable(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) int power_state_active_disable(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #ifdef CONFIG_REGULATOR_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) int ux500_regulator_debug_init(struct platform_device *pdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 			       struct dbx500_regulator_info *regulator_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 			       int num_regulators);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) int ux500_regulator_debug_exit(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) static inline int ux500_regulator_debug_init(struct platform_device *pdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 			     struct dbx500_regulator_info *regulator_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 			     int num_regulators)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) static inline int ux500_regulator_debug_exit(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) #endif