Re: [PATCH v3 04/16] Platform: OLPC: Move OLPC config symbol out of x86 tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lubomir,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.0-rc1 next-20190107]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Lubomir-Rintel/Add-support-for-OLPC-XO-1-75-Embedded-Controller/20190108-114514
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

>> sound/pci/cs5535audio/cs5535audio_olpc.c:28:6: error: redefinition of 'olpc_analog_input'
    void olpc_analog_input(struct snd_ac97 *ac97, int on)
         ^~~~~~~~~~~~~~~~~
   In file included from sound/pci/cs5535audio/cs5535audio_olpc.c:19:0:
   sound/pci/cs5535audio/cs5535audio.h:131:20: note: previous definition of 'olpc_analog_input' was here
    static inline void olpc_analog_input(struct snd_ac97 *ac97, int on) { }
                       ^~~~~~~~~~~~~~~~~
>> sound/pci/cs5535audio/cs5535audio_olpc.c:51:6: error: redefinition of 'olpc_mic_bias'
    void olpc_mic_bias(struct snd_ac97 *ac97, int on)
         ^~~~~~~~~~~~~
   In file included from sound/pci/cs5535audio/cs5535audio_olpc.c:19:0:
   sound/pci/cs5535audio/cs5535audio.h:132:20: note: previous definition of 'olpc_mic_bias' was here
    static inline void olpc_mic_bias(struct snd_ac97 *ac97, int on) { }
                       ^~~~~~~~~~~~~
