cs4270.c (5e383f53e80f4c644bc49a17b5590b110bad5832) | cs4270.c (19ace0e97a605042c481c2ea3f7aeb59c0eb54ed) |
---|---|
1/* 2 * CS4270 ALSA SoC (ASoC) codec driver 3 * 4 * Author: Timur Tabi <timur@freescale.com> 5 * 6 * Copyright 2007-2009 Freescale Semiconductor, Inc. This file is licensed 7 * under the terms of the GNU General Public License version 2. This 8 * program is licensed "as is" without any warranty of any kind, whether --- 507 unchanged lines hidden (view full) --- 516 */ 517 ret = snd_soc_update_bits(codec, CS4270_TRANS, 518 CS4270_TRANS_SOFT | CS4270_TRANS_ZERO, 0); 519 if (ret < 0) { 520 dev_err(codec->dev, "i2c write failed\n"); 521 return ret; 522 } 523 | 1/* 2 * CS4270 ALSA SoC (ASoC) codec driver 3 * 4 * Author: Timur Tabi <timur@freescale.com> 5 * 6 * Copyright 2007-2009 Freescale Semiconductor, Inc. This file is licensed 7 * under the terms of the GNU General Public License version 2. This 8 * program is licensed "as is" without any warranty of any kind, whether --- 507 unchanged lines hidden (view full) --- 516 */ 517 ret = snd_soc_update_bits(codec, CS4270_TRANS, 518 CS4270_TRANS_SOFT | CS4270_TRANS_ZERO, 0); 519 if (ret < 0) { 520 dev_err(codec->dev, "i2c write failed\n"); 521 return ret; 522 } 523 |
524 /* Add the non-DAPM controls */ 525 ret = snd_soc_add_codec_controls(codec, cs4270_snd_controls, 526 ARRAY_SIZE(cs4270_snd_controls)); 527 if (ret < 0) { 528 dev_err(codec->dev, "failed to add controls\n"); 529 return ret; 530 } 531 | |
532 /* get the power supply regulators */ 533 for (i = 0; i < ARRAY_SIZE(supply_names); i++) 534 cs4270->supplies[i].supply = supply_names[i]; 535 536 ret = regulator_bulk_get(codec->dev, ARRAY_SIZE(cs4270->supplies), 537 cs4270->supplies); 538 if (ret < 0) 539 return ret; --- 89 unchanged lines hidden (view full) --- 629/* 630 * ASoC codec driver structure 631 */ 632static const struct snd_soc_codec_driver soc_codec_device_cs4270 = { 633 .probe = cs4270_probe, 634 .remove = cs4270_remove, 635 .suspend = cs4270_soc_suspend, 636 .resume = cs4270_soc_resume, | 524 /* get the power supply regulators */ 525 for (i = 0; i < ARRAY_SIZE(supply_names); i++) 526 cs4270->supplies[i].supply = supply_names[i]; 527 528 ret = regulator_bulk_get(codec->dev, ARRAY_SIZE(cs4270->supplies), 529 cs4270->supplies); 530 if (ret < 0) 531 return ret; --- 89 unchanged lines hidden (view full) --- 621/* 622 * ASoC codec driver structure 623 */ 624static const struct snd_soc_codec_driver soc_codec_device_cs4270 = { 625 .probe = cs4270_probe, 626 .remove = cs4270_remove, 627 .suspend = cs4270_soc_suspend, 628 .resume = cs4270_soc_resume, |
629 630 .controls = cs4270_snd_controls, 631 .num_controls = ARRAY_SIZE(cs4270_snd_controls), |
|
637 .volatile_register = cs4270_reg_is_volatile, 638 .readable_register = cs4270_reg_is_readable, 639 .reg_cache_size = CS4270_LASTREG + 1, 640 .reg_word_size = sizeof(u8), 641 .reg_cache_default = cs4270_default_reg_cache, 642}; 643 644/* --- 115 unchanged lines hidden --- | 632 .volatile_register = cs4270_reg_is_volatile, 633 .readable_register = cs4270_reg_is_readable, 634 .reg_cache_size = CS4270_LASTREG + 1, 635 .reg_word_size = sizeof(u8), 636 .reg_cache_default = cs4270_default_reg_cache, 637}; 638 639/* --- 115 unchanged lines hidden --- |