linux/drivers/soc/qcom/spm.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014,2015, Linaro Ltd.
 *
 * SAW power controller driver
 */

#include <linux/bitfield.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/linear_range.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/smp.h>

#include <linux/regulator/driver.h>

#include <soc/qcom/spm.h>

#define FIELD_SET(current, mask, val)

#define SPM_CTL_INDEX
#define SPM_CTL_INDEX_SHIFT
#define SPM_CTL_EN

/* These registers might be specific to SPM 1.1 */
#define SPM_VCTL_VLVL
#define SPM_PMIC_DATA_0_VLVL
#define SPM_PMIC_DATA_1_MIN_VSEL
#define SPM_PMIC_DATA_1_MAX_VSEL

#define SPM_1_1_AVS_CTL_AVS_ENABLED
#define SPM_AVS_CTL_MAX_VLVL
#define SPM_AVS_CTL_MIN_VLVL

enum spm_reg {};

#define MAX_PMIC_DATA
#define MAX_SEQ_DATA

struct spm_reg_data {};

struct spm_driver_data {};

static const u16 spm_reg_offset_v4_1[SPM_REG_NR] =;

static const struct spm_reg_data spm_reg_660_gold_l2  =;

static const struct spm_reg_data spm_reg_660_silver_l2  =;

static const struct spm_reg_data spm_reg_8998_gold_l2  =;

static const struct spm_reg_data spm_reg_8998_silver_l2  =;

static const u16 spm_reg_offset_v3_0[SPM_REG_NR] =;

/* SPM register data for 8909 */
static const struct spm_reg_data spm_reg_8909_cpu =;

/* SPM register data for 8916 */
static const struct spm_reg_data spm_reg_8916_cpu =;

static const struct spm_reg_data spm_reg_8939_cpu =;

static const u16 spm_reg_offset_v2_3[SPM_REG_NR] =;

/* SPM register data for 8976 */
static const struct spm_reg_data spm_reg_8976_gold_l2 =;

static const struct spm_reg_data spm_reg_8976_silver_l2 =;

static const u16 spm_reg_offset_v2_1[SPM_REG_NR] =;

/* SPM register data for 8974, 8084 */
static const struct spm_reg_data spm_reg_8974_8084_cpu  =;

/* SPM register data for 8226 */
static const struct spm_reg_data spm_reg_8226_cpu  =;

static const u16 spm_reg_offset_v1_1[SPM_REG_NR] =;

static void smp_set_vdd_v1_1(void *data);

/* SPM register data for 8064 */
static struct linear_range spm_v1_1_regulator_range =;

static const struct spm_reg_data spm_reg_8064_cpu =;

static inline void spm_register_write(struct spm_driver_data *drv,
					enum spm_reg reg, u32 val)
{}

/* Ensure a guaranteed write, before return */
static inline void spm_register_write_sync(struct spm_driver_data *drv,
					enum spm_reg reg, u32 val)
{}

static inline u32 spm_register_read(struct spm_driver_data *drv,
				    enum spm_reg reg)
{}

void spm_set_low_power_mode(struct spm_driver_data *drv,
			    enum pm_sleep_mode mode)
{}

static int spm_set_voltage_sel(struct regulator_dev *rdev, unsigned int selector)
{}

static int spm_get_voltage_sel(struct regulator_dev *rdev)
{}

static const struct regulator_ops spm_reg_ops =;

static void smp_set_vdd_v1_1(void *data)
{}

static int spm_get_cpu(struct device *dev)
{}

static int spm_register_regulator(struct device *dev, struct spm_driver_data *drv)
{}

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

static int spm_dev_probe(struct platform_device *pdev)
{}

static struct platform_driver spm_driver =;

static int __init qcom_spm_init(void)
{}
arch_initcall(qcom_spm_init);

MODULE_DESCRIPTION();
MODULE_LICENSE();