The first U.S. patent for a coffee mill went to Thomas Bruff Sr. in 1798. His mill hung on the wall. Inside it, two round, toothed plates did the grinding, with coarse teeth near the center to crack the beans and fine teeth at the edges to finish them. That is the same idea behind a burr grinder today: crack first, then grind fine.
In 1840 the Peugeot family in France started making coffee mills from metal and wood. Around 1900, American companies, Hobart of Troy, Ohio among them, began putting electric motors on coffee mills so stores no longer had to grind by hand. Accounts disagree on who did it first and in which year, so we leave that question open. Whether you crank yours or plug it in, the job is the one Bruff described: break the bean evenly.