Hi Bojornar Skaar, Something that I have tried many times at my workshop which has fixed this issue is (as crazy as it sounds) going into settings and reseting the network settings. The reason for this is because the proximity sensor is a part of that circuitry. Another suggestion is checking for dust under the sensor because that can stop if from functioning. If you have any question feel free to ask! Best Of Luck!!!
Hi Yathavan, From experience in fixing these iPads my opinion would be that the digitiser on the device is faulty. You could try a DFU restore but the screen probably needs to be replaced. There are many different guides online that show you how to replace the iPads digitiser: iPad 2 Wi-Fi EMC 2415 Front Panel Replacement. If you are uncomfortable replacing your screen then I would recommend taking it into a repairer and getting them to have a look at it. If you have any questions don't hesitate to ask! Best Of Luck!!!