#include <linux/err.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/pm_domain.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_opp.h>
#include <soc/qcom/cmd-db.h>
#include <soc/qcom/rpmh.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/power/qcom,rpmhpd.h>
#define domain_to_rpmhpd(domain) …
#define RPMH_ARC_MAX_LEVELS …
struct rpmhpd { … };
struct rpmhpd_desc { … };
static DEFINE_MUTEX(rpmhpd_lock);
static struct rpmhpd cx_ao;
static struct rpmhpd mx;
static struct rpmhpd mx_ao;
static struct rpmhpd cx = …;
static struct rpmhpd cx_ao = …;
static struct rpmhpd cx_ao_w_mx_parent;
static struct rpmhpd cx_w_mx_parent = …;
static struct rpmhpd cx_ao_w_mx_parent = …;
static struct rpmhpd ebi = …;
static struct rpmhpd gfx = …;
static struct rpmhpd lcx = …;
static struct rpmhpd lmx = …;
static struct rpmhpd mmcx_ao;
static struct rpmhpd mmcx = …;
static struct rpmhpd mmcx_ao = …;
static struct rpmhpd mmcx_ao_w_cx_parent;
static struct rpmhpd mmcx_w_cx_parent = …;
static struct rpmhpd mmcx_ao_w_cx_parent = …;
static struct rpmhpd mss = …;
static struct rpmhpd mx_ao;
static struct rpmhpd mx = …;
static struct rpmhpd mx_ao = …;
static struct rpmhpd mxc_ao;
static struct rpmhpd mxc = …;
static struct rpmhpd mxc_ao = …;
static struct rpmhpd nsp = …;
static struct rpmhpd nsp0 = …;
static struct rpmhpd nsp1 = …;
static struct rpmhpd nsp2 = …;
static struct rpmhpd qphy = …;
static struct rpmhpd gmxc = …;
static struct rpmhpd *sa8540p_rpmhpds[] = …;
static const struct rpmhpd_desc sa8540p_desc = …;
static struct rpmhpd *sa8775p_rpmhpds[] = …;
static const struct rpmhpd_desc sa8775p_desc = …;
static struct rpmhpd *sdm670_rpmhpds[] = …;
static const struct rpmhpd_desc sdm670_desc = …;
static struct rpmhpd *sdm845_rpmhpds[] = …;
static const struct rpmhpd_desc sdm845_desc = …;
static struct rpmhpd *sdx55_rpmhpds[] = …;
static const struct rpmhpd_desc sdx55_desc = …;
static struct rpmhpd *sdx65_rpmhpds[] = …;
static const struct rpmhpd_desc sdx65_desc = …;
static struct rpmhpd *sdx75_rpmhpds[] = …;
static const struct rpmhpd_desc sdx75_desc = …;
static struct rpmhpd *sm6350_rpmhpds[] = …;
static const struct rpmhpd_desc sm6350_desc = …;
static struct rpmhpd *sm7150_rpmhpds[] = …;
static const struct rpmhpd_desc sm7150_desc = …;
static struct rpmhpd *sm8150_rpmhpds[] = …;
static const struct rpmhpd_desc sm8150_desc = …;
static struct rpmhpd *sa8155p_rpmhpds[] = …;
static const struct rpmhpd_desc sa8155p_desc = …;
static struct rpmhpd *sm8250_rpmhpds[] = …;
static const struct rpmhpd_desc sm8250_desc = …;
static struct rpmhpd *sm8350_rpmhpds[] = …;
static const struct rpmhpd_desc sm8350_desc = …;
static struct rpmhpd *sm8450_rpmhpds[] = …;
static const struct rpmhpd_desc sm8450_desc = …;
static struct rpmhpd *sm8550_rpmhpds[] = …;
static const struct rpmhpd_desc sm8550_desc = …;
static struct rpmhpd *sm8650_rpmhpds[] = …;
static const struct rpmhpd_desc sm8650_desc = …;
static struct rpmhpd *qdu1000_rpmhpds[] = …;
static const struct rpmhpd_desc qdu1000_desc = …;
static struct rpmhpd *sc7180_rpmhpds[] = …;
static const struct rpmhpd_desc sc7180_desc = …;
static struct rpmhpd *sc7280_rpmhpds[] = …;
static const struct rpmhpd_desc sc7280_desc = …;
static struct rpmhpd *sc8180x_rpmhpds[] = …;
static const struct rpmhpd_desc sc8180x_desc = …;
static struct rpmhpd *sc8280xp_rpmhpds[] = …;
static const struct rpmhpd_desc sc8280xp_desc = …;
static struct rpmhpd *x1e80100_rpmhpds[] = …;
static const struct rpmhpd_desc x1e80100_desc = …;
static const struct of_device_id rpmhpd_match_table[] = …;
MODULE_DEVICE_TABLE(of, rpmhpd_match_table);
static int rpmhpd_send_corner(struct rpmhpd *pd, int state,
unsigned int corner, bool sync)
{ … }
static void to_active_sleep(struct rpmhpd *pd, unsigned int corner,
unsigned int *active, unsigned int *sleep)
{ … }
static int rpmhpd_aggregate_corner(struct rpmhpd *pd, unsigned int corner)
{ … }
static int rpmhpd_power_on(struct generic_pm_domain *domain)
{ … }
static int rpmhpd_power_off(struct generic_pm_domain *domain)
{ … }
static int rpmhpd_set_performance_state(struct generic_pm_domain *domain,
unsigned int level)
{ … }
static int rpmhpd_update_level_mapping(struct rpmhpd *rpmhpd)
{ … }
static int rpmhpd_probe(struct platform_device *pdev)
{ … }
static void rpmhpd_sync_state(struct device *dev)
{ … }
static struct platform_driver rpmhpd_driver = …;
static int __init rpmhpd_init(void)
{ … }
core_initcall(rpmhpd_init);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;