diff options
author | Richard Fitzgerald <rf@opensource.wolfsonmicro.com> | 2015-05-01 16:15:12 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2015-06-22 12:25:16 +0100 |
commit | fc027d138b79537e5353f3d3bad2bcaac787cd17 (patch) | |
tree | 12a9a5adc00ce7167bc59f2ecad8eac409047653 /drivers/mfd | |
parent | 121c075c1f845c2e75d61a4e7aac92d05d2def6e (diff) |
mfd: arizona: Split INx_MODE into two fields
Later arizona silicon has the single/differential selector
in a different register, and IN1_MODE only selects between
analogue or digital. Prepare for this by splitting the
INx_MODE definition into two fields.
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/arizona-core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c index cb8a1b2f07f1..bebf58a06a6b 100644 --- a/drivers/mfd/arizona-core.c +++ b/drivers/mfd/arizona-core.c @@ -1206,12 +1206,16 @@ int arizona_dev_init(struct arizona *arizona) /* Default for both is 0 so noop with defaults */ val = arizona->pdata.dmic_ref[i] << ARIZONA_IN1_DMIC_SUP_SHIFT; - val |= arizona->pdata.inmode[i] << ARIZONA_IN1_MODE_SHIFT; + if (arizona->pdata.inmode[i] & ARIZONA_INMODE_DMIC) + val |= 1 << ARIZONA_IN1_MODE_SHIFT; + if (arizona->pdata.inmode[i] & ARIZONA_INMODE_SE) + val |= 1 << ARIZONA_IN1_SINGLE_ENDED_SHIFT; regmap_update_bits(arizona->regmap, ARIZONA_IN1L_CONTROL + (i * 8), ARIZONA_IN1_DMIC_SUP_MASK | - ARIZONA_IN1_MODE_MASK, val); + ARIZONA_IN1_MODE_MASK | + ARIZONA_IN1_SINGLE_ENDED_MASK, val); } for (i = 0; i < ARIZONA_MAX_OUTPUT; i++) { |