I did this at a Japanese megacorp (which are, ahem, not historically known for their embrace of flexibility in employer/employee relations), as a condition of my accepting their offer of employment. My bosses were supportive.
I also got them to OK my ongoing participation in OSS.
I also got them to OK my ongoing participation in OSS.