Active surface potential control in nanostructured MOX layers