From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: pavan_savoy@ti.com
Cc: marcel@holtmann.org, gregkh@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers:staging: sources for HCI LL PM protocol
Date: Tue, 30 Mar 2010 19:33:29 +0100 [thread overview]
Message-ID: <20100330193329.40564ab9@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <792863.15718.qm@web94916.mail.in2.yahoo.com>
> The ST KIM module, is a platform device, which I use to pass the GPIO data from the arch/XX/board-XXX.c files, so, suppose we do have 2 devices for a platform, then I would need 2 platform devices right ?
>
> And there-by can I use that platform device context ?
Yes or some struct created in the actual module and passed around in
preference to the platform device. A lot of kernel drivers end up
creating something per device that looks like
struct my_thing {
struct device *dev; /* or pci_dev etc */
[ all my per device bits ]
};
and sometimes creating linked lists of them (for power management most
often)
> However the problem really is,
>
> Suppose a BT driver wants to do an st_register() and use ST as its transport, how can I then tie it to a device ?
Not sure I follow
If you have some kind of context to kill off all the globals then you can
attach that to whatever local object you have for each device you are
interested in. That is why IRQ handlers pass a data value, why timers do,
why tty has ldisc_data, why workqueues do similar things and so on.
And if there is another layer you need to interface to which doesn't have
some kind of pointer for binding to layers above/below - add one.
next prev parent reply other threads:[~2010-03-30 18:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 23:20 [v4] New ldisc for WiLink7.0 pavan_savoy
2010-03-25 23:20 ` [PATCH] serial: TTY: new ldiscs for staging pavan_savoy
2010-03-25 23:20 ` [PATCH] drivers:staging: sources for ST core pavan_savoy
2010-03-25 23:20 ` [PATCH] drivers:staging: sources for Init manager module pavan_savoy
2010-03-25 23:20 ` [PATCH] drivers:staging: sources for HCI LL PM protocol pavan_savoy
2010-03-25 23:20 ` [PATCH] drivers:staging: sources for ST header file pavan_savoy
2010-03-25 23:20 ` [PATCH] drivers:staging: Kconfig, Makefile for TI's ST ldisc pavan_savoy
2010-03-25 23:20 ` [PATCH] Documentation:staging: add TODO and ABI to ti-st pavan_savoy
2010-03-25 23:20 ` [PATCH] bluetooth: BT driver using ST for TI combo devices pavan_savoy
2010-03-30 11:24 ` [PATCH] drivers:staging: sources for HCI LL PM protocol Alan Cox
2010-03-30 15:03 ` Pavan Savoy
2010-03-30 18:33 ` Alan Cox [this message]
2010-03-30 11:22 ` [PATCH] drivers:staging: sources for ST core Alan Cox
2010-03-30 15:53 ` Pavan Savoy
2010-03-30 20:38 ` Greg KH
2010-03-30 21:05 ` Pavan Savoy
2010-03-30 21:47 ` Greg KH
2010-03-31 2:24 ` Joe Perches
2010-03-25 23:30 ` [PATCH] serial: TTY: new ldiscs for staging Alan Cox
2010-03-26 15:08 ` Pavan Savoy
2010-03-28 4:58 ` [v4] New ldisc for WiLink7.0 Greg KH
2010-04-08 18:16 pavan_savoy
2010-04-08 18:16 ` [PATCH] serial: TTY: new ldiscs for staging pavan_savoy
2010-04-08 18:16 ` [PATCH] drivers:staging: sources for ST core pavan_savoy
2010-04-08 18:16 ` [PATCH] drivers:staging: sources for Init manager module pavan_savoy
2010-04-08 18:16 ` [PATCH] drivers:staging: sources for HCI LL PM protocol pavan_savoy
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=20100330193329.40564ab9@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=pavan_savoy@ti.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
all inboxes | Powered by JetHome®