linux/drivers/firmware/arm_scmi/voltage.c

// SPDX-License-Identifier: GPL-2.0
/*
 * System Control and Management Interface (SCMI) Voltage Protocol
 *
 * Copyright (C) 2020-2022 ARM Ltd.
 */

#include <linux/module.h>
#include <linux/scmi_protocol.h>

#include "protocols.h"

/* Updated only after ALL the mandatory features for that version are merged */
#define SCMI_PROTOCOL_SUPPORTED_VERSION

#define VOLTAGE_DOMS_NUM_MASK
#define REMAINING_LEVELS_MASK
#define RETURNED_LEVELS_MASK

enum scmi_voltage_protocol_cmd {};

#define NUM_VOLTAGE_DOMAINS(x)

struct scmi_msg_resp_domain_attributes {};

struct scmi_msg_cmd_describe_levels {};

struct scmi_msg_resp_describe_levels {};

struct scmi_msg_cmd_config_set {};

struct scmi_msg_cmd_level_set {};

struct scmi_resp_voltage_level_set_complete {};

struct voltage_info {};

static int scmi_protocol_attributes_get(const struct scmi_protocol_handle *ph,
					struct voltage_info *vinfo)
{}

static int scmi_init_voltage_levels(struct device *dev,
				    struct scmi_voltage_info *v,
				    u32 num_returned, u32 num_remaining,
				    bool segmented)
{}

struct scmi_volt_ipriv {};

static void iter_volt_levels_prepare_message(void *message,
					     unsigned int desc_index,
					     const void *priv)
{}

static int iter_volt_levels_update_state(struct scmi_iterator_state *st,
					 const void *response, void *priv)
{}

static int
iter_volt_levels_process_response(const struct scmi_protocol_handle *ph,
				  const void *response,
				  struct scmi_iterator_state *st, void *priv)
{}

static int scmi_voltage_levels_get(const struct scmi_protocol_handle *ph,
				   struct scmi_voltage_info *v)
{}

static int scmi_voltage_descriptors_get(const struct scmi_protocol_handle *ph,
					struct voltage_info *vinfo)
{}

static int __scmi_voltage_get_u32(const struct scmi_protocol_handle *ph,
				  u8 cmd_id, u32 domain_id, u32 *value)
{}

static int scmi_voltage_config_set(const struct scmi_protocol_handle *ph,
				   u32 domain_id, u32 config)
{}

static int scmi_voltage_config_get(const struct scmi_protocol_handle *ph,
				   u32 domain_id, u32 *config)
{}

static int scmi_voltage_level_set(const struct scmi_protocol_handle *ph,
				  u32 domain_id,
				  enum scmi_voltage_level_mode mode,
				  s32 volt_uV)
{}

static int scmi_voltage_level_get(const struct scmi_protocol_handle *ph,
				  u32 domain_id, s32 *volt_uV)
{}

static const struct scmi_voltage_info * __must_check
scmi_voltage_info_get(const struct scmi_protocol_handle *ph, u32 domain_id)
{}

static int scmi_voltage_domains_num_get(const struct scmi_protocol_handle *ph)
{}

static struct scmi_voltage_proto_ops voltage_proto_ops =;

static int scmi_voltage_protocol_init(const struct scmi_protocol_handle *ph)
{}

static const struct scmi_protocol scmi_voltage =;

DEFINE_SCMI_PROTOCOL_REGISTER_UNREGISTER(voltage, scmi_voltage)