Required for assembly of dynein regulatory complex (DRC) and inner dynein arm (IDA) complexes, which are responsible for ciliary beat regulation, thereby playing a central role in motility in cilia and flagella. Probably acts together with ccdc39 to form a molecular ruler that determines the 96 nanometer (nm) repeat length and arrangements of components in cilia and flagella. Localizes to cytoplasm and motile cilium. Expressed in tissues that contain motile cilia, including Kupffer's vesicle, the floorplate, the pronephric tubules and the otic vesicle. Defects are the cause of the lok phenotype, a phenotype related to primary ciliary dyskinesia (PCD). PCD is characterized by curly-tail down phenotype, laterality defects and pronephric cysts, but without defects in sensory cilia and without the presence of hydrocephalus. Belongs to the CCDC40 family.