ding-a-ling (n.)

"one who is crazy," 1940, from earlier adjective (1935), from noun meaning "the sound of little bells" (1894), ultimately imitative of the tinkling sound (by 1848; see ding (v.)). The extended senses are from the notion of hearing bells in the head.