提交 62bb7104 编写于 作者: C Charles Keepax 提交者: Mark Brown

ASoC: arizona: Allow specification of base for arizona_is_enabled_fll

In preparation for future improvements allow a base to be passed to
arizona_is_enabled_fll, this will allow it to be used to check the state
of the synchroniser path as well.
Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 19c89192
...@@ -2188,13 +2188,13 @@ static void arizona_apply_fll(struct arizona *arizona, unsigned int base, ...@@ -2188,13 +2188,13 @@ static void arizona_apply_fll(struct arizona *arizona, unsigned int base,
ARIZONA_FLL1_CTRL_UPD | cfg->n); ARIZONA_FLL1_CTRL_UPD | cfg->n);
} }
static int arizona_is_enabled_fll(struct arizona_fll *fll) static int arizona_is_enabled_fll(struct arizona_fll *fll, int base)
{ {
struct arizona *arizona = fll->arizona; struct arizona *arizona = fll->arizona;
unsigned int reg; unsigned int reg;
int ret; int ret;
ret = regmap_read(arizona->regmap, fll->base + 1, &reg); ret = regmap_read(arizona->regmap, base + 1, &reg);
if (ret != 0) { if (ret != 0) {
arizona_fll_err(fll, "Failed to read current state: %d\n", arizona_fll_err(fll, "Failed to read current state: %d\n",
ret); ret);
...@@ -2208,7 +2208,7 @@ static int arizona_enable_fll(struct arizona_fll *fll) ...@@ -2208,7 +2208,7 @@ static int arizona_enable_fll(struct arizona_fll *fll)
{ {
struct arizona *arizona = fll->arizona; struct arizona *arizona = fll->arizona;
bool use_sync = false; bool use_sync = false;
int already_enabled = arizona_is_enabled_fll(fll); int already_enabled = arizona_is_enabled_fll(fll, fll->base);
struct arizona_fll_cfg cfg; struct arizona_fll_cfg cfg;
int i; int i;
unsigned int val; unsigned int val;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册