]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: arizona: Provide defines for the clock rates
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 8 Mar 2013 07:22:29 +0000 (15:22 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 13 Mar 2013 11:18:57 +0000 (11:18 +0000)
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/arizona.c
sound/soc/codecs/arizona.h

index ad21d8255341085e23179aa3a6906c6501d62535..0c70d503fd322353387990b86d0e4a1ed88241af 100644 (file)
@@ -504,27 +504,27 @@ int arizona_set_sysclk(struct snd_soc_codec *codec, int clk_id,
                break;
        case 11289600:
        case 12288000:
-               val |= 1 << ARIZONA_SYSCLK_FREQ_SHIFT;
+               val |= ARIZONA_CLK_12MHZ << ARIZONA_SYSCLK_FREQ_SHIFT;
                break;
        case 22579200:
        case 24576000:
-               val |= 2 << ARIZONA_SYSCLK_FREQ_SHIFT;
+               val |= ARIZONA_CLK_24MHZ << ARIZONA_SYSCLK_FREQ_SHIFT;
                break;
        case 45158400:
        case 49152000:
-               val |= 3 << ARIZONA_SYSCLK_FREQ_SHIFT;
+               val |= ARIZONA_CLK_49MHZ << ARIZONA_SYSCLK_FREQ_SHIFT;
                break;
        case 67737600:
        case 73728000:
-               val |= 4 << ARIZONA_SYSCLK_FREQ_SHIFT;
+               val |= ARIZONA_CLK_73MHZ << ARIZONA_SYSCLK_FREQ_SHIFT;
                break;
        case 90316800:
        case 98304000:
-               val |= 5 << ARIZONA_SYSCLK_FREQ_SHIFT;
+               val |= ARIZONA_CLK_98MHZ << ARIZONA_SYSCLK_FREQ_SHIFT;
                break;
        case 135475200:
        case 147456000:
-               val |= 6 << ARIZONA_SYSCLK_FREQ_SHIFT;
+               val |= ARIZONA_CLK_147MHZ << ARIZONA_SYSCLK_FREQ_SHIFT;
                break;
        case 0:
                dev_dbg(arizona->dev, "%s cleared\n", name);
index d592adcc969c095a4b722c491968cbe5278299c2..572f11bc90b43fa697178e9fff5c909de958c554 100644 (file)
 #define ARIZONA_MIXER_VOL_SHIFT                 1
 #define ARIZONA_MIXER_VOL_WIDTH                 7
 
+#define ARIZONA_CLK_6MHZ   0
+#define ARIZONA_CLK_12MHZ  1
+#define ARIZONA_CLK_24MHZ  2
+#define ARIZONA_CLK_49MHZ  3
+#define ARIZONA_CLK_73MHZ  4
+#define ARIZONA_CLK_98MHZ  5
+#define ARIZONA_CLK_147MHZ 6
+
 #define ARIZONA_MAX_DAI  4
 #define ARIZONA_MAX_ADSP 4