#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/mfd/syscon.h>
#include <linux/of.h>
#include <linux/of_clk.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/soc/mediatek/infracfg.h>
#include "mt6795-pm-domains.h"
#include "mt8167-pm-domains.h"
#include "mt8173-pm-domains.h"
#include "mt8183-pm-domains.h"
#include "mt8186-pm-domains.h"
#include "mt8188-pm-domains.h"
#include "mt8192-pm-domains.h"
#include "mt8195-pm-domains.h"
#include "mt8365-pm-domains.h"
#define MTK_POLL_DELAY_US …
#define MTK_POLL_TIMEOUT …
#define PWR_RST_B_BIT …
#define PWR_ISO_BIT …
#define PWR_ON_BIT …
#define PWR_ON_2ND_BIT …
#define PWR_CLK_DIS_BIT …
#define PWR_SRAM_CLKISO_BIT …
#define PWR_SRAM_ISOINT_B_BIT …
struct scpsys_domain { … };
struct scpsys { … };
#define to_scpsys_domain(gpd) …
static bool scpsys_domain_is_on(struct scpsys_domain *pd)
{ … }
static int scpsys_sram_enable(struct scpsys_domain *pd)
{ … }
static int scpsys_sram_disable(struct scpsys_domain *pd)
{ … }
static struct regmap *scpsys_bus_protect_get_regmap(struct scpsys_domain *pd,
const struct scpsys_bus_prot_data *bpd)
{ … }
static struct regmap *scpsys_bus_protect_get_sta_regmap(struct scpsys_domain *pd,
const struct scpsys_bus_prot_data *bpd)
{ … }
static int scpsys_bus_protect_clear(struct scpsys_domain *pd,
const struct scpsys_bus_prot_data *bpd)
{ … }
static int scpsys_bus_protect_set(struct scpsys_domain *pd,
const struct scpsys_bus_prot_data *bpd)
{ … }
static int scpsys_bus_protect_enable(struct scpsys_domain *pd)
{ … }
static int scpsys_bus_protect_disable(struct scpsys_domain *pd)
{ … }
static int scpsys_regulator_enable(struct regulator *supply)
{ … }
static int scpsys_regulator_disable(struct regulator *supply)
{ … }
static int scpsys_power_on(struct generic_pm_domain *genpd)
{ … }
static int scpsys_power_off(struct generic_pm_domain *genpd)
{ … }
static struct
generic_pm_domain *scpsys_add_one_domain(struct scpsys *scpsys, struct device_node *node)
{ … }
static int scpsys_add_subdomain(struct scpsys *scpsys, struct device_node *parent)
{ … }
static void scpsys_remove_one_domain(struct scpsys_domain *pd)
{ … }
static void scpsys_domain_cleanup(struct scpsys *scpsys)
{ … }
static const struct of_device_id scpsys_of_match[] = …;
static int scpsys_probe(struct platform_device *pdev)
{ … }
static struct platform_driver scpsys_pm_domain_driver = …;
builtin_platform_driver(…) …;