The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Lubomir Rintel <lkundrak@v3.sk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	Dominik Brodowski <linux@dominikbrodowski.net>
Subject: Re: [PATCH] char/pcmcia: add scr24x_cs chip card interface driver
Date: Mon, 17 Oct 2016 13:34:54 +0200	[thread overview]
Message-ID: <7482716.OJg3IkqZRp@wuerfel> (raw)
In-Reply-To: <1476703321.8877.28.camel@v3.sk>

On Monday, October 17, 2016 1:22:01 PM CEST Lubomir Rintel wrote:
> > > > And why do you need a char device for this type of
> > > > hardware?  Isn't there already an existing interface for this device
> > > > class?
> > > 
> > > (Arnd answered this better than I would do in his response to this
> > > message).
> > 
> > Yeah, that makes sense.  A bit messy though.
> 
> I guess that makes sense; the chip card readers tend to be rather
> complex and the API (IFD Handler API) user space typically uses is
> rather generic -- it would require quite some logic to interface with a
> particular hardware.
> 
> Moreover, most of the present-day smart card readers are standard CCID
> class USB devices, with the CCID to IFD done in userspace. There's some
> serial readers too, attached via UARTs too that use the tty ioctls to
> detect the card presence and set the baud rate, etc.
> 
> The rest (PCMCIA) seem to emulate either of the two. It still makes
> sense to implement the IFD in userspace and I guess there's not too
> much common ground for a device class here.

Well, you could in theory implement this as a tty driver
and be compatible with the serial port devices, see
drivers/tty/goldfish.c for an example driver.

Not sure if that actually improves things for you or not,
but the advantage is that there is an existing kernel
subsystem for it.

	Arnd

      reply	other threads:[~2016-10-17 11:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10 15:58 [PATCH] char/pcmcia: add scr24x_cs chip card interface driver Lubomir Rintel
2016-10-10 17:33 ` Greg Kroah-Hartman
2016-10-10 19:24   ` Arnd Bergmann
2016-10-16  9:23   ` Lubomir Rintel
2016-10-16  9:57     ` Greg Kroah-Hartman
2016-10-17 11:22       ` Lubomir Rintel
2016-10-17 11:34         ` Arnd Bergmann [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=7482716.OJg3IkqZRp@wuerfel \
    --to=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=lkundrak@v3.sk \
    /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