[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMNxYszHu7SDSGk_FJ6A=VPEGu46NCRpgqFX3vcGS+=2fXEyqw@mail.gmail.com>
Date: Tue, 19 Feb 2013 18:13:37 +0530
From: Priyaranjan Das <priyaranjan456789@...il.com>
To: Lars-Peter Clausen <lars@...afoo.de>,
Jonathan Cameron <jic23@...nel.org>
Cc: Greg KH <gregkh@...uxfoundation.org>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, mankad.maulik@...il.com,
linux-input@...r.kernel.org, sameo@...ux.intel.com
Subject: Re: Query related to MSR(Magnetic Stripe Reader) Device Driver
Hi Jonathan,Lars,
>>>
>>
>> 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.
>
The Hardware consists of an ADC and an in-built FIFO in it. The Device
can either be configured as a Magnetic stripe reader or a GPADC.
After the ADC conversion,the data will be saved in the FIFO and the
driver has to read it and send it to the upper layers.Here the ADC and
Magnetic Stripe reader functionality are exclusively-or. In MSR mode,
the FIFO shall contain the track data for magnetic stripe card. This
data will be given to input subsystem.
To summarize below is my understanding:
1) drivers/input/misc: shall have the MSR driver.
2) drivers/iio/adc: shall have the GPADC driver.
3) drivers/mfd: shall support both above drivers and does arbitration.
Regards,
Priyaranjan
PS: Complete discussion can be found at [1]
[1] http://marc.info/?t=135884722400002&r=1&w=2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists