linux/drivers/net/wwan/iosm/iosm_ipc_devlink.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2020-2021 Intel Corporation.
 */
#include <linux/vmalloc.h>

#include "iosm_ipc_chnl_cfg.h"
#include "iosm_ipc_coredump.h"
#include "iosm_ipc_devlink.h"
#include "iosm_ipc_flash.h"

/* Coredump list */
static struct iosm_coredump_file_info list[IOSM_NOF_CD_REGION] =;

/* Get the param values for the specific param ID's */
static int ipc_devlink_get_param(struct devlink *dl, u32 id,
				 struct devlink_param_gset_ctx *ctx)
{}

/* Set the param values for the specific param ID's */
static int ipc_devlink_set_param(struct devlink *dl, u32 id,
				 struct devlink_param_gset_ctx *ctx,
				 struct netlink_ext_ack *extack)
{}

/* Devlink param structure array */
static const struct devlink_param iosm_devlink_params[] =;

/* Get devlink flash component type */
static enum iosm_flash_comp_type
ipc_devlink_get_flash_comp_type(const char comp_str[], u32 len)
{}

/* Function triggered on devlink flash command
 * Flash update function which calls multiple functions based on
 * component type specified in the flash command
 */
static int ipc_devlink_flash_update(struct devlink *devlink,
				    struct devlink_flash_update_params *params,
				    struct netlink_ext_ack *extack)
{}

/* Call back function for devlink ops */
static const struct devlink_ops devlink_flash_ops =;

/**
 * ipc_devlink_send_cmd - Send command to Modem
 * @ipc_devlink: Pointer to struct iosm_devlink
 * @cmd:         Command to be sent to modem
 * @entry:       Command entry number
 *
 * Returns:      0 on success and failure value on error
 */
int ipc_devlink_send_cmd(struct iosm_devlink *ipc_devlink, u16 cmd, u32 entry)
{}

/* Function to create snapshot */
static int ipc_devlink_coredump_snapshot(struct devlink *dl,
					 const struct devlink_region_ops *ops,
					 struct netlink_ext_ack *extack,
					 u8 **data)
{}

/* To create regions for coredump files */
static int ipc_devlink_create_region(struct iosm_devlink *devlink)
{}

/* To Destroy devlink regions */
static void ipc_devlink_destroy_region(struct iosm_devlink *ipc_devlink)
{}

/**
 * ipc_devlink_init - Initialize/register devlink to IOSM driver
 * @ipc_imem:   Pointer to struct iosm_imem
 *
 * Returns:     Pointer to iosm_devlink on success and NULL on failure
 */
struct iosm_devlink *ipc_devlink_init(struct iosm_imem *ipc_imem)
{}

/**
 * ipc_devlink_deinit - To unintialize the devlink from IOSM driver.
 * @ipc_devlink:        Devlink instance
 */
void ipc_devlink_deinit(struct iosm_devlink *ipc_devlink)
{}