static int dss_suspend_device(struct device *dev, void *data) { int r; struct omap_dss_device *dssdev = to_dss_device(dev); if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) { dssdev->activate_after_resume = false; return 0; } if (!dssdev->driver->suspend) { DSSERR("display '%s' doesn't implement suspend\n", dssdev->name); return -ENOSYS; } r = dssdev->driver->suspend(dssdev); if (r) return r; dssdev->activate_after_resume = true; return 0; }
static ssize_t display_enabled_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { struct omap_dss_device *dssdev = to_dss_device(dev); int r; bool enabled; r = strtobool(buf, &enabled); if (r) return r; if (enabled != (dssdev->state != OMAP_DSS_DISPLAY_DISABLED)) { if (enabled) { r = dssdev->driver->enable(dssdev); if (r) return r; } else { dssdev->driver->disable(dssdev); } } return size; }
static int dss_disable_device(struct device *dev, void *data) { struct omap_dss_device *dssdev = to_dss_device(dev); dssdev->disable(dssdev); return 0; }
static int __exit hdmi_remove_child(struct device *dev, void *data) { struct omap_dss_device *dssdev = to_dss_device(dev); hdmi_uninit_display(dssdev); return 0; }
static int dss_unregister_dss_dev(struct device *dev, void *data) { struct omap_dss_device *dssdev = to_dss_device(dev); dss_unregister_device(dssdev); return 0; }
static void omap_dss_dev_release(struct device *dev) { struct omap_dss_device *dssdev = to_dss_device(dev); kfree(dssdev); }