Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1475847
| From | Stefan Agner <stefan@agner.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] video: mxsfb: get supply regulator optionally |
| Date | 2016-09-04 06:40 +0200 |
| Message-ID | <sdxnP-6fv-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
The lcd-supply is meant to be optional, there are several device- trees not specifying it and the code handles error values silently. Therefor, avoid creating a dummy regulator (and the associated warning) by using devm_regulator_get_optional. While at it, document that fact also in the device-tree bindings. Signed-off-by: Stefan Agner <stefan@agner.ch> --- Documentation/devicetree/bindings/display/mxsfb.txt | 3 +++ drivers/video/fbdev/mxsfb.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/mxsfb.txt b/Documentation/devicetree/bindings/display/mxsfb.txt index 96ec517..0bc530f 100644 --- a/Documentation/devicetree/bindings/display/mxsfb.txt +++ b/Documentation/devicetree/bindings/display/mxsfb.txt @@ -7,6 +7,9 @@ Required properties: - interrupts: Should contain lcdif interrupts - display : phandle to display node (see below for details) +Optional properties: +- lcd-supply: Regulator for LCD supply voltage. + * display node Required properties: diff --git a/drivers/video/fbdev/mxsfb.c b/drivers/video/fbdev/mxsfb.c index 4e6608c..4f7570f 100644 --- a/drivers/video/fbdev/mxsfb.c +++ b/drivers/video/fbdev/mxsfb.c @@ -920,7 +920,7 @@ static int mxsfb_probe(struct platform_device *pdev) if (IS_ERR(host->clk_disp_axi)) host->clk_disp_axi = NULL; - host->reg_lcd = devm_regulator_get(&pdev->dev, "lcd"); + host->reg_lcd = devm_regulator_get_optional(&pdev->dev, "lcd"); if (IS_ERR(host->reg_lcd)) host->reg_lcd = NULL; -- 2.9.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] video: mxsfb: get supply regulator optionally Stefan Agner <stefan@agner.ch> - 2016-09-04 06:40 +0200
Re: [PATCH] video: mxsfb: get supply regulator optionally Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-09-06 10:30 +0200
Re: [PATCH] video: mxsfb: get supply regulator optionally Stefan Agner <stefan@agner.ch> - 2016-09-06 20:30 +0200
Re: [PATCH] video: mxsfb: get supply regulator optionally Mark Brown <broonie@kernel.org> - 2016-09-07 00:30 +0200
Re: [PATCH] video: mxsfb: get supply regulator optionally Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-09-07 09:30 +0200
csiph-web