]> git.baikalelectronics.ru Git - kernel.git/commit
video: fbdev: imxfb: ensure balanced regulator usage
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 23 Mar 2020 21:16:26 +0000 (22:16 +0100)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 17 Apr 2020 13:50:07 +0000 (15:50 +0200)
commit1d92e7bb6b40672c54f40a5d39d49eac7dab5e60
tree95eeee1dbbd109a0826163aea6a0311e2b79c8a6
parent8be7c52e14a710c73d4eb6b9a68b57f6d9d9e8e4
video: fbdev: imxfb: ensure balanced regulator usage

The fbdev framework doesn't care to call the .set_power callback only on
changes. So the driver has to care for itself that the regulator doesn't
get disabled more often than enabled.

This fixes the regulator warning

unbalanced disables for lcd supply

which can be triggered by doing

echo 4 > /sys/class/lcd/imxfb-lcd/lcd_power

twice.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200323211626.24812-1-u.kleine-koenig@pengutronix.de
drivers/video/fbdev/imxfb.c