]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
fbdev/ssd1307fb: fix optional VBAT support
authorBastian Stender <bst@pengutronix.de>
Fri, 7 Apr 2017 15:28:23 +0000 (17:28 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 7 Apr 2017 15:28:23 +0000 (17:28 +0200)
commitcfc5b2b551d8c089079e754525839101b1b43624
tree62ae70745e3b6d6132da4c46ecf1c49829ac62f8
parentc1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201
fbdev/ssd1307fb: fix optional VBAT support

SSD1306 needs VBAT when it is wired in charge pump configuration only.
Other controllers of the SSD1307 family do not need it at all. This was
introduced by commit ba14301e0356 ("fbdev/ssd1307fb: add support to
enable VBAT").

Without VBAT configuration the driver now fails with:

failed to get VBAT regulator: -19

This is caused by misinterpretation of devm_regulator_get_optional
which "returns a struct regulator corresponding to the regulator
producer or IS_ERR() condition".

Handle -ENODEV without bailing out and making VBAT support really
optional.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jyri Sarha <jsarha@ti.com>
Cc: Roger Quadros <rogerq@ti.com>
[b.zolnierkie: minor fixups]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/ssd1307fb.c