Essential for normal spermatogenesis and male fertility (PubMed:16533358). Required for proper cell restructuring and DNA condensation during the elongation phase of spermiogenesis. Involved in the histone-protamine transition of sperm chromatin and the subsequent production of functional sperm. Binds both double-stranded and single- stranded DNA, ATP and protamine-1. {ECO:0000250|UniProtKB:Q8CJI4, ECO:0000269|PubMed:16533358}. This is the function of H1-7 (H1.7 linker histone, Ensembl gene identifier ENSG00000187166).