linux/drivers/pmdomain/qcom/rpmpd.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. */

#include <linux/cleanup.h>
#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/of.h>
#include <linux/platform_device.h>
#include <linux/pm_opp.h>
#include <linux/soc/qcom/smd-rpm.h>

#include <dt-bindings/power/qcom-rpmpd.h>

#define domain_to_rpmpd(domain)

static struct qcom_smd_rpm *rpmpd_smd_rpm;

/* Resource types:
 * RPMPD_X is X encoded as a little-endian, lower-case, ASCII string */
#define RPMPD_SMPA
#define RPMPD_LDOA
#define RPMPD_SMPB
#define RPMPD_LDOB
#define RPMPD_RWCX
#define RPMPD_RWMX
#define RPMPD_RWLC
#define RPMPD_RWLM
#define RPMPD_RWSC
#define RPMPD_RWSM
#define RPMPD_RWGX

/* Operation Keys */
#define KEY_CORNER
#define KEY_ENABLE
#define KEY_FLOOR_CORNER
#define KEY_FLOOR_LEVEL
#define KEY_LEVEL

#define MAX_CORNER_RPMPD_STATE

struct rpmpd_req {};

struct rpmpd {};

struct rpmpd_desc {};

static DEFINE_MUTEX(rpmpd_lock);

/* CX */
static struct rpmpd cx_rwcx0_lvl_ao;
static struct rpmpd cx_rwcx0_lvl =;

static struct rpmpd cx_rwcx0_lvl_ao =;

static struct rpmpd cx_s1a_corner_ao;
static struct rpmpd cx_s1a_corner =;

static struct rpmpd cx_s1a_corner_ao =;

static struct rpmpd cx_s1a_lvl_ao;
static struct rpmpd cx_s1a_lvl =;

static struct rpmpd cx_s1a_lvl_ao =;

static struct rpmpd cx_s2a_corner_ao;
static struct rpmpd cx_s2a_corner =;

static struct rpmpd cx_s2a_corner_ao =;

static struct rpmpd cx_s2a_lvl_ao;
static struct rpmpd cx_s2a_lvl =;

static struct rpmpd cx_s2a_lvl_ao =;

static struct rpmpd cx_s3a_lvl_ao;
static struct rpmpd cx_s3a_lvl =;

static struct rpmpd cx_s3a_lvl_ao =;

static struct rpmpd cx_rwcx0_vfl =;

static struct rpmpd cx_rwsc2_vfl =;

static struct rpmpd cx_s1a_vfc =;

static struct rpmpd cx_s1a_vfl =;

static struct rpmpd cx_s2a_vfc =;

static struct rpmpd cx_s2a_vfl =;

static struct rpmpd cx_s3a_vfl =;

static struct rpmpd cx_s2b_corner_ao;
static struct rpmpd cx_s2b_corner =;

static struct rpmpd cx_s2b_corner_ao =;

static struct rpmpd cx_s2b_vfc =;

/* G(F)X */
static struct rpmpd gfx_s7a_corner =;

static struct rpmpd gfx_s7a_vfc =;

static struct rpmpd gfx_s2b_corner =;

static struct rpmpd gfx_s2b_vfc =;

static struct rpmpd gfx_s4b_corner =;

static struct rpmpd gfx_s4b_vfc =;

static struct rpmpd mx_rwmx0_lvl;
static struct rpmpd gx_rwgx0_lvl_ao;
static struct rpmpd gx_rwgx0_lvl =;

static struct rpmpd mx_rwmx0_lvl_ao;
static struct rpmpd gx_rwgx0_lvl_ao =;

/* MX */
static struct rpmpd mx_l2a_lvl_ao;
static struct rpmpd mx_l2a_lvl =;

static struct rpmpd mx_l2a_lvl_ao =;

static struct rpmpd mx_l3a_corner_ao;
static struct rpmpd mx_l3a_corner =;

static struct rpmpd mx_l3a_corner_ao =;

static struct rpmpd mx_l3a_lvl_ao;
static struct rpmpd mx_l3a_lvl =;

static struct rpmpd mx_l3a_lvl_ao =;

static struct rpmpd mx_l12a_lvl_ao;
static struct rpmpd mx_l12a_lvl =;

static struct rpmpd mx_l12a_lvl_ao =;

static struct rpmpd mx_s2a_corner_ao;
static struct rpmpd mx_s2a_corner =;

static struct rpmpd mx_s2a_corner_ao =;

static struct rpmpd mx_rwmx0_lvl_ao;
static struct rpmpd mx_rwmx0_lvl =;

static struct rpmpd mx_rwmx0_lvl_ao =;

static struct rpmpd mx_s6a_lvl_ao;
static struct rpmpd mx_s6a_lvl =;

static struct rpmpd mx_s6a_lvl_ao =;

static struct rpmpd mx_s7a_lvl_ao;
static struct rpmpd mx_s7a_lvl =;

static struct rpmpd mx_s7a_lvl_ao =;

static struct rpmpd mx_l12a_vfl =;

static struct rpmpd mx_rwmx0_vfl =;

static struct rpmpd mx_rwsm6_vfl =;

