I have the same question. I want to inline a Simulink Function, but the option is disabled. However, when integrating a Simulink Function locally inside a Stateflow, I can inline the function successfully. Why is it not possible to inline a Simulink Function outside Stateflow charts?
Although I do not know why it is not possible, I have found a work-around for my use-case. Might be interesting for you.
Instead of using a Simulink Function, I have put the contents of the function as a subsystem in my library, checked 'Treat as Atomic unit' and then the option becomes available to force 'inline' for code generation.
If you want to use the block directly in your model, you just use the library block and it will be inlined. If you want to call the function by its name in a Stateflow chart, you use a local Simulink Function in the Stateflow chart and put the library block inside there. You can force inlining for the local Simulink Function in Stateflow.
The only caveat is that it is not possible to call the library block inside a MATLAB Function, because it requires a Simulink Function to do that. But for my application, I don't need it.