LinuxCNC now supports the M19 command and spindle orient, but there is no built-in way to reset the spindle encoder to index.
It would be useful for LinuxCNC to set an index-enable pin and command a low spindle speed until that pin goes false as an optional part of the homing sequence.
There are ways to do this in HAL and possibly with G-code, but none feel very satisfactory.
What sort of spindle would benefit from this feature? We discussed this informally on #linuxcnc-devel and failed to imagine one.
Any spindle that uses spindle orientation needs the spindle encoder to be zeroed to index before it can be used for orientation. Imagine a spindle that needs to be oriented for a toolchanger. The encoder reads zero at power up,and when the first tool is loaded. The spindle orients to zero, but the encoder isn't really at the index position. Toolchanger crash ensues.