From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Kalle Valo <kvalo@codeaurora.org>, Govind Singh <govinds@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>,
ath10k@lists.infradead.org, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: [PATCH 1/3] ath10k: snoc: skip regulator operations
Date: Thu, 25 Jul 2019 10:47:53 -0700 [thread overview]
Message-ID: <20190725174755.23432-2-bjorn.andersson@linaro.org> (raw)
In-Reply-To: <20190725174755.23432-1-bjorn.andersson@linaro.org>
The regulator operations is trying to set a voltage to a fixed value, by
giving some wiggle room. But some board designs specifies regulator
voltages outside this limited range. One such example is the Lenovo Yoga
C630, with vdd-3.3-ch0 in particular specified at 3.1V.
But consumers with fixed voltage requirements should just rely on the
board configuration to provide the power at the required level, so this
code should be removed.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
This patch is required for Lenovo Yoga C630 to succeed in power on ath10k, it
can be merged independently of the two following cleanup patches.
drivers/net/wireless/ath/ath10k/snoc.c | 27 ++++++--------------------
drivers/net/wireless/ath/ath10k/snoc.h | 2 --
2 files changed, 6 insertions(+), 23 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index fc15a0037f0e..3d93ab09a298 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -37,10 +37,10 @@ static char *const ce_name[] = {
};
static struct ath10k_vreg_info vreg_cfg[] = {
- {NULL, "vdd-0.8-cx-mx", 800000, 850000, 0, 0, false},
- {NULL, "vdd-1.8-xo", 1800000, 1850000, 0, 0, false},
- {NULL, "vdd-1.3-rfa", 1300000, 1350000, 0, 0, false},
- {NULL, "vdd-3.3-ch0", 3300000, 3350000, 0, 0, false},
+ {NULL, "vdd-0.8-cx-mx", 0, 0, false},
+ {NULL, "vdd-1.8-xo", 0, 0, false},
+ {NULL, "vdd-1.3-rfa", 0, 0, false},
+ {NULL, "vdd-3.3-ch0", 0, 0, false},
};
static struct ath10k_clk_info clk_cfg[] = {
@@ -1377,9 +1377,8 @@ static int ath10k_get_vreg_info(struct ath10k *ar, struct device *dev,
done:
ath10k_dbg(ar, ATH10K_DBG_SNOC,
- "snog vreg %s min_v %u max_v %u load_ua %u settle_delay %lu\n",
- vreg_info->name, vreg_info->min_v, vreg_info->max_v,
- vreg_info->load_ua, vreg_info->settle_delay);
+ "snog vreg %s load_ua %u settle_delay %lu\n",
+ vreg_info->name, vreg_info->load_ua, vreg_info->settle_delay);
return 0;
}
@@ -1420,15 +1419,6 @@ static int __ath10k_snoc_vreg_on(struct ath10k *ar,
ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc regulator %s being enabled\n",
vreg_info->name);
- ret = regulator_set_voltage(vreg_info->reg, vreg_info->min_v,
- vreg_info->max_v);
- if (ret) {
- ath10k_err(ar,
- "failed to set regulator %s voltage-min: %d voltage-max: %d\n",
- vreg_info->name, vreg_info->min_v, vreg_info->max_v);
- return ret;
- }
-
if (vreg_info->load_ua) {
ret = regulator_set_load(vreg_info->reg, vreg_info->load_ua);
if (ret < 0) {
@@ -1453,7 +1443,6 @@ static int __ath10k_snoc_vreg_on(struct ath10k *ar,
err_enable:
regulator_set_load(vreg_info->reg, 0);
err_set_load:
- regulator_set_voltage(vreg_info->reg, 0, vreg_info->max_v);
return ret;
}
@@ -1475,10 +1464,6 @@ static int __ath10k_snoc_vreg_off(struct ath10k *ar,
if (ret < 0)
ath10k_err(ar, "failed to set load %s\n", vreg_info->name);
- ret = regulator_set_voltage(vreg_info->reg, 0, vreg_info->max_v);
- if (ret)
- ath10k_err(ar, "failed to set voltage %s\n", vreg_info->name);
-
return ret;
}
diff --git a/drivers/net/wireless/ath/ath10k/snoc.h b/drivers/net/wireless/ath/ath10k/snoc.h
index 9db823e46314..1bf7bd4ef2a3 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.h
+++ b/drivers/net/wireless/ath/ath10k/snoc.h
@@ -45,8 +45,6 @@ struct ath10k_snoc_ce_irq {
struct ath10k_vreg_info {
struct regulator *reg;
const char *name;
- u32 min_v;
- u32 max_v;
u32 load_ua;
unsigned long settle_delay;
bool required;
--
2.18.0
next prev parent reply other threads:[~2019-07-25 17:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 17:47 [PATCH 0/3] ath10k: Clean up regulator and clock handling Bjorn Andersson
2019-07-25 17:47 ` Bjorn Andersson [this message]
2019-09-17 14:04 ` [PATCH 1/3] ath10k: snoc: skip regulator operations Kalle Valo
2019-07-25 17:47 ` [PATCH 2/3] ath10k: Use standard regulator bulk API in snoc Bjorn Andersson
2019-07-25 17:47 ` [PATCH 3/3] ath10k: Use standard bulk clock " Bjorn Andersson
2019-07-26 6:52 ` [PATCH 0/3] ath10k: Clean up regulator and clock handling Govind Singh
2019-08-05 18:06 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190725174755.23432-2-bjorn.andersson@linaro.org \
--to=bjorn.andersson@linaro.org \
--cc=ath10k@lists.infradead.org \
--cc=davem@davemloft.net \
--cc=govinds@codeaurora.org \
--cc=kvalo@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).