From: Andrey Volkov <avolkov@varma-el.com>
To: Vitaly Bordug <vbordug@ru.mvista.com>
Cc: Greg KH <greg@kroah.com>,
linuxppc-embedded list <linuxppc-embedded@ozlabs.org>
Subject: Re: Platform device model drawback
Date: Tue, 15 Nov 2005 22:41:14 +0300 [thread overview]
Message-ID: <437A39DA.5030307@varma-el.com> (raw)
In-Reply-To: <437A21EA.5020507@ru.mvista.com>
Vitaly Bordug wrote:
> Greg KH wrote:
>
>> On Tue, Nov 15, 2005 at 07:51:20PM +0300, Vitaly Bordug wrote:
>>
>>> Hi, Greg!
>>>
>>> While doing "platformization" for one of the Freescale SoC's, I have
>>> discovered a serious drawback of the model - it prevents registering
>>> driver with the same name.
>>
>>
>> That's not a "drawback" :)
>>
>>> For instance, cpm2 on either ppc82xx or ppc85xx is very flexible, and
>>> its device fsl-cpm-scc could (and actually are) utilized in the
>>> different drivers.
>>>
>>> Those devices will have different bus_id, but pdev->name fields are
>>> the same for all the fsl-cpm-scc, only id is different there. Hence
>>> the fsl-cpm-scc could be driver_register'ed only once, while it is
>>> required several times.
>>
>>
>> A driver is registered only once, but can be bound to multiple devices
>> just fine, right?
>
> Please let me know, how?
>
> I have for instance struct device_driver with name="fsl-cpm-scc" in both
> fs_enet and cpm_uart(one using SCC1, the other - SCC4, the same device
> with different id's).
>
> Once it has been registered in fs_enet, I could not register it in
> cpm_uart, due to kobject_register fo require unique names in
> kobject->name. Am I missing something?
May be better to convert fsl-cpm-scc to BUS driver which will be
derived from platform_driver? In this case you'll get flexible
SCCx enumerator as bonus.
--
Regards
Andrey Volkov
prev parent reply other threads:[~2005-11-15 19:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-15 16:51 Platform device model drawback Vitaly Bordug
2005-11-15 16:55 ` Greg KH
2005-11-15 17:59 ` Vitaly Bordug
2005-11-15 17:59 ` Greg KH
2005-11-15 19:34 ` Kumar Gala
2005-11-15 22:40 ` Greg KH
[not found] ` <50e923300511161839g12ad1e88je46f989192cd3f58@mail.google.com>
[not found] ` <20051117041645.GA19145@kroah.com>
2005-11-17 17:51 ` Peter Hanson
2005-11-17 17:49 ` Greg KH
2005-11-17 23:05 ` Peter Hanson
2005-11-17 23:46 ` Grant Likely
2005-11-18 23:47 ` Greg KH
2005-11-19 2:37 ` Grant Likely
2005-11-15 19:43 ` Andy Fleming
2005-11-15 19:41 ` Andrey Volkov [this message]
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=437A39DA.5030307@varma-el.com \
--to=avolkov@varma-el.com \
--cc=greg@kroah.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=vbordug@ru.mvista.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;
as well as URLs for NNTP newsgroup(s).