public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Komal Shah <komal_shah802003@yahoo.com>
To: "Zhang, Jian" <jzhang@ti.com>, linux-omap-open-source@linux.omap.com
Subject: RE: [PATCH] OMAP1: camera core : Use platform driver structure
Date: Fri, 24 Feb 2006 02:35:50 -0800 (PST)	[thread overview]
Message-ID: <20060224103550.28867.qmail@web32915.mail.mud.yahoo.com> (raw)
In-Reply-To: <304D2A85A9643F4A991BDDF8D297BBA602645AE0@dlee05.ent.ti.com>

--- "Zhang, Jian" <jzhang@ti.com> wrote:

> Komal,
> 
> Is there any guideline on the way a driver is registered with LDM?
> e.g.
> via driver_register() or platform_driver_register()? We are now
> always
> using omap_driver_register() which is a wrapper to driver_register().
> 
> Again, is this the trend to move the bulk of init code to probe()
> function?

This one is very tricky question :) May be GregKH and RMK can do better
justice :) 

But I don't understand the need for you to wrap-up the arch specific
register function around driver_register, may be you were defining your
bus type? I also feel, that this wrapper came much before in your
kernel (2.6.9 and .8 series) than the platform_driver addition. 

platform_driver structure does wraps the all the members except the
devid, bus and shared clocks, and devid can be assigned using the
platform_device structure, and bus assignment may not be required as we
connect them under common platform bus.  

And platform_driver_register does call driver_register similar to your
omap_driver_register with few more wrapper functions inside. But as
platform_driver interface wrappers was added recently (Nov'05) by RMK,
which allows to platform device driver methods to be passed a platform
device structure instead a plain device structure and which will
introduce casting in every platform driver. (Last sentence is copied
from RMK's patch comment :) ).

But using driver_register directly doesn't break anything yet.

> 
> If these are what other drivers do, I certainly don't want to see
> camera
> driver being different.
> 

I don't see this as 'must have' kind of things, but if I look back at
what my camera patch gained having those modifications as of current
state of usage for OMAP1610/1710 camera arch, it is 'nothing' except
(void *) casting.

Just FYI.

[1] http://lwn.net/Articles/161236/
[2] http://lwn.net/Articles/158747/
[3] http://lwn.net/Articles/158781/


---Komal Shah
http://komalshah.blogspot.com/

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

  reply	other threads:[~2006-02-24 10:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24  0:49 [PATCH] OMAP1: camera core : Use platform driver structure Zhang, Jian
2006-02-24 10:35 ` Komal Shah [this message]
2006-03-03 19:52   ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2006-02-24 14:28 Woodruff, Richard
2006-03-03 19:49 ` Tony Lindgren
2006-02-23 12:53 Komal Shah

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=20060224103550.28867.qmail@web32915.mail.mud.yahoo.com \
    --to=komal_shah802003@yahoo.com \
    --cc=jzhang@ti.com \
    --cc=linux-omap-open-source@linux.omap.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