Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251047
b: refs/heads/master
c: 1f8fa45
h: refs/heads/master
i:
  251045: c16a570
  251043: 2b192b1
  251039: e008dfe
v: v3
  • Loading branch information
Tomi Valkeinen committed May 11, 2011
1 parent 884c974 commit 5a506ad
Show file tree
Hide file tree
Showing 2 changed files with 43 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: 1663d2f70a9404b822fb0e8fbc40d42fdfeed0bd
refs/heads/master: 1f8fa452afe88b33cbfac6a82b0edd77a0644804
42 changes: 42 additions & 0 deletions trunk/drivers/video/omap2/displays/panel-taal.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,18 +635,60 @@ static ssize_t show_cabc_available_modes(struct device *dev,
return len < PAGE_SIZE ? len : PAGE_SIZE - 1;
}

static ssize_t taal_store_esd_interval(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct omap_dss_device *dssdev = to_dss_device(dev);
struct taal_data *td = dev_get_drvdata(&dssdev->dev);

unsigned long t;
int r;

r = strict_strtoul(buf, 10, &t);
if (r)
return r;

mutex_lock(&td->lock);
taal_cancel_esd_work(dssdev);
td->esd_interval = t;
if (td->enabled)
taal_queue_esd_work(dssdev);
mutex_unlock(&td->lock);

return count;
}

static ssize_t taal_show_esd_interval(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct omap_dss_device *dssdev = to_dss_device(dev);
struct taal_data *td = dev_get_drvdata(&dssdev->dev);
unsigned t;

mutex_lock(&td->lock);
t = td->esd_interval;
mutex_unlock(&td->lock);

return snprintf(buf, PAGE_SIZE, "%u\n", t);
}

static DEVICE_ATTR(num_dsi_errors, S_IRUGO, taal_num_errors_show, NULL);
static DEVICE_ATTR(hw_revision, S_IRUGO, taal_hw_revision_show, NULL);
static DEVICE_ATTR(cabc_mode, S_IRUGO | S_IWUSR,
show_cabc_mode, store_cabc_mode);
static DEVICE_ATTR(cabc_available_modes, S_IRUGO,
show_cabc_available_modes, NULL);
static DEVICE_ATTR(esd_interval, S_IRUGO | S_IWUSR,
taal_show_esd_interval, taal_store_esd_interval);

static struct attribute *taal_attrs[] = {
&dev_attr_num_dsi_errors.attr,
&dev_attr_hw_revision.attr,
&dev_attr_cabc_mode.attr,
&dev_attr_cabc_available_modes.attr,
&dev_attr_esd_interval.attr,
NULL,
};

Expand Down

0 comments on commit 5a506ad

Please sign in to comment.