linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/5] omap3evm: Add Camera board init/hookup file
Date: Thu, 29 Sep 2011 09:37:40 -0700	[thread overview]
Message-ID: <20110929163740.GH6324@atomide.com> (raw)
In-Reply-To: <1317130848-21136-4-git-send-email-deepthy.ravi@ti.com>

Hi,

Few comments below.

* Deepthy Ravi <deepthy.ravi@ti.com> [110927 06:07]:
> +
> +#include <linux/io.h>
> +#include <linux/i2c.h>
> +#include <linux/delay.h>
> +#include <linux/gpio.h>
> +#include <linux/err.h>
> +#include <linux/platform_device.h>
> +#include <mach/gpio.h>

You can leave out mach/gpio.h as you already have linux/gpio.h
included.

> +static int __init omap3evm_cam_init(void)
> +{
> +	int ret;
> +
> +	ret = gpio_request_array(omap3evm_gpios,
> +			ARRAY_SIZE(omap3evm_gpios));
> +	if (ret < 0) {
> +		printk(KERN_ERR "Unable to get GPIO pins\n");
> +		return ret;
> +	}
> +
> +	omap3_init_camera(&omap3evm_isp_platform_data);
> +
> +	printk(KERN_INFO "omap3evm camera init done successfully...\n");
> +	return 0;
> +}
> +
> +static void __exit omap3evm_cam_exit(void)
> +{
> +	gpio_free_array(omap3evm_gpios,
> +			ARRAY_SIZE(omap3evm_gpios));
> +}
> +
> +module_init(omap3evm_cam_init);
> +module_exit(omap3evm_cam_exit);

Looks like most of this file should be under drivers/media.

For initializing the module you should pass some platform_data
(until we have DT doing it) so you know that the camera is
available on the booted board or not. Now the init tries to
wrongly initialize things on other boards too.


> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -573,6 +573,8 @@ static struct omap_board_mux omap35x_board_mux[] __initdata = {
>  				OMAP_PIN_OFF_NONE),
>  	OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
>  				OMAP_PIN_OFF_NONE),
> +	OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
> +				OMAP_PIN_OFF_NONE),
>  #ifdef CONFIG_WL12XX_PLATFORM_DATA
>  	/* WLAN IRQ - GPIO 149 */
>  	OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
> @@ -598,6 +600,8 @@ static struct omap_board_mux omap36x_board_mux[] __initdata = {
>  	OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
>  				OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
>  				OMAP_PIN_OFF_WAKEUPENABLE),
> +	OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
> +				OMAP_PIN_OFF_NONE),
>  	/* AM/DM37x EVM: DSS data bus muxed with sys_boot */
>  	OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
>  	OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),

Is this safe to do on all boards, or only if you have the camera
board attached?

Regards,

Tony

  reply	other threads:[~2011-09-29 16:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 13:40 [PATCH v2 0/5] OMAP3EVM: Add support for MT9T111 sensor Deepthy Ravi
2011-09-27 13:40 ` [PATCH v2 1/5] omap3evm: Enable regulators for camera interface Deepthy Ravi
2011-09-27 13:40 ` [PATCH v2 2/5] [media] v4l: Add support for mt9t111 sensor driver Deepthy Ravi
2011-09-27 23:30   ` Guennadi Liakhovetski
2011-09-27 13:40 ` [PATCH v2 3/5] omap3evm: Add Camera board init/hookup file Deepthy Ravi
2011-09-29 16:37   ` Tony Lindgren [this message]
2011-09-27 13:40 ` [PATCH v2 4/5] ispccdc: Configure CCDC_SYN_MODE register Deepthy Ravi
2011-09-27 13:40 ` [PATCH v2 5/5] omap2plus_defconfig: Enable omap3isp and MT9T111 sensor drivers Deepthy Ravi
2011-09-27 13:51 ` [PATCH v2 0/5] OMAP3EVM: Add support for MT9T111 sensor Gary Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110929163740.GH6324@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).