NOTE: This isn't the whole list of features that the ISS supports, but the only ones supported at the moment. Signed-off-by: Sergio Aguirre <saaguirre@xxxxxx> --- arch/arm/mach-omap2/devices.c | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index e433603..2b8cf73 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -19,6 +19,8 @@ #include <linux/of.h> #include <linux/platform_data/omap4-keypad.h> +#include <media/omap4iss.h> + #include <mach/hardware.h> #include <mach/irqs.h> #include <asm/mach-types.h> @@ -236,6 +238,36 @@ int omap3_init_camera(struct isp_platform_data *pdata) #endif +int omap4_init_camera(struct iss_platform_data *pdata, struct omap_board_data *bdata) +{ + struct platform_device *pdev; + struct omap_hwmod *oh; + struct iss_platform_data *omap4iss_pdata; + const char *oh_name = "iss"; + const char *name = "omap4iss"; + + oh = omap_hwmod_lookup(oh_name); + if (!oh) { + pr_err("Could not look up %s\n", oh_name); + return -ENODEV; + } + + omap4iss_pdata = pdata; + + pdev = omap_device_build(name, -1, oh, omap4iss_pdata, + sizeof(struct iss_platform_data), NULL, 0, 0); + + if (IS_ERR(pdev)) { + WARN(1, "Can't build omap_device for %s:%s.\n", + name, oh->name); + return PTR_ERR(pdev); + } + + oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); + + return 0; +} + static inline void omap_init_camera(void) { #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html