Essential ion channel and serine/threonine-protein kinase. Crucial for magnesium homeostasis. Has an important role in epithelial magnesium transport and in the active magnesium absorption in the gut and kidney. Isoforms of the type M6-kinase lack the ion channel region.