Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52da491c authored by Sarthak Garg's avatar Sarthak Garg Committed by Gerrit - the friendly Code Review server
Browse files

mmc: core: Remove unnecessary scale debugfs entry



Current scale debugfs entry is quite unstable and used barely.
Hardware cmd timeout and some other issues are being seen when trying to
modify the scale entry.
Remove unnecessary scale debugfs entry to avoid such issues.

Change-Id: I9486a9fe7498ba1855153202415fca80debb13f9
Signed-off-by: default avatarSarthak Garg <sartgarg@codeaurora.org>
parent 0d384b92
Loading
Loading
Loading
Loading
+0 −36
Original line number Diff line number Diff line
@@ -223,40 +223,6 @@ DEFINE_SIMPLE_ATTRIBUTE(mmc_clock_fops, mmc_clock_opt_get, mmc_clock_opt_set,
	"%llu\n");

#if defined(CONFIG_SDC_QTI)
static int mmc_scale_get(void *data, u64 *val)
{
	struct mmc_host *host = data;

	*val = host->clk_scaling.curr_freq;

	return 0;
}

static int mmc_scale_set(void *data, u64 val)
{
	int err = 0;
	struct mmc_host *host = data;

	mmc_claim_host(host);

	/* change frequency from sysfs manually */
	err = mmc_clk_update_freq(host, val, host->clk_scaling.state);
	if (err == -EAGAIN)
		err = 0;
	else if (err)
		pr_err("%s: clock scale to %llu failed with error %d\n",
			mmc_hostname(host), val, err);
	else
		pr_debug("%s: clock change to %llu finished successfully (%s)\n",
			mmc_hostname(host), val, current->comm);

	mmc_release_host(host);

	return err;
}

DEFINE_DEBUGFS_ATTRIBUTE(mmc_scale_fops, mmc_scale_get, mmc_scale_set,
	"%llu\n");

static int mmc_max_clock_get(void *data, u64 *val)
{
@@ -314,8 +280,6 @@ void mmc_add_host_debugfs(struct mmc_host *host)
#if defined(CONFIG_SDC_QTI)
	debugfs_create_file("max_clock", 0600, root, host,
		&mmc_max_clock_fops);
	debugfs_create_file("scale", 0600, root, host,
		&mmc_scale_fops);
	debugfs_create_bool("skip_clk_scale_freq_update",
		0600, root,
		&host->clk_scaling.skip_clk_scale_freq_update);