iPhone has "driving in the car" detection, afaik it only stops you from receiving texts but maybe they should go further and don't even let you unlock it (you can always dismiss it by saying that you are a passenger).
Anyways this is hardly a hardware issue, I think that punishment for texting while driving should be way more severe. Why not do it the high-school way and confiscate the cell phone? You can grab it later at a police station or pay for shipping if you are not a local.
One step without a distraction from the road vs. three steps that make you focus your face/attention more on your phone then the road!