[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgPE8Z7HxU2wv7J/@sirena.org.uk>
Date: Wed, 9 Feb 2022 13:43:13 +0000
From: Mark Brown <broonie@...nel.org>
To: Javier Martinez Canillas <javierm@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
Noralf Trønnes <noralf@...nnes.org>,
Maxime Ripard <maxime@...no.tech>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
linux-fbdev@...r.kernel.org,
Daniel Vetter <daniel.vetter@...ll.ch>,
Sam Ravnborg <sam@...nborg.org>,
dri-devel@...ts.freedesktop.org, Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Lee Jones <lee.jones@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, linux-pwm@...r.kernel.org
Subject: Re: [PATCH v3 3/7] drm: Add driver for Solomon SSD130X OLED displays
On Wed, Feb 09, 2022 at 10:03:10AM +0100, Javier Martinez Canillas wrote:
> + if (ssd130x->vbat_reg) {
> + ret = regulator_enable(ssd130x->vbat_reg);
> + if (ret) {
> + dev_err(dev, "Failed to enable VBAT: %d\n", ret);
> + return ret;
> + }
> + }
Unless the device supports power being physically omitted regulator
usage should not be optional, it's just more code and a recipie for poor
error handling.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists