The humble LM317 adjustable voltage regulator is everywhere ... including driving LEDs and laser diodes. While this circuit may not be as efficient as an LED driver module or a switching solution ...
Its output is proportional to the guaranteed 2% precision of the LM317 internal voltage reference, making it securely independent of vagaries of both the 5-V logic supply rail and incoming raw DC ...