linux/drivers/firmware/arm_scmi/pinctrl.c

// SPDX-License-Identifier: GPL-2.0
/*
 * System Control and Management Interface (SCMI) Pinctrl Protocol
 *
 * Copyright (C) 2024 EPAM
 * Copyright 2024 NXP
 */

#include <asm/byteorder.h>
#include <linux/bits.h>
#include <linux/bitfield.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/scmi_protocol.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/types.h>

#include "common.h"
#include "protocols.h"

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

#define GET_GROUPS_NR(x)
#define GET_PINS_NR(x)
#define GET_FUNCTIONS_NR(x)

#define EXT_NAME_FLAG(x)
#define NUM_ELEMS(x)

#define REMAINING(x)
#define RETURNED(x)

#define CONFIG_FLAG_MASK
#define SELECTOR_MASK
#define SKIP_CONFIGS_MASK
#define CONFIG_TYPE_MASK

enum scmi_pinctrl_protocol_cmd {};

struct scmi_msg_settings_conf {};

struct scmi_msg_settings_get {};

struct scmi_resp_settings_get {};

struct scmi_msg_pinctrl_protocol_attributes {};

struct scmi_msg_pinctrl_attributes {};

struct scmi_resp_pinctrl_attributes {};

struct scmi_msg_pinctrl_list_assoc {};

struct scmi_resp_pinctrl_list_assoc {};

struct scmi_msg_request {};

struct scmi_group_info {};

struct scmi_function_info {};

struct scmi_pin_info {};

struct scmi_pinctrl_info {};

static int scmi_pinctrl_attributes_get(const struct scmi_protocol_handle *ph,
				       struct scmi_pinctrl_info *pi)
{}

static int scmi_pinctrl_count_get(const struct scmi_protocol_handle *ph,
				  enum scmi_pinctrl_selector_type type)
{}

static int scmi_pinctrl_validate_id(const struct scmi_protocol_handle *ph,
				    u32 selector,
				    enum scmi_pinctrl_selector_type type)
{}

static int scmi_pinctrl_attributes(const struct scmi_protocol_handle *ph,
				   enum scmi_pinctrl_selector_type type,
				   u32 selector, char *name,
				   u32 *n_elems)
{}

struct scmi_pinctrl_ipriv {};

static void iter_pinctrl_assoc_prepare_message(void *message,
					       u32 desc_index,
					       const void *priv)
{}

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

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

static int scmi_pinctrl_list_associations(const struct scmi_protocol_handle *ph,
					  u32 selector,
					  enum scmi_pinctrl_selector_type type,
					  u16 size, u32 *array)
{}

struct scmi_settings_get_ipriv {};

static void
iter_pinctrl_settings_get_prepare_message(void *message, u32 desc_index,
					  const void *priv)
{}

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

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

static int
scmi_pinctrl_settings_get(const struct scmi_protocol_handle *ph, u32 selector,
			  enum scmi_pinctrl_selector_type type,
			  unsigned int *nr_configs,
			  enum scmi_pinctrl_conf_type *config_types,
			  u32 *config_values)
{}

static int scmi_pinctrl_settings_get_one(const struct scmi_protocol_handle *ph,
					 u32 selector,
					 enum scmi_pinctrl_selector_type type,
					 enum scmi_pinctrl_conf_type config_type,
					 u32 *config_value)
{}

static int scmi_pinctrl_settings_get_all(const struct scmi_protocol_handle *ph,
					 u32 selector,
					 enum scmi_pinctrl_selector_type type,
					 unsigned int *nr_configs,
					 enum scmi_pinctrl_conf_type *config_types,
					 u32 *config_values)
{}

static int
scmi_pinctrl_settings_conf(const struct scmi_protocol_handle *ph,
			   u32 selector,
			   enum scmi_pinctrl_selector_type type,
			   u32 nr_configs,
			   enum scmi_pinctrl_conf_type *config_type,
			   u32 *config_value)
{}

static int scmi_pinctrl_function_select(const struct scmi_protocol_handle *ph,
					u32 group,
					enum scmi_pinctrl_selector_type type,
					u32 function_id)
{}

static int scmi_pinctrl_request_free(const struct scmi_protocol_handle *ph,
				     u32 identifier,
				     enum scmi_pinctrl_selector_type type,
				     enum scmi_pinctrl_protocol_cmd cmd)
{}

static int scmi_pinctrl_pin_request(const struct scmi_protocol_handle *ph,
				    u32 pin)
{}

static int scmi_pinctrl_pin_free(const struct scmi_protocol_handle *ph, u32 pin)
{}

static int scmi_pinctrl_get_group_info(const struct scmi_protocol_handle *ph,
				       u32 selector,
				       struct scmi_group_info *group)
{}

static int scmi_pinctrl_get_group_name(const struct scmi_protocol_handle *ph,
				       u32 selector, const char **name)
{}

static int scmi_pinctrl_group_pins_get(const struct scmi_protocol_handle *ph,
				       u32 selector, const u32 **pins,
				       u32 *nr_pins)
{}

static int scmi_pinctrl_get_function_info(const struct scmi_protocol_handle *ph,
					  u32 selector,
					  struct scmi_function_info *func)
{}

static int scmi_pinctrl_get_function_name(const struct scmi_protocol_handle *ph,
					  u32 selector, const char **name)
{}

static int
scmi_pinctrl_function_groups_get(const struct scmi_protocol_handle *ph,
				 u32 selector, u32 *nr_groups,
				 const u32 **groups)
{}

static int scmi_pinctrl_mux_set(const struct scmi_protocol_handle *ph,
				u32 selector, u32 group)
{}

static int scmi_pinctrl_get_pin_info(const struct scmi_protocol_handle *ph,
				     u32 selector, struct scmi_pin_info *pin)
{}

static int scmi_pinctrl_get_pin_name(const struct scmi_protocol_handle *ph,
				     u32 selector, const char **name)
{}

static int scmi_pinctrl_name_get(const struct scmi_protocol_handle *ph,
				 u32 selector,
				 enum scmi_pinctrl_selector_type type,
				 const char **name)
{}

static const struct scmi_pinctrl_proto_ops pinctrl_proto_ops =;

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

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

static const struct scmi_protocol scmi_pinctrl =;

DEFINE_SCMI_PROTOCOL_REGISTER_UNREGISTER(pinctrl, scmi_pinctrl)