public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: hvaibhav@ti.com
Cc: video4linux-list@redhat.com, linux-omap@vger.kernel.org,
	davinci-linux-open-source-bounces@linux.davincidsp.com,
	Brijesh Jadav <brijesh.j@ti.com>,
	Hardik Shah <hardik.shah@ti.com>, Manjunath Hadli <mrh@ti.com>,
	R Sivaraj <sivaraj@ti.com>,
	Karicheri Muralidharan <m-karicheri2@ti.com>
Subject: Re: [PATCH 2/2] TVP514x Driver with Review comments fixed [V4]
Date: Tue, 2 Dec 2008 11:44:27 -0800	[thread overview]
Message-ID: <200812021144.28738.david-b@pacbell.net> (raw)
In-Reply-To: <1228232142-11934-1-git-send-email-hvaibhav@ti.com>

Yep, nice to see an I2C driver that actually tries to cope
with errors when reading/writing registers.  :)

I expect that I'll have some more comments later.


On Tuesday 02 December 2008, hvaibhav@ti.com wrote:
> +void tvp514x_reg_dump(struct tvp514x_decoder *decoder)

"static void" ... there probably shouldn't be any symbols
exported from this driver, except the ones handling module
init (which are in a section that's removed ASAP).


> +/*
> + * TVP5146 Init/Power on Sequence
> + */
> +static struct tvp514x_reg tvp5146_init_reg_seq[] = {
> +       {TOK_WRITE, REG_VBUS_ADDRESS_ACCESS1, 0x02},
> +       {TOK_WRITE, REG_VBUS_ADDRESS_ACCESS2, 0x00},
> +       {TOK_WRITE, REG_VBUS_ADDRESS_ACCESS3, 0x80},
> +       {TOK_WRITE, REG_VBUS_DATA_ACCESS_NO_VBUS_ADDR_INCR, 0x01},
> +       ...
> +};
> +static struct tvp514x_init_seq tvp5146_init = {
> +       .no_regs = ARRAY_SIZE(tvp5146_init_reg_seq),
> +       .init_reg_seq = tvp5146_init_reg_seq,
> +};

I suggest making all of those be "static const", along
with their friends  :)


> +       {"tvp5146", (unsigned int)&tvp5146_init},

As I noted earlier, best if this were "unsigned long".

I'm surprised you're only using the driver_data to hold
a pointer to a tvp514x_init_seq structure.  That would
be the natural place to store other chip-specific
data ... like whatever is needed to ensure that this
driver never tries to access a '46-specific register
on a '47 chip.

- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-12-02 19:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <hvaibhav@ti.com>
2008-11-21 15:22 ` [PATCH 2/2] TVP514x V4L int device driver support hvaibhav
2008-11-21 16:16   ` Hans Verkuil
2008-11-21 18:12   ` Trilok Soni
2008-11-21 19:07     ` Hiremath, Vaibhav
2008-11-21 19:11     ` David Brownell
2008-11-23 22:00   ` Hans Verkuil
2008-11-23 22:04     ` Koen Kooi
2008-11-24  6:16     ` Trilok Soni
2008-11-24  6:32       ` David Brownell
2008-11-24  7:53         ` Hans Verkuil
2008-11-24  8:53           ` Hiremath, Vaibhav
2008-11-24  8:04       ` Hans Verkuil
2008-11-24  8:43         ` Trilok Soni
2008-11-24  8:59           ` Hiremath, Vaibhav
2008-11-24 10:06   ` David Brownell
2008-11-26 17:05 ` [PATCH 2/2] TVP514x Driver with Review comments fixed hvaibhav
2008-11-26 17:48   ` Hans Verkuil
2008-12-02 15:35 ` [PATCH 2/2] TVP514x Driver with Review comments fixed [V4] hvaibhav
2008-12-02 17:20   ` Hans Verkuil
2008-12-03  3:58     ` Hiremath, Vaibhav
2008-12-02 19:29   ` David Brownell
2008-12-02 19:44   ` David Brownell [this message]
2009-05-06 18:31 ` [PATCH (V2)] TVP514x: Migration to sub-device framework hvaibhav
2009-06-14 10:14   ` Hans Verkuil
2009-06-14 12:44     ` Hans Verkuil
2009-06-14 14:32       ` tcm825x.c: migrating to sub-device framework? (was: TVP514x: Migration to sub-device framework) Hans Verkuil
2009-06-15  8:45         ` tcm825x.c: migrating to sub-device framework? Sakari Ailus
     [not found]     ` <200906141214.38355.hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2009-06-14 19:50       ` [PATCH (V2)] TVP514x: Migration to sub-device framework David Brownell

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=200812021144.28738.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=brijesh.j@ti.com \
    --cc=davinci-linux-open-source-bounces@linux.davincidsp.com \
    --cc=hardik.shah@ti.com \
    --cc=hvaibhav@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=mrh@ti.com \
    --cc=sivaraj@ti.com \
    --cc=video4linux-list@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox