~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/mfd/arizona/core.h

Version: ~ [ linux-5.11-rc3 ] ~ [ linux-5.10.7 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.89 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.167 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.215 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.251 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.251 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Arizona MFD internals
  3  *
  4  * Copyright 2012 Wolfson Microelectronics plc
  5  *
  6  * Author: Mark Brown <broonie@opensource.wolfsonmicro.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  */
 12 
 13 #ifndef _WM_ARIZONA_CORE_H
 14 #define _WM_ARIZONA_CORE_H
 15 
 16 #include <linux/interrupt.h>
 17 #include <linux/regmap.h>
 18 #include <linux/regulator/consumer.h>
 19 #include <linux/mfd/arizona/pdata.h>
 20 
 21 #define ARIZONA_MAX_CORE_SUPPLIES 3
 22 
 23 enum arizona_type {
 24         WM5102 = 1,
 25         WM5110 = 2,
 26         WM8997 = 3,
 27 };
 28 
 29 #define ARIZONA_IRQ_GP1                    0
 30 #define ARIZONA_IRQ_GP2                    1
 31 #define ARIZONA_IRQ_GP3                    2
 32 #define ARIZONA_IRQ_GP4                    3
 33 #define ARIZONA_IRQ_GP5_FALL               4
 34 #define ARIZONA_IRQ_GP5_RISE               5
 35 #define ARIZONA_IRQ_JD_FALL                6
 36 #define ARIZONA_IRQ_JD_RISE                7
 37 #define ARIZONA_IRQ_DSP1_RAM_RDY           8
 38 #define ARIZONA_IRQ_DSP2_RAM_RDY           9
 39 #define ARIZONA_IRQ_DSP3_RAM_RDY          10
 40 #define ARIZONA_IRQ_DSP4_RAM_RDY          11
 41 #define ARIZONA_IRQ_DSP_IRQ1              12
 42 #define ARIZONA_IRQ_DSP_IRQ2              13
 43 #define ARIZONA_IRQ_DSP_IRQ3              14
 44 #define ARIZONA_IRQ_DSP_IRQ4              15
 45 #define ARIZONA_IRQ_DSP_IRQ5              16
 46 #define ARIZONA_IRQ_DSP_IRQ6              17
 47 #define ARIZONA_IRQ_DSP_IRQ7              18
 48 #define ARIZONA_IRQ_DSP_IRQ8              19
 49 #define ARIZONA_IRQ_SPK_SHUTDOWN_WARN     20
 50 #define ARIZONA_IRQ_SPK_SHUTDOWN          21
 51 #define ARIZONA_IRQ_MICDET                22
 52 #define ARIZONA_IRQ_HPDET                 23
 53 #define ARIZONA_IRQ_WSEQ_DONE             24
 54 #define ARIZONA_IRQ_DRC2_SIG_DET          25
 55 #define ARIZONA_IRQ_DRC1_SIG_DET          26
 56 #define ARIZONA_IRQ_ASRC2_LOCK            27
 57 #define ARIZONA_IRQ_ASRC1_LOCK            28
 58 #define ARIZONA_IRQ_UNDERCLOCKED          29
 59 #define ARIZONA_IRQ_OVERCLOCKED           30
 60 #define ARIZONA_IRQ_FLL2_LOCK             31
 61 #define ARIZONA_IRQ_FLL1_LOCK             32
 62 #define ARIZONA_IRQ_CLKGEN_ERR            33
 63 #define ARIZONA_IRQ_CLKGEN_ERR_ASYNC      34
 64 #define ARIZONA_IRQ_ASRC_CFG_ERR          35
 65 #define ARIZONA_IRQ_AIF3_ERR              36
 66 #define ARIZONA_IRQ_AIF2_ERR              37
 67 #define ARIZONA_IRQ_AIF1_ERR              38
 68 #define ARIZONA_IRQ_CTRLIF_ERR            39
 69 #define ARIZONA_IRQ_MIXER_DROPPED_SAMPLES 40
 70 #define ARIZONA_IRQ_ASYNC_CLK_ENA_LOW     41
 71 #define ARIZONA_IRQ_SYSCLK_ENA_LOW        42
 72 #define ARIZONA_IRQ_ISRC1_CFG_ERR         43
 73 #define ARIZONA_IRQ_ISRC2_CFG_ERR         44
 74 #define ARIZONA_IRQ_BOOT_DONE             45
 75 #define ARIZONA_IRQ_DCS_DAC_DONE          46
 76 #define ARIZONA_IRQ_DCS_HP_DONE           47
 77 #define ARIZONA_IRQ_FLL2_CLOCK_OK         48
 78 #define ARIZONA_IRQ_FLL1_CLOCK_OK         49
 79 #define ARIZONA_IRQ_MICD_CLAMP_RISE       50
 80 #define ARIZONA_IRQ_MICD_CLAMP_FALL       51
 81 
 82 #define ARIZONA_NUM_IRQ                   52
 83 
 84 struct snd_soc_dapm_context;
 85 
 86 struct arizona {
 87         struct regmap *regmap;
 88         struct device *dev;
 89 
 90         enum arizona_type type;
 91         unsigned int rev;
 92 
 93         int num_core_supplies;
 94         struct regulator_bulk_data core_supplies[ARIZONA_MAX_CORE_SUPPLIES];
 95         struct regulator *dcvdd;
 96 
 97         struct arizona_pdata pdata;
 98 
 99         unsigned int external_dcvdd:1;
100 
101         int irq;
102         struct irq_domain *virq;
103         struct regmap_irq_chip_data *aod_irq_chip;
104         struct regmap_irq_chip_data *irq_chip;
105 
106         bool hpdet_magic;
107         unsigned int hp_ena;
108 
109         struct mutex clk_lock;
110         int clk32k_ref;
111 
112         struct snd_soc_dapm_context *dapm;
113 };
114 
115 int arizona_clk32k_enable(struct arizona *arizona);
116 int arizona_clk32k_disable(struct arizona *arizona);
117 
118 int arizona_request_irq(struct arizona *arizona, int irq, char *name,
119                         irq_handler_t handler, void *data);
120 void arizona_free_irq(struct arizona *arizona, int irq, void *data);
121 int arizona_set_irq_wake(struct arizona *arizona, int irq, int on);
122 
123 int wm5102_patch(struct arizona *arizona);
124 int wm5110_patch(struct arizona *arizona);
125 int wm8997_patch(struct arizona *arizona);
126 
127 #endif
128 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp