On Thu, Jun 16, 2016 at 5:58 PM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: > The AK8975 has two power sources: Vdd (analog voltage supply) > and Vid (digital voltage supply). Optionally also obtain the Vid > supply regulator and enable it. > > If an error occurs when enabling one of the regulators: bail out. > > Cc: Gregor Boirie <gregor.boirie@xxxxxxxxxx> > Cc: Richard Leitner <dev@xxxxxxxxxx> > Cc: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx> > Cc: Lars-Peter Clausen <lars@xxxxxxxxxx> > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> After discussing with Mark Brown it was discovered that this regulator code is just wrong, IS_ERR_OR_NULL() shall never be used with regulators. I extended the patch series to fix this, then add the Vid regulator, then factor things around and add runtime PM. Sending in a moment. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html