linux/drivers/ufs/host/ufshcd-pltfrm.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Universal Flash Storage Host controller Platform bus based glue driver
 * Copyright (C) 2011-2013 Samsung India Software Operations
 *
 * Authors:
 *	Santosh Yaraganavi <[email protected]>
 *	Vinayak Holikatti <[email protected]>
 */

#include <linux/clk.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_opp.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>

#include <ufs/ufshcd.h>
#include "ufshcd-pltfrm.h"
#include <ufs/unipro.h>

#define UFSHCD_DEFAULT_LANES_PER_DIRECTION

static int ufshcd_parse_clock_info(struct ufs_hba *hba)
{}

static bool phandle_exists(const struct device_node *np,
			   const char *phandle_name, int index)
{}

#define MAX_PROP_SIZE
int ufshcd_populate_vreg(struct device *dev, const char *name,
			 struct ufs_vreg **out_vreg, bool skip_current)
{}
EXPORT_SYMBOL_GPL();

/**
 * ufshcd_parse_regulator_info - get regulator info from device tree
 * @hba: per adapter instance
 *
 * Get regulator info from device tree for vcc, vccq, vccq2 power supplies.
 * If any of the supplies are not defined it is assumed that they are always-on
 * and hence return zero. If the property is defined but parsing is failed
 * then return corresponding error.
 *
 * Return: 0 upon success; < 0 upon failure.
 */
static int ufshcd_parse_regulator_info(struct ufs_hba *hba)
{}

static void ufshcd_init_lanes_per_dir(struct ufs_hba *hba)
{}

/**
 * ufshcd_parse_clock_min_max_freq  - Parse MIN and MAX clocks freq
 * @hba: per adapter instance
 *
 * This function parses MIN and MAX frequencies of all clocks required
 * by the host drivers.
 *
 * Returns 0 for success and non-zero for failure
 */
static int ufshcd_parse_clock_min_max_freq(struct ufs_hba *hba)
{}

static int ufshcd_parse_operating_points(struct ufs_hba *hba)
{}

/**
 * ufshcd_negotiate_pwr_params - find power mode settings that are supported by
 *				 both the controller and the device
 * @host_params: pointer to host parameters
 * @dev_max: pointer to device attributes
 * @agreed_pwr: returned agreed attributes
 *
 * Return: 0 on success, non-zero value on failure.
 */
int ufshcd_negotiate_pwr_params(const struct ufs_host_params *host_params,
				const struct ufs_pa_layer_attr *dev_max,
				struct ufs_pa_layer_attr *agreed_pwr)
{}
EXPORT_SYMBOL_GPL();

void ufshcd_init_host_params(struct ufs_host_params *host_params)
{}
EXPORT_SYMBOL_GPL();

/**
 * ufshcd_pltfrm_init - probe routine of the driver
 * @pdev: pointer to Platform device handle
 * @vops: pointer to variant ops
 *
 * Return: 0 on success, non-zero value on failure.
 */
int ufshcd_pltfrm_init(struct platform_device *pdev,
		       const struct ufs_hba_variant_ops *vops)
{}
EXPORT_SYMBOL_GPL();

MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();