Essential ion channel and serine/threonine-protein kinase. Divalent cation channel permeable to calcium and magnesium (PubMed:35561741). Has a central role in magnesium ion homeostasis and in the regulation of anoxic neuronal cell death. Involved in TNF-induced necroptosis downstream of MLKL by mediating calcium influx. The kinase activity is essential for the channel function. May be involved in a fundamental process that adjusts plasma membrane divalent cation fluxes according to the metabolic state of the cell. Phosphorylates annexin A1 (ANXA1).