diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
| commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
| tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /drivers/video/tegra/host/isp | |
| parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) | |
Diffstat (limited to 'drivers/video/tegra/host/isp')
| -rw-r--r-- | drivers/video/tegra/host/isp/Makefile | 7 | ||||
| -rw-r--r-- | drivers/video/tegra/host/isp/isp.c | 82 |
2 files changed, 89 insertions, 0 deletions
diff --git a/drivers/video/tegra/host/isp/Makefile b/drivers/video/tegra/host/isp/Makefile new file mode 100644 index 00000000000..7bcdc33c83d --- /dev/null +++ b/drivers/video/tegra/host/isp/Makefile | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | GCOV_PROFILE := y | ||
| 2 | EXTRA_CFLAGS += -Idrivers/video/tegra/host | ||
| 3 | |||
| 4 | nvhost-isp-objs = \ | ||
| 5 | isp.o | ||
| 6 | |||
| 7 | obj-$(CONFIG_TEGRA_GRHOST) += nvhost-isp.o | ||
diff --git a/drivers/video/tegra/host/isp/isp.c b/drivers/video/tegra/host/isp/isp.c new file mode 100644 index 00000000000..f39dc644b27 --- /dev/null +++ b/drivers/video/tegra/host/isp/isp.c | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | /* | ||
| 2 | * drivers/video/tegra/host/isp/isp.c | ||
| 3 | * | ||
| 4 | * Tegra Graphics ISP | ||
| 5 | * | ||
| 6 | * Copyright (c) 2012, NVIDIA Corporation. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms and conditions of the GNU General Public License, | ||
| 10 | * version 2, as published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 15 | * more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include "dev.h" | ||
| 22 | #include "bus_client.h" | ||
| 23 | |||
| 24 | static int __devinit isp_probe(struct nvhost_device *dev) | ||
| 25 | { | ||
| 26 | return nvhost_client_device_init(dev); | ||
| 27 | } | ||
| 28 | |||
| 29 | static int __exit isp_remove(struct nvhost_device *dev) | ||
| 30 | { | ||
| 31 | /* Add clean-up */ | ||
| 32 | return 0; | ||
| 33 | } | ||
| 34 | |||
| 35 | static int isp_suspend(struct nvhost_device *dev, pm_message_t state) | ||
| 36 | { | ||
| 37 | return nvhost_client_device_suspend(dev); | ||
| 38 | } | ||
| 39 | |||
| 40 | static int isp_resume(struct nvhost_device *dev) | ||
| 41 | { | ||
| 42 | dev_info(&dev->dev, "resuming\n"); | ||
| 43 | return 0; | ||
| 44 | } | ||
| 45 | |||
| 46 | struct nvhost_device *isp_device; | ||
| 47 | |||
| 48 | static struct nvhost_driver isp_driver = { | ||
| 49 | .probe = isp_probe, | ||
| 50 | .remove = __exit_p(isp_remove), | ||
| 51 | #ifdef CONFIG_PM | ||
| 52 | .suspend = isp_suspend, | ||
| 53 | .resume = isp_resume, | ||
| 54 | #endif | ||
| 55 | .driver = { | ||
| 56 | .owner = THIS_MODULE, | ||
| 57 | .name = "isp", | ||
| 58 | } | ||
| 59 | }; | ||
| 60 | |||
| 61 | static int __init isp_init(void) | ||
| 62 | { | ||
| 63 | int err; | ||
| 64 | |||
| 65 | isp_device = nvhost_get_device("isp"); | ||
| 66 | if (!isp_device) | ||
| 67 | return -ENXIO; | ||
| 68 | |||
| 69 | err = nvhost_device_register(isp_device); | ||
| 70 | if (err) | ||
| 71 | return err; | ||
| 72 | |||
| 73 | return nvhost_driver_register(&isp_driver); | ||
| 74 | } | ||
| 75 | |||
| 76 | static void __exit isp_exit(void) | ||
| 77 | { | ||
| 78 | nvhost_driver_unregister(&isp_driver); | ||
| 79 | } | ||
| 80 | |||
| 81 | module_init(isp_init); | ||
| 82 | module_exit(isp_exit); | ||
