To answer my own question in case someone else is facing the same problem. The driver that came with kernel 3.18 is broken. The driver assumes the magnetometer has a configurable DRDY interrupt when in fact it does not. To fix the problem, backport the st sensors iio drivers from kernel 4.2-rc2. Cheers, Joo.