>> sound/pci/cs5535audio/cs5535audio_olpc.c:137:6: error: redefinition of 'olpc_prequirks'
    void olpc_prequirks(struct snd_card *card,
         ^~~~~~~~~~~~~~
   In file included from sound/pci/cs5535audio/cs5535audio_olpc.c:19:0:
   sound/pci/cs5535audio/cs5535audio.h:124:20: note: previous definition of 'olpc_prequirks' was here
    static inline void olpc_prequirks(struct snd_card *card,
                       ^~~~~~~~~~~~~~
   sound/pci/cs5535audio/cs5535audio_olpc.c: In function 'olpc_prequirks':
>> sound/pci/cs5535audio/cs5535audio_olpc.c:144:6: error: implicit declaration of function 'olpc_board_at_least' [-Werror=implicit-function-declaration]
     if (olpc_board_at_least(olpc_board_pre(0xb3)))
         ^~~~~~~~~~~~~~~~~~~
>> sound/pci/cs5535audio/cs5535audio_olpc.c:144:26: error: implicit declaration of function 'olpc_board_pre'; did you mean 'olpc_mic_put'? [-Werror=implicit-function-declaration]
     if (olpc_board_at_least(olpc_board_pre(0xb3)))
                             ^~~~~~~~~~~~~~
                             olpc_mic_put
   sound/pci/cs5535audio/cs5535audio_olpc.c: At top level:
>> sound/pci/cs5535audio/cs5535audio_olpc.c:148:5: error: redefinition of 'olpc_quirks'
    int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
        ^~~~~~~~~~~
   In file included from sound/pci/cs5535audio/cs5535audio_olpc.c:19:0:
   sound/pci/cs5535audio/cs5535audio.h:126:19: note: previous definition of 'olpc_quirks' was here
    static inline int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
                      ^~~~~~~~~~~
>> sound/pci/cs5535audio/cs5535audio_olpc.c:189:6: error: redefinition of 'olpc_quirks_cleanup'
    void olpc_quirks_cleanup(void)
         ^~~~~~~~~~~~~~~~~~~
   In file included from sound/pci/cs5535audio/cs5535audio_olpc.c:19:0:
   sound/pci/cs5535audio/cs5535audio.h:130:20: note: previous definition of 'olpc_quirks_cleanup' was here
    static inline void olpc_quirks_cleanup(void) { }
                       ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from include/linux/export.h:45:0,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:7,
                    from drivers/staging/olpc_dcon/olpc_dcon.c:13:
   drivers/staging/olpc_dcon/olpc_dcon.c: In function 'dcon_bus_stabilize':
>> drivers/staging/olpc_dcon/olpc_dcon.c:141:10: error: implicit declaration of function 'olpc_board_at_least' [-Werror=implicit-function-declaration]
      BUG_ON(olpc_board_at_least(olpc_board(0xc2)));
             ^
   include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
>> drivers/staging/olpc_dcon/olpc_dcon.c:141:3: note: in expansion of macro 'BUG_ON'
      BUG_ON(olpc_board_at_least(olpc_board(0xc2)));
      ^~~~~~
>> drivers/staging/olpc_dcon/olpc_dcon.c:141:30: error: implicit declaration of function 'olpc_board'; did you mean 'olpc_ec_cmd'? [-Werror=implicit-function-declaration]
      BUG_ON(olpc_board_at_least(olpc_board(0xc2)));
                                 ^
   include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
>> drivers/staging/olpc_dcon/olpc_dcon.c:141:3: note: in expansion of macro 'BUG_ON'
      BUG_ON(olpc_board_at_least(olpc_board(0xc2)));
      ^~~~~~
   cc1: some warnings being treated as errors
--
   arch/x86/platform/olpc/olpc-xo15-sci.c: In function 'process_sci_queue':
>> arch/x86/platform/olpc/olpc-xo15-sci.c:106:7: error: implicit declaration of function 'olpc_ec_sci_query'; did you mean 'process_sci_queue'? [-Werror=implicit-function-declaration]
      r = olpc_ec_sci_query(&data);
          ^~~~~~~~~~~~~~~~~
          process_sci_queue
   arch/x86/platform/olpc/olpc-xo15-sci.c: In function 'xo15_sci_add':
>> arch/x86/platform/olpc/olpc-xo15-sci.c:174:2: error: implicit declaration of function 'olpc_ec_mask_write'; did you mean 'olpc_ec_wakeup_set'? [-Werror=implicit-function-declaration]
     olpc_ec_mask_write(EC_SCI_SRC_ALL);
     ^~~~~~~~~~~~~~~~~~
     olpc_ec_wakeup_set
   cc1: some warnings being treated as errors
--
   arch/x86/platform/olpc/olpc.c:189:6: error: redefinition of 'olpc_ec_wakeup_set'
    void olpc_ec_wakeup_set(u16 value)
         ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/platform/olpc/olpc.c:27:0:
   arch/x86/include/asm/olpc.h:86:20: note: previous definition of 'olpc_ec_wakeup_set' was here
    static inline void olpc_ec_wakeup_set(u16 value) { }
                       ^~~~~~~~~~~~~~~~~~
   arch/x86/platform/olpc/olpc.c:195:6: error: redefinition of 'olpc_ec_wakeup_clear'
    void olpc_ec_wakeup_clear(u16 value)
         ^~~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/platform/olpc/olpc.c:27:0:
   arch/x86/include/asm/olpc.h:87:20: note: previous definition of 'olpc_ec_wakeup_clear' was here
    static inline void olpc_ec_wakeup_clear(u16 value) { }
                       ^~~~~~~~~~~~~~~~~~~~
   arch/x86/platform/olpc/olpc.c:205:6: error: redefinition of 'olpc_ec_wakeup_available'
    bool olpc_ec_wakeup_available(void)
         ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/platform/olpc/olpc.c:27:0:
   arch/x86/include/asm/olpc.h:89:20: note: previous definition of 'olpc_ec_wakeup_available' was here
    static inline bool olpc_ec_wakeup_available(void)
                       ^~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/platform/olpc/olpc.c: In function 'olpc_ec_wakeup_available':
>> arch/x86/platform/olpc/olpc.c:224:37: error: implicit declaration of function 'olpc_board_pre' [-Werror=implicit-function-declaration]
     if (olpc_platform_info.boardrev >= olpc_board_pre(0xd0)) /* XO-1.5 */
                                        ^~~~~~~~~~~~~~
   arch/x86/platform/olpc/olpc.c: In function 'olpc_init':
>> arch/x86/platform/olpc/olpc.c:377:7: error: implicit declaration of function 'olpc_ofw_present'; did you mean 'olpc_ofw_detect'? [-Werror=implicit-function-declaration]
     if (!olpc_ofw_present() || !platform_detect())
          ^~~~~~~~~~~~~~~~
          olpc_ofw_detect
>> arch/x86/platform/olpc/olpc.c:382:3: error: implicit declaration of function 'olpc_ec_driver_register'; did you mean 'platform_driver_register'? [-Werror=implicit-function-declaration]
      olpc_ec_driver_register(&ec_xo1_driver, NULL);
      ^~~~~~~~~~~~~~~~~~~~~~~
      platform_driver_register
>> arch/x86/platform/olpc/olpc.c:388:6: error: implicit declaration of function 'olpc_board_at_least' [-Werror=implicit-function-declaration]
     if (olpc_board_at_least(olpc_board(0xb1)))
         ^~~~~~~~~~~~~~~~~~~
>> arch/x86/platform/olpc/olpc.c:388:26: error: implicit declaration of function 'olpc_board'; did you mean 'olpc_init'? [-Werror=implicit-function-declaration]
     if (olpc_board_at_least(olpc_board(0xb1)))
                             ^~~~~~~~~~
                             olpc_init
   arch/x86/platform/olpc/olpc.c: At top level:
>> arch/x86/platform/olpc/olpc.c:408:1: warning: data definition has no type or storage class
    postcore_initcall(olpc_init);
    ^~~~~~~~~~~~~~~~~
>> arch/x86/platform/olpc/olpc.c:408:1: error: type defaults to 'int' in declaration of 'postcore_initcall' [-Werror=implicit-int]
>> arch/x86/platform/olpc/olpc.c:408:1: warning: parameter names (without types) in function declaration
   arch/x86/platform/olpc/olpc.c:373:19: warning: 'olpc_init' defined but not used [-Wunused-function]
    static int __init olpc_init(void)
                      ^~~~~~~~~
   arch/x86/platform/olpc/olpc.c:42:19: warning: 'olpc_ec_timeout_set' defined but not used [-Wunused-function]
    static int __init olpc_ec_timeout_set(char *str)
                      ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
>> arch/x86/platform/olpc/olpc_ofw.c:23:13: error: redefinition of 'setup_olpc_ofw_pgd'
    void __init setup_olpc_ofw_pgd(void)
                ^~~~~~~~~~~~~~~~~~
   In file included from arch/x86/platform/olpc/olpc_ofw.c:11:0:
   arch/x86/include/asm/olpc_ofw.h:34:20: note: previous definition of 'setup_olpc_ofw_pgd' was here
    static inline void setup_olpc_ofw_pgd(void) { }
                       ^~~~~~~~~~~~~~~~~~
>> arch/x86/platform/olpc/olpc_ofw.c:92:13: error: redefinition of 'olpc_ofw_detect'
    void __init olpc_ofw_detect(void)
                ^~~~~~~~~~~~~~~
   In file included from arch/x86/platform/olpc/olpc_ofw.c:11:0:
   arch/x86/include/asm/olpc_ofw.h:33:20: note: previous definition of 'olpc_ofw_detect' was here
    static inline void olpc_ofw_detect(void) { }
                       ^~~~~~~~~~~~~~~
--
   arch/x86/platform/olpc/olpc_dt.c: In function 'olpc_dt_getsibling':
>> arch/x86/platform/olpc/olpc_dt.c:34:6: error: implicit declaration of function 'olpc_ofw' [-Werror=implicit-function-declaration]
     if (olpc_ofw("peer", args, res) || (s32)node == -1)
         ^~~~~~~~
   arch/x86/platform/olpc/olpc_dt.c: In function 'olpc_dt_fixup':
>> arch/x86/platform/olpc/olpc_dt.c:250:19: error: implicit declaration of function 'olpc_board_pre' [-Werror=implicit-function-declaration]
     if (board_rev >= olpc_board_pre(0xd0)) {
                      ^~~~~~~~~~~~~~
   arch/x86/platform/olpc/olpc_dt.c: At top level:
>> arch/x86/platform/olpc/olpc_dt.c:268:13: error: redefinition of 'olpc_dt_build_devicetree'
    void __init olpc_dt_build_devicetree(void)
                ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/platform/olpc/olpc_dt.c:24:0:
   arch/x86/include/asm/olpc_ofw.h:35:20: note: previous definition of 'olpc_dt_build_devicetree' was here
    static inline void olpc_dt_build_devicetree(void) { }
                       ^~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/platform/olpc/olpc_dt.c: In function 'olpc_dt_build_devicetree':
>> arch/x86/platform/olpc/olpc_dt.c:272:7: error: implicit declaration of function 'olpc_ofw_is_installed' [-Werror=implicit-function-declaration]
     if (!olpc_ofw_is_installed())
          ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/input/mouse/hgpk.c: In function 'hgpk_reconnect':
>> drivers/input/mouse/hgpk.c:763:6: error: implicit declaration of function 'olpc_board_at_least' [-Werror=implicit-function-declaration]
     if (olpc_board_at_least(olpc_board(0xb2)))
         ^~~~~~~~~~~~~~~~~~~
>> drivers/input/mouse/hgpk.c:763:26: error: implicit declaration of function 'olpc_board'; did you mean 'Elf_Word'? [-Werror=implicit-function-declaration]
     if (olpc_board_at_least(olpc_board(0xb2)))
                             ^~~~~~~~~~
                             Elf_Word
   cc1: some warnings being treated as errors

vim +/olpc_analog_input +28 sound/pci/cs5535audio/cs5535audio_olpc.c

c8974be546 Jordan Crouse  2008-11-06   17  
c8974be546 Jordan Crouse  2008-11-06   18  #include <asm/olpc.h>
57d4bf6d8e Jaya Kumar     2008-11-06  @19  #include "cs5535audio.h"
57d4bf6d8e Jaya Kumar     2008-11-06   20  
3c55494670 Andres Salomon 2009-12-14   21  #define DRV_NAME "cs5535audio-olpc"
3c55494670 Andres Salomon 2009-12-14   22  
d6276b7802 Andres Salomon 2008-11-06   23  /*
d6276b7802 Andres Salomon 2008-11-06   24   * OLPC has an additional feature on top of the regular AD1888 codec features.
d6276b7802 Andres Salomon 2008-11-06   25   * It has an Analog Input mode that is switched into (after disabling the
d6276b7802 Andres Salomon 2008-11-06   26   * High Pass Filter) via GPIO.  It is supported on B2 and later models.
d6276b7802 Andres Salomon 2008-11-06   27   */
d6276b7802 Andres Salomon 2008-11-06  @28  void olpc_analog_input(struct snd_ac97 *ac97, int on)
d6276b7802 Andres Salomon 2008-11-06   29  {
d6276b7802 Andres Salomon 2008-11-06   30  	int err;
d6276b7802 Andres Salomon 2008-11-06   31  
0fb497f5b6 Andres Salomon 2008-11-06   32  	if (!machine_is_olpc())
0fb497f5b6 Andres Salomon 2008-11-06   33  		return;
0fb497f5b6 Andres Salomon 2008-11-06   34  
d6276b7802 Andres Salomon 2008-11-06   35  	/* update the High Pass Filter (via AC97_AD_TEST2) */
d6276b7802 Andres Salomon 2008-11-06   36  	err = snd_ac97_update_bits(ac97, AC97_AD_TEST2,
d6276b7802 Andres Salomon 2008-11-06   37  			1 << AC97_AD_HPFD_SHIFT, on << AC97_AD_HPFD_SHIFT);
d6276b7802 Andres Salomon 2008-11-06   38  	if (err < 0) {
00980aa9c7 Takashi Iwai   2014-02-25   39  		dev_err(ac97->bus->card->dev,
00980aa9c7 Takashi Iwai   2014-02-25   40  			"setting High Pass Filter - %d\n", err);
d6276b7802 Andres Salomon 2008-11-06   41  		return;
d6276b7802 Andres Salomon 2008-11-06   42  	}
d6276b7802 Andres Salomon 2008-11-06   43  
d6276b7802 Andres Salomon 2008-11-06   44  	/* set Analog Input through GPIO */
3c55494670 Andres Salomon 2009-12-14   45  	gpio_set_value(OLPC_GPIO_MIC_AC, on);
d6276b7802 Andres Salomon 2008-11-06   46  }
57d4bf6d8e Jaya Kumar     2008-11-06   47  
bf1e527835 Andres Salomon 2008-11-06   48  /*
bf1e527835 Andres Salomon 2008-11-06   49   * OLPC XO-1's V_REFOUT is a mic bias enable.
bf1e527835 Andres Salomon 2008-11-06   50   */
bf1e527835 Andres Salomon 2008-11-06  @51  void olpc_mic_bias(struct snd_ac97 *ac97, int on)
bf1e527835 Andres Salomon 2008-11-06   52  {
bf1e527835 Andres Salomon 2008-11-06   53  	int err;
bf1e527835 Andres Salomon 2008-11-06   54  
0fb497f5b6 Andres Salomon 2008-11-06   55  	if (!machine_is_olpc())
0fb497f5b6 Andres Salomon 2008-11-06   56  		return;
0fb497f5b6 Andres Salomon 2008-11-06   57  
bf1e527835 Andres Salomon 2008-11-06   58  	on = on ? 0 : 1;
bf1e527835 Andres Salomon 2008-11-06   59  	err = snd_ac97_update_bits(ac97, AC97_AD_MISC,
bf1e527835 Andres Salomon 2008-11-06   60  			1 << AC97_AD_VREFD_SHIFT, on << AC97_AD_VREFD_SHIFT);
bf1e527835 Andres Salomon 2008-11-06   61  	if (err < 0)
00980aa9c7 Takashi Iwai   2014-02-25   62  		dev_err(ac97->bus->card->dev, "setting MIC Bias - %d\n", err);
bf1e527835 Andres Salomon 2008-11-06   63  }
bf1e527835 Andres Salomon 2008-11-06   64  
466ae3055b Andres Salomon 2008-11-06   65  static int olpc_dc_info(struct snd_kcontrol *kctl,
57d4bf6d8e Jaya Kumar     2008-11-06   66  		struct snd_ctl_elem_info *uinfo)
57d4bf6d8e Jaya Kumar     2008-11-06   67  {
57d4bf6d8e Jaya Kumar     2008-11-06   68  	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
57d4bf6d8e Jaya Kumar     2008-11-06   69  	uinfo->count = 1;
57d4bf6d8e Jaya Kumar     2008-11-06   70  	uinfo->value.integer.min = 0;
57d4bf6d8e Jaya Kumar     2008-11-06   71  	uinfo->value.integer.max = 1;
57d4bf6d8e Jaya Kumar     2008-11-06   72  	return 0;
57d4bf6d8e Jaya Kumar     2008-11-06   73  }
57d4bf6d8e Jaya Kumar     2008-11-06   74  
466ae3055b Andres Salomon 2008-11-06   75  static int olpc_dc_get(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *v)
57d4bf6d8e Jaya Kumar     2008-11-06   76  {
3c55494670 Andres Salomon 2009-12-14   77  	v->value.integer.value[0] = gpio_get_value(OLPC_GPIO_MIC_AC);
57d4bf6d8e Jaya Kumar     2008-11-06   78  	return 0;
57d4bf6d8e Jaya Kumar     2008-11-06   79  }
57d4bf6d8e Jaya Kumar     2008-11-06   80  
466ae3055b Andres Salomon 2008-11-06   81  static int olpc_dc_put(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *v)
57d4bf6d8e Jaya Kumar     2008-11-06   82  {
466ae3055b Andres Salomon 2008-11-06   83  	struct cs5535audio *cs5535au = snd_kcontrol_chip(kctl);
57d4bf6d8e Jaya Kumar     2008-11-06   84  
466ae3055b Andres Salomon 2008-11-06   85  	olpc_analog_input(cs5535au->ac97, v->value.integer.value[0]);
57d4bf6d8e Jaya Kumar     2008-11-06   86  	return 1;
57d4bf6d8e Jaya Kumar     2008-11-06   87  }
57d4bf6d8e Jaya Kumar     2008-11-06   88  
bf1e527835 Andres Salomon 2008-11-06   89  static int olpc_mic_info(struct snd_kcontrol *kctl,
bf1e527835 Andres Salomon 2008-11-06   90  		struct snd_ctl_elem_info *uinfo)
bf1e527835 Andres Salomon 2008-11-06   91  {
bf1e527835 Andres Salomon 2008-11-06   92  	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
bf1e527835 Andres Salomon 2008-11-06   93  	uinfo->count = 1;
bf1e527835 Andres Salomon 2008-11-06   94  	uinfo->value.integer.min = 0;
bf1e527835 Andres Salomon 2008-11-06   95  	uinfo->value.integer.max = 1;
bf1e527835 Andres Salomon 2008-11-06   96  	return 0;
bf1e527835 Andres Salomon 2008-11-06   97  }
bf1e527835 Andres Salomon 2008-11-06   98  
bf1e527835 Andres Salomon 2008-11-06   99  static int olpc_mic_get(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *v)
bf1e527835 Andres Salomon 2008-11-06  100  {
bf1e527835 Andres Salomon 2008-11-06  101  	struct cs5535audio *cs5535au = snd_kcontrol_chip(kctl);
bf1e527835 Andres Salomon 2008-11-06  102  	struct snd_ac97 *ac97 = cs5535au->ac97;
bf1e527835 Andres Salomon 2008-11-06  103  	int i;
bf1e527835 Andres Salomon 2008-11-06  104  
bf1e527835 Andres Salomon 2008-11-06  105  	i = (snd_ac97_read(ac97, AC97_AD_MISC) >> AC97_AD_VREFD_SHIFT) & 0x1;
bf1e527835 Andres Salomon 2008-11-06  106  	v->value.integer.value[0] = i ? 0 : 1;
bf1e527835 Andres Salomon 2008-11-06  107  	return 0;
bf1e527835 Andres Salomon 2008-11-06  108  }
bf1e527835 Andres Salomon 2008-11-06  109  
bf1e527835 Andres Salomon 2008-11-06  110  static int olpc_mic_put(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *v)
bf1e527835 Andres Salomon 2008-11-06  111  {
bf1e527835 Andres Salomon 2008-11-06  112  	struct cs5535audio *cs5535au = snd_kcontrol_chip(kctl);
bf1e527835 Andres Salomon 2008-11-06  113  
bf1e527835 Andres Salomon 2008-11-06  114  	olpc_mic_bias(cs5535au->ac97, v->value.integer.value[0]);
bf1e527835 Andres Salomon 2008-11-06  115  	return 1;
bf1e527835 Andres Salomon 2008-11-06  116  }
bf1e527835 Andres Salomon 2008-11-06  117  
e23e7a1436 Bill Pemberton 2012-12-06  118  static struct snd_kcontrol_new olpc_cs5535audio_ctls[] = {
57d4bf6d8e Jaya Kumar     2008-11-06  119  {
57d4bf6d8e Jaya Kumar     2008-11-06  120  	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
466ae3055b Andres Salomon 2008-11-06  121  	.name = "DC Mode Enable",
466ae3055b Andres Salomon 2008-11-06  122  	.info = olpc_dc_info,
466ae3055b Andres Salomon 2008-11-06  123  	.get = olpc_dc_get,
466ae3055b Andres Salomon 2008-11-06  124  	.put = olpc_dc_put,
b5ccc57b06 Andres Salomon 2008-11-06  125  	.private_value = 0,
bf1e527835 Andres Salomon 2008-11-06  126  },
bf1e527835 Andres Salomon 2008-11-06  127  {
bf1e527835 Andres Salomon 2008-11-06  128  	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
bf1e527835 Andres Salomon 2008-11-06  129  	.name = "MIC Bias Enable",
bf1e527835 Andres Salomon 2008-11-06  130  	.info = olpc_mic_info,
bf1e527835 Andres Salomon 2008-11-06  131  	.get = olpc_mic_get,
bf1e527835 Andres Salomon 2008-11-06  132  	.put = olpc_mic_put,
bf1e527835 Andres Salomon 2008-11-06  133  	.private_value = 0,
bf1e527835 Andres Salomon 2008-11-06  134  },
57d4bf6d8e Jaya Kumar     2008-11-06  135  };
57d4bf6d8e Jaya Kumar     2008-11-06  136  
e23e7a1436 Bill Pemberton 2012-12-06 @137  void olpc_prequirks(struct snd_card *card,
3556d18465 Andres Salomon 2008-11-06  138  		    struct snd_ac97_template *ac97)
3556d18465 Andres Salomon 2008-11-06  139  {
3556d18465 Andres Salomon 2008-11-06  140  	if (!machine_is_olpc())
3556d18465 Andres Salomon 2008-11-06  141  		return;
3556d18465 Andres Salomon 2008-11-06  142  
3556d18465 Andres Salomon 2008-11-06  143  	/* invert EAPD if on an OLPC B3 or higher */
3556d18465 Andres Salomon 2008-11-06 @144  	if (olpc_board_at_least(olpc_board_pre(0xb3)))
3556d18465 Andres Salomon 2008-11-06  145  		ac97->scaps |= AC97_SCAP_INV_EAPD;
3556d18465 Andres Salomon 2008-11-06  146  }
3556d18465 Andres Salomon 2008-11-06  147  
e23e7a1436 Bill Pemberton 2012-12-06 @148  int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
57d4bf6d8e Jaya Kumar     2008-11-06  149  {
466ae3055b Andres Salomon 2008-11-06  150  	struct snd_ctl_elem_id elem;
bf1e527835 Andres Salomon 2008-11-06  151  	int i, err;
466ae3055b Andres Salomon 2008-11-06  152  
c8974be546 Jordan Crouse  2008-11-06  153  	if (!machine_is_olpc())
c8974be546 Jordan Crouse  2008-11-06  154  		return 0;
c8974be546 Jordan Crouse  2008-11-06  155  
3c55494670 Andres Salomon 2009-12-14  156  	if (gpio_request(OLPC_GPIO_MIC_AC, DRV_NAME)) {
00980aa9c7 Takashi Iwai   2014-02-25  157  		dev_err(card->dev, "unable to allocate MIC GPIO\n");
3c55494670 Andres Salomon 2009-12-14  158  		return -EIO;
3c55494670 Andres Salomon 2009-12-14  159  	}
3c55494670 Andres Salomon 2009-12-14  160  	gpio_direction_output(OLPC_GPIO_MIC_AC, 0);
3c55494670 Andres Salomon 2009-12-14  161  
466ae3055b Andres Salomon 2008-11-06  162  	/* drop the original AD1888 HPF control */
466ae3055b Andres Salomon 2008-11-06  163  	memset(&elem, 0, sizeof(elem));
466ae3055b Andres Salomon 2008-11-06  164  	elem.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
57a4451d26 Takashi Iwai   2013-10-29  165  	strlcpy(elem.name, "High Pass Filter Enable", sizeof(elem.name));
466ae3055b Andres Salomon 2008-11-06  166  	snd_ctl_remove_id(card, &elem);
466ae3055b Andres Salomon 2008-11-06  167  
bf1e527835 Andres Salomon 2008-11-06  168  	/* drop the original V_REFOUT control */
bf1e527835 Andres Salomon 2008-11-06  169  	memset(&elem, 0, sizeof(elem));
bf1e527835 Andres Salomon 2008-11-06  170  	elem.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
57a4451d26 Takashi Iwai   2013-10-29  171  	strlcpy(elem.name, "V_REFOUT Enable", sizeof(elem.name));
bf1e527835 Andres Salomon 2008-11-06  172  	snd_ctl_remove_id(card, &elem);
bf1e527835 Andres Salomon 2008-11-06  173  
bf1e527835 Andres Salomon 2008-11-06  174  	/* add the OLPC-specific controls */
bf1e527835 Andres Salomon 2008-11-06  175  	for (i = 0; i < ARRAY_SIZE(olpc_cs5535audio_ctls); i++) {
bf1e527835 Andres Salomon 2008-11-06  176  		err = snd_ctl_add(card, snd_ctl_new1(&olpc_cs5535audio_ctls[i],
57d4bf6d8e Jaya Kumar     2008-11-06  177  				ac97->private_data));
3c55494670 Andres Salomon 2009-12-14  178  		if (err < 0) {
3c55494670 Andres Salomon 2009-12-14  179  			gpio_free(OLPC_GPIO_MIC_AC);
bf1e527835 Andres Salomon 2008-11-06  180  			return err;
bf1e527835 Andres Salomon 2008-11-06  181  		}
3c55494670 Andres Salomon 2009-12-14  182  	}
bf1e527835 Andres Salomon 2008-11-06  183  
c8f0eeebc1 Andres Salomon 2008-11-06  184  	/* turn off the mic by default */
c8f0eeebc1 Andres Salomon 2008-11-06  185  	olpc_mic_bias(ac97, 0);
bf1e527835 Andres Salomon 2008-11-06  186  	return 0;
57d4bf6d8e Jaya Kumar     2008-11-06  187  }
3c55494670 Andres Salomon 2009-12-14  188  
e23e7a1436 Bill Pemberton 2012-12-06 @189  void olpc_quirks_cleanup(void)

:::::: The code at line 28 was first introduced by commit
:::::: d6276b78028dfab944dd4a58124aefcc9aa580da ALSA: cs5535audio: create function for setting OLPC's Analog Input mode

:::::: TO: Andres Salomon <dilinger@xxxxxxxxxx>
:::::: CC: Takashi Iwai <tiwai@xxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux