All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] modem: Make it possible to identify the physical device of the modem
Date: Thu, 01 Nov 2012 04:49:37 -0500	[thread overview]
Message-ID: <509245B1.5000804@gmail.com> (raw)
In-Reply-To: <1351766368-30075-1-git-send-email-holger@freyther.de>

[-- Attachment #1: Type: text/plain, Size: 1834 bytes --]

Hi Holger,

On 11/01/2012 05:39 AM, Holger Hans Peter Freyther wrote:
> From: Holger Hans Peter Freyther<hfreyther@sysmocom.de>
>
> The naming of modems might not reflect the physical order of devices.
> E.g. /dev/ttyUSB0 might end up as /wavecom_3 and /dev/ttyUSB2 might be
> /wavecom_1. Add a 'Device' property to be able to identify the port.
>

Aren't your devices serial port based and detected via udev rules? 
Anyway, I can understand the need here but...

> An application can then use sysfs to identify the bus and device to
> rebuild the physical order. This way we can map the modem path to the
> port number on our modem bank.
> ---
>   doc/modem-api.txt |    5 +++++
>   src/modem.c       |    6 ++++++
>   2 files changed, 11 insertions(+)
>
> diff --git a/doc/modem-api.txt b/doc/modem-api.txt
> index 1c4e440..68e719e 100644
> --- a/doc/modem-api.txt
> +++ b/doc/modem-api.txt
> @@ -168,3 +168,8 @@ Properties	boolean Powered [readwrite]
>   			supported by this modem.
>
>   			Possible values are "hfp", "sap" and "hardware".
> +
> +		string Device [readonly, optional]
> +
> +			The physical device the modem is connected to. This
> +			can be used to identify the physical port of the modem.

I really do not think exposing the device name is a good idea.  First of 
all, no normal application can make use of it anyway.  Once the modem is 
powered on oFono takes exclusive rights to it.  Secondly, most USB 
sticks are actually multi-device groupings anyway, so this property 
really makes no sense.

Why don't you simply assign a name to the modem using 
ofono_modem_set_name.  This can be done by assigning the name directly 
in the udev rule and having the necessary magic inside plugins/udev.c. 
The name can be anything you wish in that case.

Regards,
-Denis

  reply	other threads:[~2012-11-01  9:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 10:39 [PATCH] modem: Make it possible to identify the physical device of the modem Holger Hans Peter Freyther
2012-11-01  9:49 ` Denis Kenzior [this message]
2012-11-01 16:16   ` [PATCH] modem: Make it possible to identify the physical device of the modemy Holger Hans Peter Freyther
2012-11-01 12:39     ` Denis Kenzior
2012-11-01 10:41 ` [PATCH] modem: Make it possible to identify the physical device of the modem Holger Freyther

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=509245B1.5000804@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.