Re: [PATCH v3] Input: add touchscreen driver for MELFAS MCS-5000 controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/21/2009 4:45 PM, Dmitry Torokhov wrote:
> On Tue, Jul 21, 2009 at 02:29:55PM +0900, Joonyoung Shim wrote:
>> On 7/16/2009 12:30 AM, Dmitry Torokhov wrote:
>>> On Wed, Jul 15, 2009 at 04:51:15PM +0900, Joonyoung Shim wrote:
>>>> On 7/14/2009 3:04 PM, Dmitry Torokhov wrote:
>>>>> Hi Joonyoung,
>>>>>
>>>>> On Fri, Jul 10, 2009 at 11:10:12AM +0900, Joonyoung Shim wrote:
>>>>>> The MELPAS MCS-5000 is the touchscreen controller. The overview of this
>>>>>> controller can see at the following website:
>>>>>>
>>>>>> http://www.melfas.com/product/product01.asp?k_r=eng_
>>>>>>
>>>>>> This driver is tested on s3c6410 NCP board and supports only the i2c
>>>>>> interface.
>>>>>>
>>>>>> Signed-off-by: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx>
>>>>>> ---
>>>>>> Dear Dmitry,
>>>>>>
>>>>>> I sent the patch v2, but couldn't get any response.
>>>>>> This patch v3 is updated a little bit from v2.
>>>>>>
>>>>> While I was sittign on the patch mainline acquired threaded IRQ support
>>>>> which fits the bill here and simplifies logic quite a bit, could you
>>>>> please try the patch below and tell me if the touchscreen still works?
>>>>>
>>>> I've tested your patch, but it does not work. If i touch the pannel,
>>>> mcs5000_ts_hardirq is called once, but mcs5000_ts_interrupt is not
>>>> called, so the interrupt is not occurred any longer.
>>>>
>>> Hmm, wierd... I guess since threaded IRQs are pretty new there could be
>>> some issues there.
>>>
>> I wonder, are there drivers using the threaded IRQs at present?
>> I want to refer another driver but i can't find it.
> 
> I have drivers/input/misc/dm355evm_keys.c in my tree.

I found it.

> 
> Anyways, I reviewed the code again and the problem with both patches is
> that we should not be disabling IRQ in the hard IRQ handler as it
> inhibits running the thread, so we need to move disable_irq_nosync to be
> the very first thing we do in the threaded handler.
> 

This has one problem.

The MCS5000 detects interrupt at low level. After interrupt occurs, the 
interrupt signal of the MCS5000 maintains the low level. It needs an i2c
operation to change to high the interrupt signal.

If we do disbling IRQ in the threaded handler instead of the hard IRQ
handler, the interrupt occurs infinitely because the interrupt signal is
low.

I have tested your new patch, and it appeared above result. It will 
maybe need a dummy i2c operation in the hard IRQ handler, but the i2c
operation cannot use in the IRQ handler.

> Updated patch below; please give it a spin. If it works the MAX driver
> will need the same adjustment.
> 

I'm not sure about the MAX7359 keypad driver, but I think we need some
thing disabling IRQ in hard IRQ handler to change to driver using
threaded irq.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux