All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: <santiago.nunez@ridgerun.com>
Cc: davinci-linux-open-source@linux.davincidsp.com,
	todd.fischer@ridgerun.com, linux-media@vger.kernel.org
Subject: Re: [PATCH 2/6 v5] Support for TVP7002 in dm365 board
Date: Thu, 15 Oct 2009 11:47:46 -0700	[thread overview]
Message-ID: <87skdk7aul.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1255617794-1401-1-git-send-email-santiago.nunez@ridgerun.com> (santiago nunez's message of "Thu\, 15 Oct 2009 08\:43\:14 -0600")

<santiago.nunez@ridgerun.com> writes:

> From: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>
>
> This patch provides support for TVP7002 in architecture definitions
> within DM365.
>
> Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>
> ---
>  arch/arm/mach-davinci/board-dm365-evm.c |  170 ++++++++++++++++++++++++++++++-
>  1 files changed, 166 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
> index a1d5e7d..6c544d3 100644
> --- a/arch/arm/mach-davinci/board-dm365-evm.c
> +++ b/arch/arm/mach-davinci/board-dm365-evm.c
> @@ -38,6 +38,11 @@
>  #include <mach/common.h>
>  #include <mach/mmc.h>
>  #include <mach/nand.h>
> +#include <mach/gpio.h>
> +#include <linux/videodev2.h>
> +#include <media/tvp514x.h>
> +#include <media/tvp7002.h>
> +#include <media/davinci/videohd.h>
>  
>  
>  static inline int have_imager(void)
> @@ -48,8 +53,11 @@ static inline int have_imager(void)
>  
>  static inline int have_tvp7002(void)
>  {
> -	/* REVISIT when it's supported, trigger via Kconfig */
> +#ifdef CONFIG_VIDEO_TVP7002
> +	return 1;
> +#else
>  	return 0;
> +#endif

I've said this before, but I'll say it again.  I don't like the
#ifdef-on-Kconfig-option here.

Can you add a probe hook to the platform_data so that when the tvp7002
is found it can call pdata->probe() which could then set a flag
for use by have_tvp7002().

This will have he same effect without the ifdef since if the driver
is not compiled in, its probe can never be triggered.

Kevin


  reply	other threads:[~2009-10-15 18:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-15 14:43 [PATCH 2/6 v5] Support for TVP7002 in dm365 board santiago.nunez
2009-10-15 18:47 ` Kevin Hilman [this message]
2009-10-20 12:29   ` Nori, Sekhar
2009-10-20 16:37     ` Santiago Nunez-Corrales
2009-10-23 17:33   ` Santiago Nunez-Corrales
2009-10-26 21:35     ` Kevin Hilman
2009-10-27 15:42       ` Narnakaje, Snehaprabha
2009-10-27 15:53         ` Santiago Nunez-Corrales
2009-10-27 16:09           ` Narnakaje, Snehaprabha
2009-10-27 17:27             ` Santiago Nunez-Corrales

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=87skdk7aul.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=linux-media@vger.kernel.org \
    --cc=santiago.nunez@ridgerun.com \
    --cc=todd.fischer@ridgerun.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.