ASoC: max9867: Calculate LRCLK divider
Drop "Common NI Values Table" and calculate LRCLK divider, then add allowed rate constraints based on master clock frequency. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committed by
Mark Brown

parent
29f58ff067
commit
715ee1916b
@@ -26,13 +26,11 @@
|
||||
#define MAX9867_PSCLK_10_20 0x1
|
||||
#define MAX9867_PSCLK_20_40 0x2
|
||||
#define MAX9867_PSCLK_40_60 0x3
|
||||
#define MAX9867_AUDIOCLKHIGH 0x06
|
||||
#define MAX9867_NI_HIGH_WIDTH 0x7
|
||||
#define MAX9867_NI_HIGH_MASK 0x7F
|
||||
#define MAX9867_NI_LOW_MASK 0x7F
|
||||
#define MAX9867_NI_LOW_SHIFT 0x1
|
||||
#define MAX9867_PLL (1<<7)
|
||||
#define MAX9867_AUDIOCLKLOW 0x07
|
||||
#define MAX9867_AUDIOCLKHIGH 0x06
|
||||
#define MAX9867_NI_HIGH_MASK 0x7F
|
||||
#define MAX9867_NI_LOW_MASK 0xFE
|
||||
#define MAX9867_PLL (1<<7)
|
||||
#define MAX9867_AUDIOCLKLOW 0x07
|
||||
#define MAX9867_RAPID_LOCK 0x01
|
||||
#define MAX9867_IFC1A 0x08
|
||||
#define MAX9867_MASTER (1<<7)
|
||||
@@ -43,12 +41,12 @@
|
||||
#define MAX9867_BCI_MODE (1<<5)
|
||||
#define MAX9867_IFC1B 0x09
|
||||
#define MAX9867_IFC1B_BCLK_MASK 7
|
||||
#define MAX9867_IFC1B_32BIT 0x01
|
||||
#define MAX9867_IFC1B_24BIT 0x02
|
||||
#define MAX9867_IFC1B_PCLK_2 4
|
||||
#define MAX9867_IFC1B_PCLK_4 5
|
||||
#define MAX9867_IFC1B_PCLK_8 6
|
||||
#define MAX9867_IFC1B_PCLK_16 7
|
||||
#define MAX9867_IFC1B_64X 0x01
|
||||
#define MAX9867_IFC1B_48X 0x02
|
||||
#define MAX9867_IFC1B_PCLK_2 0x04
|
||||
#define MAX9867_IFC1B_PCLK_4 0x05
|
||||
#define MAX9867_IFC1B_PCLK_8 0x06
|
||||
#define MAX9867_IFC1B_PCLK_16 0x07
|
||||
#define MAX9867_CODECFLTR 0x0a
|
||||
#define MAX9867_DACGAIN 0x0b
|
||||
#define MAX9867_DACLEVEL 0x0c
|
||||
@@ -72,11 +70,4 @@
|
||||
|
||||
#define MAX9867_CACHEREGNUM 10
|
||||
|
||||
/* codec private data */
|
||||
struct max9867_priv {
|
||||
struct regmap *regmap;
|
||||
unsigned int sysclk;
|
||||
unsigned int pclk;
|
||||
unsigned int master;
|
||||
};
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user