From: Lars-Peter Clausen <lars@metafoo.de>
To: Priyaranjan Das <priyaranjan456789@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
mankad.maulik@gmail.com
Subject: Re: Query related to MSR(Magnetic Stripe Reader) Device Driver
Date: Fri, 15 Feb 2013 18:28:24 +0100 [thread overview]
Message-ID: <511E7038.9010205@metafoo.de> (raw)
In-Reply-To: <CAMNxYszE+qQv2vVw6DqNGuow+30K-=+S8TfgyNJwFeEN=EfEsA@mail.gmail.com>
On 02/15/2013 12:18 PM, Priyaranjan Das wrote:
> Hi Greg,
>
> On Thu, Jan 31, 2013 at 11:09 AM, Priyaranjan Das
> <priyaranjan456789@gmail.com> wrote:
>> Hi Greg,
>>
>> On Tue, Jan 29, 2013 at 7:03 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
>>> On Mon, Jan 28, 2013 at 03:25:08PM +0530, Priyaranjan Das wrote:
>>>> Hi Greg,
>>>>
>>>> On Tue, Jan 22, 2013 at 10:06 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
>>>>> On Tue, Jan 22, 2013 at 03:02:32PM +0530, Priyaranjan Das wrote:
>>>>>> Hi All,
>>>>>>
>>>>>> I am working on MSR(Magnetic Stripe Reader) for a product . I wish to
>>>>>> know whether any MSR( Magnetic Stripe/card Reader) driver is available
>>>>>> in the current source or not. I need this for reference. Could anyone
>>>>>> please help me?
>>>>>
>>>>> Most of these types of devices that I have worked with always show up as
>>>>> a keyboard device (ps/2 pass-through or a USB hid device.) What type of
>>>>> interface does your device present to the operating system?
>>>>>
>>>>
>>>> The MSR will be a part of a SoC. It is a memory mapped device hence
>>>> there is no interface like USB.
>>>
>>> Ok, that's different. But how will your driver want to communicate the
>>> reader data to userspace? That will probably determine where you want
>>> to put it.
>>>
>>> I would recommend making it an input device and sending keystrokes that
>>> you read from the card, so you can properly integrate into userspace
>>> applications that are used to using a card reader.
>>>
>>>> MSR IP contains an ADC which the driver will read and interpret the
>>>> data. I am planning to write a Driver for the same. Will this driver
>>>> fall under drivers/mfd/* ?
>>>
>>> As per the above, I would think drivers/input/ wouldn't you?
>>>
>>> Hope this helps,
>>>
>>
>> Thanks for your help!.
>>
>> Yes, you are right, it should be under drivers/input.
>> I am trying to prepare the design right now.
>>
>>
>
> The MSR IP can be also be used either as a general purpose ADC or in
> Magnetic stripe card reader mode.The IP supports both the modes and
> provides FIFO for storing ADC data.
>
> I also got to know about IIO subsystem where ADC drivers are
> implemented. Our use-case will be to use either Magnetic Stripe reader
> mode or general purpose ADC mode in a given configuration. Can I use
> IIO subsystem for the Magnetic Stripe driver?
Hi,
Well for the ADC functionality it certainly makes sense to use the IIO
framework. The magnetic stripe reader functionality should probably go into
drivers/input. How to do this exactly depends a bit on how exactly the
hardware works. A good idea is probably to use a mfd driver which
instantiates both the input and the IIO driver and does some arbitration
between them. If the magnetic stripe reader is a feature that's build on top
of the ADC functionality you could use the IIO in-kernel API to do ADC
conversions from your input driver. If the ADC and magnetic stripe reader
mode are exclusive-or it probably makes sense to only instantiate one of
them at a time from the MFD driver.
- Lars
next prev parent reply other threads:[~2013-02-15 17:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 9:32 Query related to MSR(Magnetic Stripe Reader) Device Driver Priyaranjan Das
2013-01-22 16:36 ` Greg KH
2013-01-28 9:55 ` Priyaranjan Das
2013-01-29 13:33 ` Greg KH
2013-01-31 5:39 ` Priyaranjan Das
2013-02-15 11:18 ` Priyaranjan Das
2013-02-15 16:36 ` Greg KH
2013-02-15 17:25 ` Jonathan Cameron
2013-02-15 17:28 ` Lars-Peter Clausen [this message]
2013-02-19 12:43 ` Priyaranjan Das
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=511E7038.9010205@metafoo.de \
--to=lars@metafoo.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mankad.maulik@gmail.com \
--cc=priyaranjan456789@gmail.com \
/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