Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182893
b: refs/heads/master
c: dbe2140
h: refs/heads/master
i:
  182891: 2695b56
v: v3
  • Loading branch information
Mark Brown committed Feb 16, 2010
1 parent 68ce842 commit 744566c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 96dd362284ddcb546d2783035ae7eeda73692eda
refs/heads/master: dbe21408b15f04da4f80fb89a27b7cb067d6103e
27 changes: 27 additions & 0 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,29 @@ static ssize_t codec_reg_show(struct device *dev,

static DEVICE_ATTR(codec_reg, 0444, codec_reg_show, NULL);

static ssize_t pmdown_time_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct snd_soc_device *socdev = dev_get_drvdata(dev);
struct snd_soc_card *card = socdev->card;

return sprintf(buf, "%d\n", card->pmdown_time);
}

static ssize_t pmdown_time_set(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct snd_soc_device *socdev = dev_get_drvdata(dev);
struct snd_soc_card *card = socdev->card;

strict_strtol(buf, 10, &card->pmdown_time);

return count;
}

static DEVICE_ATTR(pmdown_time, 0644, pmdown_time_show, pmdown_time_set);

#ifdef CONFIG_DEBUG_FS
static int codec_reg_open_file(struct inode *inode, struct file *file)
{
Expand Down Expand Up @@ -1124,6 +1147,10 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
if (ret < 0)
printk(KERN_WARNING "asoc: failed to add dapm sysfs entries\n");

ret = device_create_file(card->socdev->dev, &dev_attr_pmdown_time);
if (ret < 0)
printk(KERN_WARNING "asoc: failed to add pmdown_time sysfs\n");

ret = device_create_file(card->socdev->dev, &dev_attr_codec_reg);
if (ret < 0)
printk(KERN_WARNING "asoc: failed to add codec sysfs files\n");
Expand Down

0 comments on commit 744566c

Please sign in to comment.