nau8825 48 sound/soc/codecs/nau8825.c static int nau8825_configure_sysclk(struct nau8825 *nau8825, nau8825 256 sound/soc/codecs/nau8825.c static int nau8825_sema_acquire(struct nau8825 *nau8825, long timeout) nau8825 261 sound/soc/codecs/nau8825.c ret = down_timeout(&nau8825->xtalk_sem, timeout); nau8825 263 sound/soc/codecs/nau8825.c dev_warn(nau8825->dev, "Acquire semaphore timeout\n"); nau8825 265 sound/soc/codecs/nau8825.c ret = down_trylock(&nau8825->xtalk_sem); nau8825 267 sound/soc/codecs/nau8825.c dev_warn(nau8825->dev, "Acquire semaphore fail\n"); nau8825 280 sound/soc/codecs/nau8825.c static inline void nau8825_sema_release(struct nau8825 *nau8825) nau8825 282 sound/soc/codecs/nau8825.c up(&nau8825->xtalk_sem); nau8825 292 sound/soc/codecs/nau8825.c static inline void nau8825_sema_reset(struct nau8825 *nau8825) nau8825 294 sound/soc/codecs/nau8825.c nau8825->xtalk_sem.count = 1; nau8825 310 sound/soc/codecs/nau8825.c static void nau8825_hpvol_ramp(struct nau8825 *nau8825, nau8825 335 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_HSVOL_CTRL, nau8825 344 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_HSVOL_CTRL, nau8825 452 sound/soc/codecs/nau8825.c static void nau8825_xtalk_backup(struct nau8825 *nau8825) nau8825 456 sound/soc/codecs/nau8825.c if (nau8825->xtalk_baktab_initialized) nau8825 461 sound/soc/codecs/nau8825.c regmap_read(nau8825->regmap, nau8825_xtalk_baktab[i].reg, nau8825 464 sound/soc/codecs/nau8825.c nau8825->xtalk_baktab_initialized = true; nau8825 467 sound/soc/codecs/nau8825.c static void nau8825_xtalk_restore(struct nau8825 *nau8825, bool cause_cancel) nau8825 471 sound/soc/codecs/nau8825.c if (!nau8825->xtalk_baktab_initialized) nau8825 485 sound/soc/codecs/nau8825.c nau8825_hpvol_ramp(nau8825, 0, volume, 3); nau8825 488 sound/soc/codecs/nau8825.c regmap_write(nau8825->regmap, nau8825_xtalk_baktab[i].reg, nau8825 492 sound/soc/codecs/nau8825.c nau8825->xtalk_baktab_initialized = false; nau8825 495 sound/soc/codecs/nau8825.c static void nau8825_xtalk_prepare_dac(struct nau8825 *nau8825) nau8825 498 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_ENA_CTRL, nau8825 507 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, nau8825 511 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_RDAC, nau8825 516 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_POWER_UP_CONTROL, nau8825 521 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_POWER_UP_CONTROL, nau8825 525 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_HSD_CTRL, nau8825 528 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_BOOST, nau8825 531 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CLASSG_CTRL, nau8825 536 sound/soc/codecs/nau8825.c static void nau8825_xtalk_prepare_adc(struct nau8825 *nau8825) nau8825 539 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_ANALOG_ADC_2, nau8825 544 sound/soc/codecs/nau8825.c static void nau8825_xtalk_clock(struct nau8825 *nau8825) nau8825 547 sound/soc/codecs/nau8825.c regmap_write(nau8825->regmap, NAU8825_REG_FLL1, 0x0); nau8825 548 sound/soc/codecs/nau8825.c regmap_write(nau8825->regmap, NAU8825_REG_FLL2, 0x3126); nau8825 549 sound/soc/codecs/nau8825.c regmap_write(nau8825->regmap, NAU8825_REG_FLL3, 0x0008); nau8825 550 sound/soc/codecs/nau8825.c regmap_write(nau8825->regmap, NAU8825_REG_FLL4, 0x0010); nau8825 551 sound/soc/codecs/nau8825.c regmap_write(nau8825->regmap, NAU8825_REG_FLL5, 0x0); nau8825 552 sound/soc/codecs/nau8825.c regmap_write(nau8825->regmap, NAU8825_REG_FLL6, 0x6000); nau8825 554 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, nau8825 556 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL6, NAU8825_DCO_EN, nau8825 561 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, nau8825 563 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL1, nau8825 567 sound/soc/codecs/nau8825.c static void nau8825_xtalk_prepare(struct nau8825 *nau8825) nau8825 572 sound/soc/codecs/nau8825.c nau8825_xtalk_backup(nau8825); nau8825 574 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, nau8825 585 sound/soc/codecs/nau8825.c nau8825_hpvol_ramp(nau8825, volume, 0, 3); nau8825 587 sound/soc/codecs/nau8825.c nau8825_xtalk_clock(nau8825); nau8825 588 sound/soc/codecs/nau8825.c nau8825_xtalk_prepare_dac(nau8825); nau8825 589 sound/soc/codecs/nau8825.c nau8825_xtalk_prepare_adc(nau8825); nau8825 591 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_DACL_CTRL, nau8825 594 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_DACR_CTRL, nau8825 600 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_IMM_MODE_CTRL, nau8825 606 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, nau8825 609 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, nau8825 613 sound/soc/codecs/nau8825.c static void nau8825_xtalk_clean_dac(struct nau8825 *nau8825) nau8825 616 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_BOOST, nau8825 619 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_HSD_CTRL, nau8825 623 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, nau8825 627 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, nau8825 631 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_POWER_UP_CONTROL, nau8825 633 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_POWER_UP_CONTROL, nau8825 637 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_RDAC, nau8825 640 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, nau8825 643 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_ENA_CTRL, nau8825 646 sound/soc/codecs/nau8825.c if (!nau8825->irq) nau8825 647 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, nau8825 651 sound/soc/codecs/nau8825.c static void nau8825_xtalk_clean_adc(struct nau8825 *nau8825) nau8825 654 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_ANALOG_ADC_2, nau8825 658 sound/soc/codecs/nau8825.c static void nau8825_xtalk_clean(struct nau8825 *nau8825, bool cause_cancel) nau8825 661 sound/soc/codecs/nau8825.c nau8825_configure_sysclk(nau8825, NAU8825_CLK_INTERNAL, 0); nau8825 662 sound/soc/codecs/nau8825.c nau8825_xtalk_clean_dac(nau8825); nau8825 663 sound/soc/codecs/nau8825.c nau8825_xtalk_clean_adc(nau8825); nau8825 665 sound/soc/codecs/nau8825.c regmap_write(nau8825->regmap, NAU8825_REG_IMM_MODE_CTRL, 0); nau8825 667 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_INTERRUPT_MASK, nau8825 670 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, nau8825 674 sound/soc/codecs/nau8825.c nau8825_xtalk_restore(nau8825, cause_cancel); nau8825 677 sound/soc/codecs/nau8825.c static void nau8825_xtalk_imm_start(struct nau8825 *nau8825, int vol) nau8825 680 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_ADC_DGAIN_CTRL, nau8825 685 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, nau8825 688 sound/soc/codecs/nau8825.c switch (nau8825->xtalk_state) { nau8825 691 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, nau8825 697 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, nau8825 706 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_IMM_MODE_CTRL, nau8825 710 sound/soc/codecs/nau8825.c static void nau8825_xtalk_imm_stop(struct nau8825 *nau8825) nau8825 713 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, nau8825 737 sound/soc/codecs/nau8825.c static void nau8825_xtalk_measure(struct nau8825 *nau8825) nau8825 741 sound/soc/codecs/nau8825.c switch (nau8825->xtalk_state) { nau8825 746 sound/soc/codecs/nau8825.c nau8825_xtalk_prepare(nau8825); nau8825 749 sound/soc/codecs/nau8825.c nau8825->xtalk_state = NAU8825_XTALK_HPR_R2L; nau8825 750 sound/soc/codecs/nau8825.c nau8825_xtalk_imm_start(nau8825, 0x00d2); nau8825 756 sound/soc/codecs/nau8825.c regmap_read(nau8825->regmap, NAU8825_REG_IMM_RMS_L, nau8825 757 sound/soc/codecs/nau8825.c &nau8825->imp_rms[NAU8825_XTALK_HPR_R2L]); nau8825 758 sound/soc/codecs/nau8825.c dev_dbg(nau8825->dev, "HPR_R2L imm: %x\n", nau8825 759 sound/soc/codecs/nau8825.c nau8825->imp_rms[NAU8825_XTALK_HPR_R2L]); nau8825 761 sound/soc/codecs/nau8825.c nau8825_xtalk_imm_stop(nau8825); nau8825 763 sound/soc/codecs/nau8825.c nau8825->xtalk_state = NAU8825_XTALK_HPL_R2L; nau8825 764 sound/soc/codecs/nau8825.c nau8825_xtalk_imm_start(nau8825, 0x00ff); nau8825 773 sound/soc/codecs/nau8825.c regmap_read(nau8825->regmap, NAU8825_REG_IMM_RMS_L, nau8825 774 sound/soc/codecs/nau8825.c &nau8825->imp_rms[NAU8825_XTALK_HPL_R2L]); nau8825 775 sound/soc/codecs/nau8825.c dev_dbg(nau8825->dev, "HPL_R2L imm: %x\n", nau8825 776 sound/soc/codecs/nau8825.c nau8825->imp_rms[NAU8825_XTALK_HPL_R2L]); nau8825 777 sound/soc/codecs/nau8825.c nau8825_xtalk_imm_stop(nau8825); nau8825 779 sound/soc/codecs/nau8825.c nau8825->xtalk_state = NAU8825_XTALK_IMM; nau8825 788 sound/soc/codecs/nau8825.c nau8825->imp_rms[NAU8825_XTALK_HPR_R2L], nau8825 789 sound/soc/codecs/nau8825.c nau8825->imp_rms[NAU8825_XTALK_HPL_R2L]); nau8825 790 sound/soc/codecs/nau8825.c dev_dbg(nau8825->dev, "cross talk sidetone: %x\n", sidetone); nau8825 791 sound/soc/codecs/nau8825.c regmap_write(nau8825->regmap, NAU8825_REG_DAC_DGAIN_CTRL, nau8825 793 sound/soc/codecs/nau8825.c nau8825_xtalk_clean(nau8825, false); nau8825 794 sound/soc/codecs/nau8825.c nau8825->xtalk_state = NAU8825_XTALK_DONE; nau8825 803 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = container_of( nau8825 804 sound/soc/codecs/nau8825.c work, struct nau8825, xtalk_work); nau8825 806 sound/soc/codecs/nau8825.c nau8825_xtalk_measure(nau8825); nau8825 810 sound/soc/codecs/nau8825.c if (nau8825->xtalk_state == NAU8825_XTALK_IMM) nau8825 811 sound/soc/codecs/nau8825.c nau8825_xtalk_measure(nau8825); nau8825 819 sound/soc/codecs/nau8825.c if (nau8825->xtalk_state == NAU8825_XTALK_DONE) { nau8825 820 sound/soc/codecs/nau8825.c snd_soc_jack_report(nau8825->jack, nau8825->xtalk_event, nau8825 821 sound/soc/codecs/nau8825.c nau8825->xtalk_event_mask); nau8825 822 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 823 sound/soc/codecs/nau8825.c nau8825->xtalk_protect = false; nau8825 827 sound/soc/codecs/nau8825.c static void nau8825_xtalk_cancel(struct nau8825 *nau8825) nau8825 833 sound/soc/codecs/nau8825.c if (nau8825->xtalk_enable && nau8825->xtalk_state != nau8825 835 sound/soc/codecs/nau8825.c cancel_work_sync(&nau8825->xtalk_work); nau8825 836 sound/soc/codecs/nau8825.c nau8825_xtalk_clean(nau8825, true); nau8825 839 sound/soc/codecs/nau8825.c nau8825_sema_reset(nau8825); nau8825 840 sound/soc/codecs/nau8825.c nau8825->xtalk_state = NAU8825_XTALK_DONE; nau8825 841 sound/soc/codecs/nau8825.c nau8825->xtalk_protect = false; nau8825 916 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 921 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_ENA_CTRL, nau8825 925 sound/soc/codecs/nau8825.c if (!nau8825->irq) nau8825 926 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, nau8825 940 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 946 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, nau8825 950 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, nau8825 964 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 969 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, nau8825 973 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, nau8825 1218 sound/soc/codecs/nau8825.c static int nau8825_clock_check(struct nau8825 *nau8825, nau8825 1234 sound/soc/codecs/nau8825.c dev_err(nau8825->dev, "exceed the maximum frequency of CLK_ADC or CLK_DAC\n"); nau8825 1246 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 1249 sound/soc/codecs/nau8825.c nau8825_sema_acquire(nau8825, 3 * HZ); nau8825 1258 sound/soc/codecs/nau8825.c regmap_read(nau8825->regmap, NAU8825_REG_DAC_CTRL1, &osr); nau8825 1260 sound/soc/codecs/nau8825.c if (nau8825_clock_check(nau8825, substream->stream, nau8825 1262 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 1265 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, nau8825 1269 sound/soc/codecs/nau8825.c regmap_read(nau8825->regmap, NAU8825_REG_ADC_RATE, &osr); nau8825 1271 sound/soc/codecs/nau8825.c if (nau8825_clock_check(nau8825, substream->stream, nau8825 1273 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 1276 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, nau8825 1282 sound/soc/codecs/nau8825.c regmap_read(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, &ctrl_val); nau8825 1293 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 1296 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, nau8825 1315 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 1319 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL1, nau8825 1323 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 1331 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 1375 sound/soc/codecs/nau8825.c nau8825_sema_acquire(nau8825, 3 * HZ); nau8825 1377 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL1, nau8825 1381 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, nau8825 1385 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 1431 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 1432 sound/soc/codecs/nau8825.c struct regmap *regmap = nau8825->regmap; nau8825 1434 sound/soc/codecs/nau8825.c nau8825->jack = jack; nau8825 1491 sound/soc/codecs/nau8825.c static void nau8825_eject_jack(struct nau8825 *nau8825) nau8825 1493 sound/soc/codecs/nau8825.c struct snd_soc_dapm_context *dapm = nau8825->dapm; nau8825 1494 sound/soc/codecs/nau8825.c struct regmap *regmap = nau8825->regmap; nau8825 1497 sound/soc/codecs/nau8825.c nau8825_xtalk_cancel(nau8825); nau8825 1531 sound/soc/codecs/nau8825.c nau8825_configure_sysclk(nau8825, NAU8825_CLK_DIS, 0); nau8825 1535 sound/soc/codecs/nau8825.c static void nau8825_setup_auto_irq(struct nau8825 *nau8825) nau8825 1537 sound/soc/codecs/nau8825.c struct regmap *regmap = nau8825->regmap; nau8825 1546 sound/soc/codecs/nau8825.c nau8825_configure_sysclk(nau8825, NAU8825_CLK_INTERNAL, 0); nau8825 1594 sound/soc/codecs/nau8825.c static int nau8825_jack_insert(struct nau8825 *nau8825) nau8825 1596 sound/soc/codecs/nau8825.c struct regmap *regmap = nau8825->regmap; nau8825 1597 sound/soc/codecs/nau8825.c struct snd_soc_dapm_context *dapm = nau8825->dapm; nau8825 1605 sound/soc/codecs/nau8825.c nau8825->high_imped = true; nau8825 1607 sound/soc/codecs/nau8825.c nau8825->high_imped = false; nau8825 1615 sound/soc/codecs/nau8825.c dev_dbg(nau8825->dev, "OMTP (micgnd1) mic connected\n"); nau8825 1635 sound/soc/codecs/nau8825.c dev_dbg(nau8825->dev, "CTIA (micgnd2) mic connected\n"); nau8825 1656 sound/soc/codecs/nau8825.c dev_err(nau8825->dev, "detection error; disable mic function\n"); nau8825 1673 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = (struct nau8825 *)data; nau8825 1674 sound/soc/codecs/nau8825.c struct regmap *regmap = nau8825->regmap; nau8825 1678 sound/soc/codecs/nau8825.c dev_err(nau8825->dev, "failed to read irq status\n"); nau8825 1685 sound/soc/codecs/nau8825.c nau8825_eject_jack(nau8825); nau8825 1697 sound/soc/codecs/nau8825.c nau8825->button_pressed = nau8825_button_decode( nau8825 1700 sound/soc/codecs/nau8825.c event |= nau8825->button_pressed; nau8825 1708 sound/soc/codecs/nau8825.c event |= nau8825_jack_insert(nau8825); nau8825 1709 sound/soc/codecs/nau8825.c if (nau8825->xtalk_enable && !nau8825->high_imped) { nau8825 1713 sound/soc/codecs/nau8825.c if (!nau8825->xtalk_protect) { nau8825 1721 sound/soc/codecs/nau8825.c nau8825->xtalk_protect = true; nau8825 1722 sound/soc/codecs/nau8825.c ret = nau8825_sema_acquire(nau8825, 0); nau8825 1724 sound/soc/codecs/nau8825.c nau8825->xtalk_protect = false; nau8825 1727 sound/soc/codecs/nau8825.c if (nau8825->xtalk_protect) { nau8825 1728 sound/soc/codecs/nau8825.c nau8825->xtalk_state = nau8825 1730 sound/soc/codecs/nau8825.c schedule_work(&nau8825->xtalk_work); nau8825 1737 sound/soc/codecs/nau8825.c if (nau8825->xtalk_protect) { nau8825 1738 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 1739 sound/soc/codecs/nau8825.c nau8825->xtalk_protect = false; nau8825 1743 sound/soc/codecs/nau8825.c dev_warn(nau8825->dev, "Headset completion IRQ fired but no headset connected\n"); nau8825 1744 sound/soc/codecs/nau8825.c nau8825_eject_jack(nau8825); nau8825 1753 sound/soc/codecs/nau8825.c if (nau8825->xtalk_state == NAU8825_XTALK_PREPARE) { nau8825 1754 sound/soc/codecs/nau8825.c nau8825->xtalk_event = event; nau8825 1755 sound/soc/codecs/nau8825.c nau8825->xtalk_event_mask = event_mask; nau8825 1759 sound/soc/codecs/nau8825.c if (nau8825->xtalk_enable && nau8825->xtalk_protect) nau8825 1760 sound/soc/codecs/nau8825.c schedule_work(&nau8825->xtalk_work); nau8825 1780 sound/soc/codecs/nau8825.c nau8825_setup_auto_irq(nau8825); nau8825 1794 sound/soc/codecs/nau8825.c if (event_mask && nau8825->xtalk_state == NAU8825_XTALK_DONE) nau8825 1795 sound/soc/codecs/nau8825.c snd_soc_jack_report(nau8825->jack, event, event_mask); nau8825 1800 sound/soc/codecs/nau8825.c static void nau8825_setup_buttons(struct nau8825 *nau8825) nau8825 1802 sound/soc/codecs/nau8825.c struct regmap *regmap = nau8825->regmap; nau8825 1806 sound/soc/codecs/nau8825.c nau8825->sar_voltage << NAU8825_SAR_TRACKING_GAIN_SFT); nau8825 1809 sound/soc/codecs/nau8825.c nau8825->sar_compare_time << NAU8825_SAR_COMPARE_TIME_SFT); nau8825 1812 sound/soc/codecs/nau8825.c nau8825->sar_sampling_time << NAU8825_SAR_SAMPLING_TIME_SFT); nau8825 1816 sound/soc/codecs/nau8825.c (nau8825->sar_threshold_num - 1) << NAU8825_KEYDET_LEVELS_NR_SFT); nau8825 1819 sound/soc/codecs/nau8825.c nau8825->sar_hysteresis << NAU8825_KEYDET_HYSTERESIS_SFT); nau8825 1822 sound/soc/codecs/nau8825.c nau8825->key_debounce << NAU8825_KEYDET_SHORTKEY_DEBOUNCE_SFT); nau8825 1825 sound/soc/codecs/nau8825.c (nau8825->sar_threshold[0] << 8) | nau8825->sar_threshold[1]); nau8825 1827 sound/soc/codecs/nau8825.c (nau8825->sar_threshold[2] << 8) | nau8825->sar_threshold[3]); nau8825 1829 sound/soc/codecs/nau8825.c (nau8825->sar_threshold[4] << 8) | nau8825->sar_threshold[5]); nau8825 1831 sound/soc/codecs/nau8825.c (nau8825->sar_threshold[6] << 8) | nau8825->sar_threshold[7]); nau8825 1839 sound/soc/codecs/nau8825.c static void nau8825_init_regs(struct nau8825 *nau8825) nau8825 1841 sound/soc/codecs/nau8825.c struct regmap *regmap = nau8825->regmap; nau8825 1846 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, nau8825 1848 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_BOOST, nau8825 1854 sound/soc/codecs/nau8825.c nau8825->vref_impedance << NAU8825_BIAS_VMID_SEL_SFT); nau8825 1864 sound/soc/codecs/nau8825.c nau8825->jkdet_enable ? 0 : NAU8825_JKDET_OUTPUT_EN); nau8825 1867 sound/soc/codecs/nau8825.c nau8825->jkdet_pull_enable ? 0 : NAU8825_JKDET_PULL_EN); nau8825 1870 sound/soc/codecs/nau8825.c nau8825->jkdet_pull_up ? NAU8825_JKDET_PULL_UP : 0); nau8825 1874 sound/soc/codecs/nau8825.c nau8825->jkdet_polarity ? 0 : NAU8825_JACK_POLARITY); nau8825 1878 sound/soc/codecs/nau8825.c nau8825->jack_insert_debounce << NAU8825_JACK_INSERT_DEBOUNCE_SFT); nau8825 1881 sound/soc/codecs/nau8825.c nau8825->jack_eject_debounce << NAU8825_JACK_EJECT_DEBOUNCE_SFT); nau8825 1891 sound/soc/codecs/nau8825.c NAU8825_MICBIAS_VOLTAGE_MASK, nau8825->micbias_voltage); nau8825 1893 sound/soc/codecs/nau8825.c if (nau8825->sar_threshold_num) nau8825 1894 sound/soc/codecs/nau8825.c nau8825_setup_buttons(nau8825); nau8825 1912 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, nau8825 1934 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_DACL_CTRL, nau8825 1936 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_DACR_CTRL, nau8825 1959 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 1962 sound/soc/codecs/nau8825.c nau8825->dapm = dapm; nau8825 1969 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 1972 sound/soc/codecs/nau8825.c nau8825_xtalk_cancel(nau8825); nau8825 2041 sound/soc/codecs/nau8825.c static void nau8825_fll_apply(struct nau8825 *nau8825, nau8825 2044 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, nau8825 2048 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL1, nau8825 2052 sound/soc/codecs/nau8825.c regmap_write(nau8825->regmap, NAU8825_REG_FLL2, fll_param->fll_frac); nau8825 2054 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL3, nau8825 2057 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL4, nau8825 2061 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5, nau8825 2064 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, nau8825 2068 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5, nau8825 2073 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL6, nau8825 2078 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5, nau8825 2081 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL6, nau8825 2090 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 2104 sound/soc/codecs/nau8825.c nau8825_fll_apply(nau8825, &fll_param); nau8825 2106 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, nau8825 2111 sound/soc/codecs/nau8825.c static int nau8825_mclk_prepare(struct nau8825 *nau8825, unsigned int freq) nau8825 2115 sound/soc/codecs/nau8825.c nau8825->mclk = devm_clk_get(nau8825->dev, "mclk"); nau8825 2116 sound/soc/codecs/nau8825.c if (IS_ERR(nau8825->mclk)) { nau8825 2117 sound/soc/codecs/nau8825.c dev_info(nau8825->dev, "No 'mclk' clock found, assume MCLK is managed externally"); nau8825 2121 sound/soc/codecs/nau8825.c if (!nau8825->mclk_freq) { nau8825 2122 sound/soc/codecs/nau8825.c ret = clk_prepare_enable(nau8825->mclk); nau8825 2124 sound/soc/codecs/nau8825.c dev_err(nau8825->dev, "Unable to prepare codec mclk\n"); nau8825 2129 sound/soc/codecs/nau8825.c if (nau8825->mclk_freq != freq) { nau8825 2130 sound/soc/codecs/nau8825.c freq = clk_round_rate(nau8825->mclk, freq); nau8825 2131 sound/soc/codecs/nau8825.c ret = clk_set_rate(nau8825->mclk, freq); nau8825 2133 sound/soc/codecs/nau8825.c dev_err(nau8825->dev, "Unable to set mclk rate\n"); nau8825 2136 sound/soc/codecs/nau8825.c nau8825->mclk_freq = freq; nau8825 2153 sound/soc/codecs/nau8825.c static int nau8825_configure_sysclk(struct nau8825 *nau8825, int clk_id, nau8825 2156 sound/soc/codecs/nau8825.c struct regmap *regmap = nau8825->regmap; nau8825 2163 sound/soc/codecs/nau8825.c if (nau8825->mclk_freq) { nau8825 2164 sound/soc/codecs/nau8825.c clk_disable_unprepare(nau8825->mclk); nau8825 2165 sound/soc/codecs/nau8825.c nau8825->mclk_freq = 0; nau8825 2175 sound/soc/codecs/nau8825.c nau8825_sema_acquire(nau8825, 3 * HZ); nau8825 2181 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 2183 sound/soc/codecs/nau8825.c ret = nau8825_mclk_prepare(nau8825, freq); nau8825 2189 sound/soc/codecs/nau8825.c if (nau8825_is_jack_inserted(nau8825->regmap)) { nau8825 2209 sound/soc/codecs/nau8825.c dev_warn(nau8825->dev, "Disable clock for power saving when no headset connected\n"); nau8825 2211 sound/soc/codecs/nau8825.c if (nau8825->mclk_freq) { nau8825 2212 sound/soc/codecs/nau8825.c clk_disable_unprepare(nau8825->mclk); nau8825 2213 sound/soc/codecs/nau8825.c nau8825->mclk_freq = 0; nau8825 2223 sound/soc/codecs/nau8825.c nau8825_sema_acquire(nau8825, 3 * HZ); nau8825 2232 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 2234 sound/soc/codecs/nau8825.c ret = nau8825_mclk_prepare(nau8825, freq); nau8825 2245 sound/soc/codecs/nau8825.c nau8825_sema_acquire(nau8825, 3 * HZ); nau8825 2257 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 2259 sound/soc/codecs/nau8825.c if (nau8825->mclk_freq) { nau8825 2260 sound/soc/codecs/nau8825.c clk_disable_unprepare(nau8825->mclk); nau8825 2261 sound/soc/codecs/nau8825.c nau8825->mclk_freq = 0; nau8825 2271 sound/soc/codecs/nau8825.c nau8825_sema_acquire(nau8825, 3 * HZ); nau8825 2283 sound/soc/codecs/nau8825.c nau8825_sema_release(nau8825); nau8825 2285 sound/soc/codecs/nau8825.c if (nau8825->mclk_freq) { nau8825 2286 sound/soc/codecs/nau8825.c clk_disable_unprepare(nau8825->mclk); nau8825 2287 sound/soc/codecs/nau8825.c nau8825->mclk_freq = 0; nau8825 2292 sound/soc/codecs/nau8825.c dev_err(nau8825->dev, "Invalid clock id (%d)\n", clk_id); nau8825 2296 sound/soc/codecs/nau8825.c dev_dbg(nau8825->dev, "Sysclk is %dHz and clock id is %d\n", freq, nau8825 2304 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 2306 sound/soc/codecs/nau8825.c return nau8825_configure_sysclk(nau8825, clk_id, freq); nau8825 2309 sound/soc/codecs/nau8825.c static int nau8825_resume_setup(struct nau8825 *nau8825) nau8825 2311 sound/soc/codecs/nau8825.c struct regmap *regmap = nau8825->regmap; nau8825 2314 sound/soc/codecs/nau8825.c nau8825_configure_sysclk(nau8825, NAU8825_CLK_DIS, 0); nau8825 2337 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 2349 sound/soc/codecs/nau8825.c if (nau8825->mclk_freq) { nau8825 2350 sound/soc/codecs/nau8825.c ret = clk_prepare_enable(nau8825->mclk); nau8825 2352 sound/soc/codecs/nau8825.c dev_err(nau8825->dev, "Unable to prepare component mclk\n"); nau8825 2357 sound/soc/codecs/nau8825.c nau8825_resume_setup(nau8825); nau8825 2364 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_MIC_BIAS, nau8825 2367 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, nau8825 2370 sound/soc/codecs/nau8825.c nau8825_xtalk_cancel(nau8825); nau8825 2374 sound/soc/codecs/nau8825.c regmap_write(nau8825->regmap, nau8825 2377 sound/soc/codecs/nau8825.c regmap_update_bits(nau8825->regmap, NAU8825_REG_ENA_CTRL, nau8825 2379 sound/soc/codecs/nau8825.c if (nau8825->mclk_freq) nau8825 2380 sound/soc/codecs/nau8825.c clk_disable_unprepare(nau8825->mclk); nau8825 2388 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 2390 sound/soc/codecs/nau8825.c disable_irq(nau8825->irq); nau8825 2393 sound/soc/codecs/nau8825.c snd_soc_dapm_disable_pin(nau8825->dapm, "SAR"); nau8825 2394 sound/soc/codecs/nau8825.c snd_soc_dapm_disable_pin(nau8825->dapm, "MICBIAS"); nau8825 2395 sound/soc/codecs/nau8825.c snd_soc_dapm_sync(nau8825->dapm); nau8825 2396 sound/soc/codecs/nau8825.c regcache_cache_only(nau8825->regmap, true); nau8825 2397 sound/soc/codecs/nau8825.c regcache_mark_dirty(nau8825->regmap); nau8825 2404 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); nau8825 2407 sound/soc/codecs/nau8825.c regcache_cache_only(nau8825->regmap, false); nau8825 2408 sound/soc/codecs/nau8825.c regcache_sync(nau8825->regmap); nau8825 2409 sound/soc/codecs/nau8825.c nau8825->xtalk_protect = true; nau8825 2410 sound/soc/codecs/nau8825.c ret = nau8825_sema_acquire(nau8825, 0); nau8825 2412 sound/soc/codecs/nau8825.c nau8825->xtalk_protect = false; nau8825 2413 sound/soc/codecs/nau8825.c enable_irq(nau8825->irq); nau8825 2445 sound/soc/codecs/nau8825.c static void nau8825_print_device_properties(struct nau8825 *nau8825) nau8825 2448 sound/soc/codecs/nau8825.c struct device *dev = nau8825->dev; nau8825 2450 sound/soc/codecs/nau8825.c dev_dbg(dev, "jkdet-enable: %d\n", nau8825->jkdet_enable); nau8825 2451 sound/soc/codecs/nau8825.c dev_dbg(dev, "jkdet-pull-enable: %d\n", nau8825->jkdet_pull_enable); nau8825 2452 sound/soc/codecs/nau8825.c dev_dbg(dev, "jkdet-pull-up: %d\n", nau8825->jkdet_pull_up); nau8825 2453 sound/soc/codecs/nau8825.c dev_dbg(dev, "jkdet-polarity: %d\n", nau8825->jkdet_polarity); nau8825 2454 sound/soc/codecs/nau8825.c dev_dbg(dev, "micbias-voltage: %d\n", nau8825->micbias_voltage); nau8825 2455 sound/soc/codecs/nau8825.c dev_dbg(dev, "vref-impedance: %d\n", nau8825->vref_impedance); nau8825 2457 sound/soc/codecs/nau8825.c dev_dbg(dev, "sar-threshold-num: %d\n", nau8825->sar_threshold_num); nau8825 2458 sound/soc/codecs/nau8825.c for (i = 0; i < nau8825->sar_threshold_num; i++) nau8825 2460 sound/soc/codecs/nau8825.c nau8825->sar_threshold[i]); nau8825 2462 sound/soc/codecs/nau8825.c dev_dbg(dev, "sar-hysteresis: %d\n", nau8825->sar_hysteresis); nau8825 2463 sound/soc/codecs/nau8825.c dev_dbg(dev, "sar-voltage: %d\n", nau8825->sar_voltage); nau8825 2464 sound/soc/codecs/nau8825.c dev_dbg(dev, "sar-compare-time: %d\n", nau8825->sar_compare_time); nau8825 2465 sound/soc/codecs/nau8825.c dev_dbg(dev, "sar-sampling-time: %d\n", nau8825->sar_sampling_time); nau8825 2466 sound/soc/codecs/nau8825.c dev_dbg(dev, "short-key-debounce: %d\n", nau8825->key_debounce); nau8825 2468 sound/soc/codecs/nau8825.c nau8825->jack_insert_debounce); nau8825 2470 sound/soc/codecs/nau8825.c nau8825->jack_eject_debounce); nau8825 2472 sound/soc/codecs/nau8825.c nau8825->xtalk_enable); nau8825 2476 sound/soc/codecs/nau8825.c struct nau8825 *nau8825) { nau8825 2479 sound/soc/codecs/nau8825.c nau8825->jkdet_enable = device_property_read_bool(dev, nau8825 2481 sound/soc/codecs/nau8825.c nau8825->jkdet_pull_enable = device_property_read_bool(dev, nau8825 2483 sound/soc/codecs/nau8825.c nau8825->jkdet_pull_up = device_property_read_bool(dev, nau8825 2486 sound/soc/codecs/nau8825.c &nau8825->jkdet_polarity); nau8825 2488 sound/soc/codecs/nau8825.c nau8825->jkdet_polarity = 1; nau8825 2490 sound/soc/codecs/nau8825.c &nau8825->micbias_voltage); nau8825 2492 sound/soc/codecs/nau8825.c nau8825->micbias_voltage = 6; nau8825 2494 sound/soc/codecs/nau8825.c &nau8825->vref_impedance); nau8825 2496 sound/soc/codecs/nau8825.c nau8825->vref_impedance = 2; nau8825 2498 sound/soc/codecs/nau8825.c &nau8825->sar_threshold_num); nau8825 2500 sound/soc/codecs/nau8825.c nau8825->sar_threshold_num = 4; nau8825 2502 sound/soc/codecs/nau8825.c nau8825->sar_threshold, nau8825->sar_threshold_num); nau8825 2504 sound/soc/codecs/nau8825.c nau8825->sar_threshold[0] = 0x08; nau8825 2505 sound/soc/codecs/nau8825.c nau8825->sar_threshold[1] = 0x12; nau8825 2506 sound/soc/codecs/nau8825.c nau8825->sar_threshold[2] = 0x26; nau8825 2507 sound/soc/codecs/nau8825.c nau8825->sar_threshold[3] = 0x73; nau8825 2510 sound/soc/codecs/nau8825.c &nau8825->sar_hysteresis); nau8825 2512 sound/soc/codecs/nau8825.c nau8825->sar_hysteresis = 0; nau8825 2514 sound/soc/codecs/nau8825.c &nau8825->sar_voltage); nau8825 2516 sound/soc/codecs/nau8825.c nau8825->sar_voltage = 6; nau8825 2518 sound/soc/codecs/nau8825.c &nau8825->sar_compare_time); nau8825 2520 sound/soc/codecs/nau8825.c nau8825->sar_compare_time = 1; nau8825 2522 sound/soc/codecs/nau8825.c &nau8825->sar_sampling_time); nau8825 2524 sound/soc/codecs/nau8825.c nau8825->sar_sampling_time = 1; nau8825 2526 sound/soc/codecs/nau8825.c &nau8825->key_debounce); nau8825 2528 sound/soc/codecs/nau8825.c nau8825->key_debounce = 3; nau8825 2530 sound/soc/codecs/nau8825.c &nau8825->jack_insert_debounce); nau8825 2532 sound/soc/codecs/nau8825.c nau8825->jack_insert_debounce = 7; nau8825 2534 sound/soc/codecs/nau8825.c &nau8825->jack_eject_debounce); nau8825 2536 sound/soc/codecs/nau8825.c nau8825->jack_eject_debounce = 0; nau8825 2537 sound/soc/codecs/nau8825.c nau8825->xtalk_enable = device_property_read_bool(dev, nau8825 2540 sound/soc/codecs/nau8825.c nau8825->mclk = devm_clk_get(dev, "mclk"); nau8825 2541 sound/soc/codecs/nau8825.c if (PTR_ERR(nau8825->mclk) == -EPROBE_DEFER) { nau8825 2543 sound/soc/codecs/nau8825.c } else if (PTR_ERR(nau8825->mclk) == -ENOENT) { nau8825 2545 sound/soc/codecs/nau8825.c nau8825->mclk = NULL; nau8825 2547 sound/soc/codecs/nau8825.c } else if (IS_ERR(nau8825->mclk)) { nau8825 2554 sound/soc/codecs/nau8825.c static int nau8825_setup_irq(struct nau8825 *nau8825) nau8825 2558 sound/soc/codecs/nau8825.c ret = devm_request_threaded_irq(nau8825->dev, nau8825->irq, NULL, nau8825 2560 sound/soc/codecs/nau8825.c "nau8825", nau8825); nau8825 2563 sound/soc/codecs/nau8825.c dev_err(nau8825->dev, "Cannot request irq %d (%d)\n", nau8825 2564 sound/soc/codecs/nau8825.c nau8825->irq, ret); nau8825 2575 sound/soc/codecs/nau8825.c struct nau8825 *nau8825 = dev_get_platdata(&i2c->dev); nau8825 2578 sound/soc/codecs/nau8825.c if (!nau8825) { nau8825 2579 sound/soc/codecs/nau8825.c nau8825 = devm_kzalloc(dev, sizeof(*nau8825), GFP_KERNEL); nau8825 2580 sound/soc/codecs/nau8825.c if (!nau8825) nau8825 2582 sound/soc/codecs/nau8825.c ret = nau8825_read_device_properties(dev, nau8825); nau8825 2587 sound/soc/codecs/nau8825.c i2c_set_clientdata(i2c, nau8825); nau8825 2589 sound/soc/codecs/nau8825.c nau8825->regmap = devm_regmap_init_i2c(i2c, &nau8825_regmap_config); nau8825 2590 sound/soc/codecs/nau8825.c if (IS_ERR(nau8825->regmap)) nau8825 2591 sound/soc/codecs/nau8825.c return PTR_ERR(nau8825->regmap); nau8825 2592 sound/soc/codecs/nau8825.c nau8825->dev = dev; nau8825 2593 sound/soc/codecs/nau8825.c nau8825->irq = i2c->irq; nau8825 2597 sound/soc/codecs/nau8825.c nau8825->xtalk_state = NAU8825_XTALK_DONE; nau8825 2598 sound/soc/codecs/nau8825.c nau8825->xtalk_protect = false; nau8825 2599 sound/soc/codecs/nau8825.c nau8825->xtalk_baktab_initialized = false; nau8825 2600 sound/soc/codecs/nau8825.c sema_init(&nau8825->xtalk_sem, 1); nau8825 2601 sound/soc/codecs/nau8825.c INIT_WORK(&nau8825->xtalk_work, nau8825_xtalk_work); nau8825 2603 sound/soc/codecs/nau8825.c nau8825_print_device_properties(nau8825); nau8825 2605 sound/soc/codecs/nau8825.c nau8825_reset_chip(nau8825->regmap); nau8825 2606 sound/soc/codecs/nau8825.c ret = regmap_read(nau8825->regmap, NAU8825_REG_I2C_DEVICE_ID, &value); nau8825 2618 sound/soc/codecs/nau8825.c nau8825_init_regs(nau8825); nau8825 2621 sound/soc/codecs/nau8825.c nau8825_setup_irq(nau8825);