hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/sound/soc/codecs/da7213.h
....@@ -1,13 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * da7213.h - DA7213 ASoC Codec Driver
34 *
45 * Copyright (c) 2013 Dialog Semiconductor
56 *
67 * 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.
118 */
129
1310 #ifndef _DA7213_H
....@@ -15,6 +12,7 @@
1512
1613 #include <linux/clk.h>
1714 #include <linux/regmap.h>
15
+#include <linux/regulator/consumer.h>
1816 #include <sound/da7213.h>
1917
2018 /*
....@@ -181,7 +179,9 @@
181179 #define DA7213_DAI_BCLKS_PER_WCLK_256 (0x3 << 0)
182180 #define DA7213_DAI_BCLKS_PER_WCLK_MASK (0x3 << 0)
183181 #define DA7213_DAI_CLK_POL_INV (0x1 << 2)
182
+#define DA7213_DAI_CLK_POL_MASK (0x1 << 2)
184183 #define DA7213_DAI_WCLK_POL_INV (0x1 << 3)
184
+#define DA7213_DAI_WCLK_POL_MASK (0x1 << 3)
185185 #define DA7213_DAI_CLK_EN_MASK (0x1 << 7)
186186
187187 /* DA7213_DAI_CTRL = 0x29 */
....@@ -522,15 +522,25 @@
522522 DA7213_SYSCLK_PLL_32KHZ
523523 };
524524
525
+/* Regulators */
526
+enum da7213_supplies {
527
+ DA7213_SUPPLY_VDDA = 0,
528
+ DA7213_SUPPLY_VDDIO,
529
+ DA7213_NUM_SUPPLIES,
530
+};
531
+
525532 /* Codec private data */
526533 struct da7213_priv {
527534 struct regmap *regmap;
535
+ struct regulator_bulk_data supplies[DA7213_NUM_SUPPLIES];
528536 struct clk *mclk;
529537 unsigned int mclk_rate;
538
+ unsigned int out_rate;
530539 int clk_src;
531540 bool master;
532541 bool alc_calib_auto;
533542 bool alc_en;
543
+ bool fixed_clk_auto_pll;
534544 struct da7213_platform_data *pdata;
535545 };
536546