This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: TSC code question

Part Number: AM3358

Tool/software: Linux

in code: drivers\input\touchscreen\ti_am335x_tsc.c, Pressure formula code is not correct to comments, single point touch is right with both original and modified code, but for multiple point touch, with the modified code is more precise than original code, please help to double confirm.     

/*

                     * Calculate pressure using formula

                     * Resistance(touch) = x plate resistance *

                     * x postion/4096 * ((z2 / z1) - 1)

                     */

  • What Linux version is this?
  • customer said Linux Kernel 4.5 is same at least. although customer use older version.
  • Hello Tony,

    Let me check on this.

    Regards,
    Nick
  • Hello Tony,

    Based on the naming convention I would expect the customer to be correct. However, it looks like the code is doing some sort of normalization by adding 2047 before dividing by 4096, so the programmer might have swapped Z1 and Z2 on purpose. I am not clear on why it was programmed the way it was.

    The software owner is on vacation until next week, so if I have not responded by next week please ping me a reminder. If the customer wants to run experiments in the meantime by inserting printk statements into the driver, we have kernel debug resources here.

    Regards,

    Nick

  • Nick,

    did the software owner come back? customer is waiting for the conclusion.

  • Hello Tony,

    Z1 and Z2 were swapped in this commit - before then, the code and the comment were aligned. There was no explanation as to why Z1 and Z2 were swapped, so the software owner is spending some time analyzing the patch now.

    Regards,

    Nick

  • Hello Tony, 

    The IP owner cannot find anything that supports swapping Z1 and Z2, so we are operating under the assumption that the change was a mistake. 

    Could the customer provide logs of the pressure reported with z = (z2 - z1) and z = (z1 - z2) and highlight what actually goes wrong? That will help us justify changing it back and submitting a fix to the upstream kernel.

    Regards, 

    Nick

  • Please check attachment of test log and snapshot from customer. 

    ts.zip

  • Thank you Tony. I have passed the customer test results on and will keep you updated.

    So the customer is asking if they can improve performance with multi-touch, and if so how?

    Regards,
    Nick
  • Update: the ti_am335x_tscadc driver was only written for single point touch and we only test for single point touch, so we cannot offer support on improving a multi-touch experience. It is recommended to use a stylus with a resistive touch screen.

    I ran tests on this end on our AM437x EVM (which should behave the same as AM335x). Matrix App Launcher -> Touch -> Interaction -> Multipoint Flames worked well when using up to 5 fingers, which is as expected. If I added a 6th finger the "flames" would randomly start jumping to different fingers. I noticed something similar if I used my palm rather than fingers.

    EDIT 9/5/2018: These tests do not actually apply - I was testing a capacitive touchscreen on the AM437x EVM rather than a resistive touchscreen.

    Do the customers still get strange results if they draw with multiple fingers rather than their entire palm?

    Regards,
    Nick

  • HI Nick

    Thank you for your support.

    We hope that touch screen can be a bit like the experience of smart phone, but of course it is not exactly the same.

    Our touch screen vendors give good presentation results, multi-touch circles, and line traces, indicating that the material can support multi-touch, touch accuracy, and expect you to improve the drive to support multi-touch.

  • Hello Alan,

    I will record your request to test the multi-touch elements of the ti_am335x_tsc driver, but right now TI does not plan to develop / test / support multi-touch in the ti_am335x_tsc driver. However, we can fix bugs in the driver (e.g., if you found swapping Z1 and Z2 affected single touch performance).

    Also, I made a mistake in my previous post - I was testing a capacitive touchscreen on the AM437x EVM rather than a resistive touchscreen, so my multitouch observations do not apply to the AM335x resistive touch driver. I have edited the post.

    Since the TI driver does not support multi-touch, your next steps should probably include contacting the touch screen vendor about their Linux drivers.

    Regards,
    Nick