public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: James Courtier-Dutton <james.dutton@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: USB Smart Card reader
Date: Mon, 27 Feb 2012 12:36:20 -0800	[thread overview]
Message-ID: <20120227203620.GA11896@kroah.com> (raw)
In-Reply-To: <CAAMvbhH5wyiWf+1i4FWkAwGRtAK=xdZejbrtThzEdgTURo+uqg@mail.gmail.com>

On Mon, Feb 27, 2012 at 08:17:50PM +0000, James Courtier-Dutton wrote:
> On 25 February 2012 16:41, Greg KH <greg@kroah.com> wrote:
> > On Sat, Feb 25, 2012 at 10:01:17AM +0000, James Courtier-Dutton wrote:
> >> Hi,
> >>
> >> I have done some development work on the iuu_phoenix.c driver in the
> >> Linux kernel.
> >> The iuu_phoenix is a smart card reader.
> >> The smart card reader can be given a unique identification string of
> >> 16 characters/hex bytes. This ID can be read when the card reader is
> >> inserted into the USB port.
> >> I would like to be able to set up device names in /dev so that when
> >> inserting a card reader into the USB port, it always will appear withudev
> >> the same unique name in /dev.
> >> Similar to the by-uuid used for hard disk drives.
> >
> > Your distro should already have /dev/serial/ which provides this for you
> > automatically.  Have you used that and found it somehow lacking?
> >
> 
> My question is how to I get the card reader ID, that is going to be
> read by a special usb request, to influence the name of the
> /dev/serial device name.
> If the first card reader has ID: 0001, and the second has the ID:
> 0002. The IDs are programmed into the EEPROM of the card reader. I
> would like the IDs to be passed to udev so that even if only one card
> reader with ID:0002 is plugged in, it always gets the same name in
> /dev/serial
> The reason for this, is so that someone can look at the device name in
> /dev/serial and then know exactly which physical device it applies to.

If the card reader's "id" shows up in the serial number of the USB
device, /dev/serial/ will reflect this in the naming of the symlinks it
generates for the device.

Try it and see :)

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2012-02-27 20:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-25 10:01 USB Smart Card reader James Courtier-Dutton
2012-02-25 16:41 ` Greg KH
2012-02-27 20:17   ` James Courtier-Dutton
2012-02-27 20:36     ` Greg KH [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=20120227203620.GA11896@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=james.dutton@gmail.com \
    --cc=linux-serial@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox