What is the shortest focal lenght they can make into a pancake for full frame? Could it have the same image quality as the 40mm? Thanks.
Focal length of a pancake lens is much closer related to the flange distance of the mount than the sensor size. Pancake lenses, due to their size, are typically very simple optical designs with no retrofocus elements. Therefore going shorter in focal length than where the elements can be placed from the sensor is difficult without making the lens bigger.
EF-M has a flange distance of 18mm, so a 22mm pancake lens is theoretically not the most compact design they can ultimately design. Anything longer than 22mm and the barrel gets longer. EF and EF-S both share a 44mm flange distance. So it looks like the 40mm pancake pokes into the mount a small amount - going much shorter in focal length will likely foul the mirror. Having said that, EF-S mount lenses have more rear clearance due to the smaller mirror in crop cameras, so it would be possible to create a shorter EF-S pancake lens.
A 28mm true pancake lens is theoretically only possible for a camera with a flange distance of 30mm or less - so this makes it look like a mirrorless lens, if it wasn't for the fact that the 28mm pancake is the least pancake like of the four listed in this patent (35% longer than the 45mm pancake).
The image height in the patent doesn't make sense - 21.64mm (if the translation of what that figure represents is correct). FF has a height of 24mm, and Canon crop has a height of 14.9mm. This is in a strange in-between zone - even bigger than the 18.6mm image height of APS-H.
And one final note which throws even more uncertainty into this - these patents were filed in December 2011, and the 40mm pancake was announced in June 2012. The specs of that lens seem to match the 40mm lens in this patent - length, focal length, aperture, number of elements and groups. Are these other three just designs which won't ever see the light of day?