.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * da7213.h - DA7213 ASoC Codec Driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2013 Dialog Semiconductor |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | 8 | */ |
---|
12 | 9 | |
---|
13 | 10 | #ifndef _DA7213_H |
---|
.. | .. |
---|
15 | 12 | |
---|
16 | 13 | #include <linux/clk.h> |
---|
17 | 14 | #include <linux/regmap.h> |
---|
| 15 | +#include <linux/regulator/consumer.h> |
---|
18 | 16 | #include <sound/da7213.h> |
---|
19 | 17 | |
---|
20 | 18 | /* |
---|
.. | .. |
---|
181 | 179 | #define DA7213_DAI_BCLKS_PER_WCLK_256 (0x3 << 0) |
---|
182 | 180 | #define DA7213_DAI_BCLKS_PER_WCLK_MASK (0x3 << 0) |
---|
183 | 181 | #define DA7213_DAI_CLK_POL_INV (0x1 << 2) |
---|
| 182 | +#define DA7213_DAI_CLK_POL_MASK (0x1 << 2) |
---|
184 | 183 | #define DA7213_DAI_WCLK_POL_INV (0x1 << 3) |
---|
| 184 | +#define DA7213_DAI_WCLK_POL_MASK (0x1 << 3) |
---|
185 | 185 | #define DA7213_DAI_CLK_EN_MASK (0x1 << 7) |
---|
186 | 186 | |
---|
187 | 187 | /* DA7213_DAI_CTRL = 0x29 */ |
---|
.. | .. |
---|
522 | 522 | DA7213_SYSCLK_PLL_32KHZ |
---|
523 | 523 | }; |
---|
524 | 524 | |
---|
| 525 | +/* Regulators */ |
---|
| 526 | +enum da7213_supplies { |
---|
| 527 | + DA7213_SUPPLY_VDDA = 0, |
---|
| 528 | + DA7213_SUPPLY_VDDIO, |
---|
| 529 | + DA7213_NUM_SUPPLIES, |
---|
| 530 | +}; |
---|
| 531 | + |
---|
525 | 532 | /* Codec private data */ |
---|
526 | 533 | struct da7213_priv { |
---|
527 | 534 | struct regmap *regmap; |
---|
| 535 | + struct regulator_bulk_data supplies[DA7213_NUM_SUPPLIES]; |
---|
528 | 536 | struct clk *mclk; |
---|
529 | 537 | unsigned int mclk_rate; |
---|
| 538 | + unsigned int out_rate; |
---|
530 | 539 | int clk_src; |
---|
531 | 540 | bool master; |
---|
532 | 541 | bool alc_calib_auto; |
---|
533 | 542 | bool alc_en; |
---|
| 543 | + bool fixed_clk_auto_pll; |
---|
534 | 544 | struct da7213_platform_data *pdata; |
---|
535 | 545 | }; |
---|
536 | 546 | |
---|