From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965227AbcJQLfh (ORCPT ); Mon, 17 Oct 2016 07:35:37 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:59456 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935124AbcJQLfQ (ORCPT ); Mon, 17 Oct 2016 07:35:16 -0400 From: Arnd Bergmann To: Lubomir Rintel Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Dominik Brodowski Subject: Re: [PATCH] char/pcmcia: add scr24x_cs chip card interface driver Date: Mon, 17 Oct 2016 13:34:54 +0200 Message-ID: <7482716.OJg3IkqZRp@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <1476703321.8877.28.camel@v3.sk> References: <1476115095-8497-1-git-send-email-lkundrak@v3.sk> <20161016095719.GA27304@kroah.com> <1476703321.8877.28.camel@v3.sk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:Rdrvk5pNApxKTR6YcvhLHvr7/EYW3bI59Ft/LbxwnwQW3qXHcNB YMcCKFAhGADlBPtbzRtVtPavRGgVx1YKXqqspMTT9HB0uTVZjy/JeczGxKFxHMtl89lVeZC m/gs9E+GduAC+uXRUHiyIgfH8/YX6/NxIWAdZHlNyVNzrphO1hPcIVQ598OS7GAG7nRD4r2 Os6r1T7otRhuC2ngZMgnw== X-UI-Out-Filterresults: notjunk:1;V01:K0:ro+ktqXFVYc=:Ci7SshQwBnEiVYFmf85Lws Qs8iI+1bhqglj+Yg3nhAGbGRf8TExK1f2A0ZQXY9eXQ3pxIvk/o9f3mTgQHUb/lB636t4RVb1 pGDT/2Fja5FzAcS1w9kWG3iimAnY6yO+tyZ6MUHFpvNpTjQdLGSwuRJGOcOqQpK+OAGm66NOf pf6+ShgNYO3cWbEOqCsXAMP1Yc2WnQUTVkq8gnZdn3xx34xxi75YlMgbfA3JvTT7jBb4b3Dv6 w5bSfX5/5Sg3k0jee/eqtzJLk+F/vDvjYL2VmXTg+a+lA5g2iNhPiywXe5rvLYf1XYkvJCDJr ko2EGZmlwx81GmAIQqX3EZIgbQxZgeh6rVDixuLL7l1qJ9mjMIxc3c6ZMw5qvsG7zKzDDxz6R cnuvAj5F6z8HwYHrGMzdbTICqHVTkGXmz8720U9ELZGciTjAmE4nBHc+w71grtmarlSXMOrqL XeJM1/EPYZtenHB/inpnEjq9DaqwNM3teAKcSfv6E37IISJyACnQgAW1x5T2TW8h3Jv/FZo+D 79gqIhWg7+ayEO6dkL7PP6VhgQysNeBltUoyKsW357EXVvlbvJSXD5bP505R5l+AUPkc1HVun H87OgIAC1ktxQ/C5M6Sb8p51I6z6AmqT+BUncbC5Iol0dFXHbGDjIstf75nHuGNYzT1w9dweq DBji1kM1fE088Foj4/d3mPMzE/6umjP3p/TwVfV9rBYvYimN9z8kMEXOXTEDK92b96ZNqz2Fu FIIAoJKUg7AxiZre Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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