From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 2/2] Add: n900modem driver
Date: Mon, 30 Aug 2010 16:03:28 -0500 [thread overview]
Message-ID: <4C7C1CA0.9030007@gmail.com> (raw)
In-Reply-To: <AANLkTinVYbHMGn7Pi+0Juhng+sTBPDP+OWzqm55He-Uz@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2042 bytes --]
Hi Aki,
On 08/30/2010 09:23 AM, Aki Niemi wrote:
> Hi,
>
> 2010/8/17 Denis Kenzior <denkenz@gmail.com>:
>> Why are we doing this inside n900modem? Can't we simply:
>>
>> 1. Make isimodem/isimodem.c register these (just like atmodem, stemodem,
>> mbmmodem, etc does)
>> 2. Rip out the actual modem driver out of isimodem/isimodem.c
>> 3. Have plugins/n900.c contain the modem driver?
>
> I think you mean rip out the modem driver in isimodem/isimodem.c, and
> put it in usbpnmodem.c? I think that makes sense.
Item #1 referred to isi_foo_init() and isi_foo_exit() being performed in
the n900modem plugin. That should be done by drivers/isimodem/isimodem.c...
Ripping out modem driver (not atom driver) stuff out of
drivers/isimodem/isimodem.c and moving it into plugins/ somewhere is a
good idea though.
>
>>> - /* Expect phonet interface name usbpn<idx> */
>>> - if (strncmp(ifname, "usbpn", 5) ||
>>> - ifname[5 + strspn(ifname + 5, "0123456789")])
>>> + if (match_ifname("usbpn", ifname)) {
>>> + driver = "isimodem";
>>> + address = PN_DEV_PC;
>>> + } else if (strcmp("phonet0", ifname) == 0) {
>>> +#if HAVE_N900MODEM
>>> + driver = "n900modem";
>>> +#else
>>> + driver = "isimodem";
>>> +#endif
>>
>> And this really needs to go...
>
> Couldn't we rather either build support for native modem or USB
> modems, but not both at the same time? In other words, build only one
> or the other of these two plugins.
>
I'm still a little fuzzy what is happening here actually. Correct me if
I'm wrong, but you have a USB serial device that is either the 'real'
serial port (e.g. on the N900 running natively) or a serial port
exported over USB. Depending on which one it is, you want to use either
the n900 driver or the isimodem driver.
My strong preference is not to have any #ifdefs or configure switches
for this.
Is there any way to detect whether this is running natively?
Regards,
-Denis
next prev parent reply other threads:[~2010-08-30 21:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-13 18:31 [PATCH 1/2] Add --disable-n900modem to the configure script Pekka.Pessi
2010-08-13 18:31 ` [PATCH 2/2] Add: n900modem driver Pekka.Pessi
2010-08-17 19:19 ` Denis Kenzior
2010-08-30 14:23 ` Aki Niemi
2010-08-30 21:03 ` Denis Kenzior [this message]
2010-08-30 21:28 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2010-09-01 8:32 ` Pekka Pessi
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=4C7C1CA0.9030007@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/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.