Flaky skin can be a sign of both mites and fungal. Fungal tends to be characterised by flakes of skin being attached to the bottom of clumps of hair, and the hair slides out fairly easily when gently eased from the pig.
If the only symptom is scratching and mildly flaky skin, you should just be able to treat with the Ivermectin (the Xeno 450 or Xeno 50 as explained by Niki) and see how it clears up over a couple of weeks. A bath can also help to clean and clear the skin, even if the problem is not fungal.