diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv40_pm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv40_pm.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/drivers/gpu/drm/nouveau/nv40_pm.c b/drivers/gpu/drm/nouveau/nv40_pm.c index 23f200630d8b..e9b81a97c481 100644 --- a/drivers/gpu/drm/nouveau/nv40_pm.c +++ b/drivers/gpu/drm/nouveau/nv40_pm.c @@ -351,52 +351,3 @@ resume: kfree(info); return ret; } - -int -nv40_pm_pwm_get(struct drm_device *dev, int line, u32 *divs, u32 *duty) -{ - struct nouveau_drm *drm = nouveau_drm(dev); - struct nouveau_device *device = nouveau_dev(dev); - - if (line == 2) { - u32 reg = nv_rd32(device, 0x0010f0); - if (reg & 0x80000000) { - *duty = (reg & 0x7fff0000) >> 16; - *divs = (reg & 0x00007fff); - return 0; - } - } else - if (line == 9) { - u32 reg = nv_rd32(device, 0x0015f4); - if (reg & 0x80000000) { - *divs = nv_rd32(device, 0x0015f8); - *duty = (reg & 0x7fffffff); - return 0; - } - } else { - NV_ERROR(drm, "unknown pwm ctrl for gpio %d\n", line); - return -ENODEV; - } - - return -EINVAL; -} - -int -nv40_pm_pwm_set(struct drm_device *dev, int line, u32 divs, u32 duty) -{ - struct nouveau_device *device = nouveau_dev(dev); - struct nouveau_drm *drm = nouveau_drm(dev); - - if (line == 2) { - nv_wr32(device, 0x0010f0, 0x80000000 | (duty << 16) | divs); - } else - if (line == 9) { - nv_wr32(device, 0x0015f8, divs); - nv_wr32(device, 0x0015f4, duty | 0x80000000); - } else { - NV_ERROR(drm, "unknown pwm ctrl for gpio %d\n", line); - return -ENODEV; - } - - return 0; -} |