/* MD */
static struct rpmpd md_s1a_corner_ao;
static struct rpmpd md_s1a_corner =;

static struct rpmpd md_s1a_corner_ao =;

static struct rpmpd md_s1a_lvl_ao;
static struct rpmpd md_s1a_lvl =;

static struct rpmpd md_s1a_lvl_ao =;

static struct rpmpd md_s1a_vfc =;

/* LPI_CX */
static struct rpmpd lpi_cx_rwlc0_lvl =;

static struct rpmpd lpi_cx_rwlc0_vfl =;

/* LPI_MX */
static struct rpmpd lpi_mx_rwlm0_lvl =;

static struct rpmpd lpi_mx_rwlm0_vfl =;

/* SSC_CX */
static struct rpmpd ssc_cx_l26a_corner =;

static struct rpmpd ssc_cx_rwlc0_lvl =;

static struct rpmpd ssc_cx_rwsc0_lvl =;

static struct rpmpd ssc_cx_l26a_vfc =;

static struct rpmpd ssc_cx_rwlc0_vfl =;

static struct rpmpd ssc_cx_rwsc0_vfl =;

/* SSC_MX */
static struct rpmpd ssc_mx_rwlm0_lvl =;

static struct rpmpd ssc_mx_rwsm0_lvl =;

static struct rpmpd ssc_mx_rwlm0_vfl =;

static struct rpmpd ssc_mx_rwsm0_vfl =;

static struct rpmpd *mdm9607_rpmpds[] =;

static const struct rpmpd_desc mdm9607_desc =;

static struct rpmpd *msm8226_rpmpds[] =;

static const struct rpmpd_desc msm8226_desc =;

static struct rpmpd *msm8939_rpmpds[] =;

static const struct rpmpd_desc msm8939_desc =;

static struct rpmpd *msm8916_rpmpds[] =;

static const struct rpmpd_desc msm8916_desc =;

static struct rpmpd *msm8917_rpmpds[] =;

static const struct rpmpd_desc msm8917_desc =;

static struct rpmpd *msm8953_rpmpds[] =;

static const struct rpmpd_desc msm8953_desc =;

static struct rpmpd *msm8974_rpmpds[] =;

static const struct rpmpd_desc msm8974_desc =;

static struct rpmpd *msm8974pro_pma8084_rpmpds[] =;

static const struct rpmpd_desc msm8974pro_pma8084_desc =;

static struct rpmpd *msm8976_rpmpds[] =;

static const struct rpmpd_desc msm8976_desc =;

static struct rpmpd *msm8994_rpmpds[] =;

static const struct rpmpd_desc msm8994_desc =;

static struct rpmpd *msm8996_rpmpds[] =;

static const struct rpmpd_desc msm8996_desc =;

static struct rpmpd *msm8998_rpmpds[] =;

static const struct rpmpd_desc msm8998_desc =;

static struct rpmpd *qcs404_rpmpds[] =;

static const struct rpmpd_desc qcs404_desc =;

static struct rpmpd *qm215_rpmpds[] =;

static const struct rpmpd_desc qm215_desc =;

static struct rpmpd *sdm660_rpmpds[] =;

static const struct rpmpd_desc sdm660_desc =;

static struct rpmpd *sm6115_rpmpds[] =;

static const struct rpmpd_desc sm6115_desc =;

static struct rpmpd *sm6125_rpmpds[] =;

static const struct rpmpd_desc sm6125_desc =;

static struct rpmpd *sm6375_rpmpds[] =;

static const struct rpmpd_desc sm6375_desc =;

static struct rpmpd *qcm2290_rpmpds[] =;

static const struct rpmpd_desc qcm2290_desc =;

static const struct of_device_id rpmpd_match_table[] =;
MODULE_DEVICE_TABLE(of, rpmpd_match_table);

static int rpmpd_send_enable(struct rpmpd *pd, bool enable)
{}

static int rpmpd_send_corner(struct rpmpd *pd, int state, unsigned int corner)
{
	struct rpmpd_req req = {
		.key = pd->key,
		.nbytes = cpu_to_le32(sizeof(u32)),
		.value = cpu_to_le32(corner),
	};

	return qcom_rpm_smd_write(rpmpd_smd_rpm, state, pd->res_type, pd->res_id,
				  &req, sizeof(req));
};

static void to_active_sleep(struct rpmpd *pd, unsigned int corner,
			    unsigned int *active, unsigned int *sleep)
{}

static int rpmpd_aggregate_corner(struct rpmpd *pd)
{}

static int rpmpd_power_on(struct generic_pm_domain *domain)
{}

static int rpmpd_power_off(struct generic_pm_domain *domain)
{}

static int rpmpd_set_performance(struct generic_pm_domain *domain,
				 unsigned int state)
{}

static int rpmpd_probe(struct platform_device *pdev)
{}

static void rpmpd_sync_state(struct device *dev)
{}

static struct platform_driver rpmpd_driver =;

static int __init rpmpd_init(void)
{}
core_initcall(rpmpd_init);

MODULE_DESCRIPTION();
MODULE_LICENSE();