As reported to the FAA. Reports are unverified, and codes are left as the FAA publishes them.
What was found
THE PILOT DECLARED AN EMERGENCY DUE TO A FLAPS FAILED EICAS MESSAGE. FLAPS FAILED TO RETRACT PROPERLY FROM 1 TO 0 AFTER TAKE OFF, AND AT EXTENSION FOR LANDING THE FLAPS FAILED AGAIN AND STAYED AT FLAPS 3 WITH FULL FLAPS SELECTED. MAINTNENANCE REMOVED AND REPLACED THE LT FLAP POSITION SENSOR UNIT IAW AMM 27-53-04. OPS CHECKED GOOD, NO FAULTS NOTED.