Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-15 Thread Maxime Ripard
On Fri, Jan 12, 2018 at 12:09:39AM +0200, Laurent Pinchart wrote: > Hi Maxime, > > On Friday, 12 January 2018 00:06:06 EET Laurent Pinchart wrote: > > On Thursday, 11 January 2018 15:12:56 EET Maxime Ripard wrote: > > > On Thu, Jan 11, 2018 at 03:05:01PM +0200, Laurent Pinchart wrote: > > >> On

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-15 Thread Maxime Ripard
On Fri, Jan 12, 2018 at 12:09:39AM +0200, Laurent Pinchart wrote: > Hi Maxime, > > On Friday, 12 January 2018 00:06:06 EET Laurent Pinchart wrote: > > On Thursday, 11 January 2018 15:12:56 EET Maxime Ripard wrote: > > > On Thu, Jan 11, 2018 at 03:05:01PM +0200, Laurent Pinchart wrote: > > >> On

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Laurent Pinchart
Hi Maxime, On Friday, 12 January 2018 00:06:06 EET Laurent Pinchart wrote: > On Thursday, 11 January 2018 15:12:56 EET Maxime Ripard wrote: > > On Thu, Jan 11, 2018 at 03:05:01PM +0200, Laurent Pinchart wrote: > >> On Wednesday, 10 January 2018 17:59:41 EET Maxime Ripard wrote: > >>> The

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Laurent Pinchart
Hi Maxime, On Friday, 12 January 2018 00:06:06 EET Laurent Pinchart wrote: > On Thursday, 11 January 2018 15:12:56 EET Maxime Ripard wrote: > > On Thu, Jan 11, 2018 at 03:05:01PM +0200, Laurent Pinchart wrote: > >> On Wednesday, 10 January 2018 17:59:41 EET Maxime Ripard wrote: > >>> The

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Laurent Pinchart
Hi Maxime, On Thursday, 11 January 2018 15:12:56 EET Maxime Ripard wrote: > On Thu, Jan 11, 2018 at 03:05:01PM +0200, Laurent Pinchart wrote: > > On Wednesday, 10 January 2018 17:59:41 EET Maxime Ripard wrote: > >> The devm_regulator_get_optional function, unlike it was assumed in the > >> commit

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Laurent Pinchart
Hi Maxime, On Thursday, 11 January 2018 15:12:56 EET Maxime Ripard wrote: > On Thu, Jan 11, 2018 at 03:05:01PM +0200, Laurent Pinchart wrote: > > On Wednesday, 10 January 2018 17:59:41 EET Maxime Ripard wrote: > >> The devm_regulator_get_optional function, unlike it was assumed in the > >> commit

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Laurent Pinchart
Hi Jani, On Thursday, 11 January 2018 16:31:59 EET Jani Nikula wrote: > On Thu, 11 Jan 2018, Laurent Pinchart wrote: > > My preference, however, would be for devm_regulator_get_optional() to > > return NULL when no regulator is present. The current implementation > > returns -ENODEV in multiple

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Laurent Pinchart
Hi Jani, On Thursday, 11 January 2018 16:31:59 EET Jani Nikula wrote: > On Thu, 11 Jan 2018, Laurent Pinchart wrote: > > My preference, however, would be for devm_regulator_get_optional() to > > return NULL when no regulator is present. The current implementation > > returns -ENODEV in multiple

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Jani Nikula
On Thu, 11 Jan 2018, Laurent Pinchart wrote: > My preference, however, would be for devm_regulator_get_optional() to return > NULL when no regulator is present. The current implementation returns -ENODEV > in multiple cases, making it impossible to properly

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Jani Nikula
On Thu, 11 Jan 2018, Laurent Pinchart wrote: > My preference, however, would be for devm_regulator_get_optional() to return > NULL when no regulator is present. The current implementation returns -ENODEV > in multiple cases, making it impossible to properly discriminate between > having no

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Maxime Ripard
Hi, On Thu, Jan 11, 2018 at 03:05:01PM +0200, Laurent Pinchart wrote: > Hi Maxime, > > (CC'ing Mark Brown) > > Thank you for the patch. > > On Wednesday, 10 January 2018 17:59:41 EET Maxime Ripard wrote: > > The devm_regulator_get_optional function, unlike it was assumed in the > > commit

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Maxime Ripard
Hi, On Thu, Jan 11, 2018 at 03:05:01PM +0200, Laurent Pinchart wrote: > Hi Maxime, > > (CC'ing Mark Brown) > > Thank you for the patch. > > On Wednesday, 10 January 2018 17:59:41 EET Maxime Ripard wrote: > > The devm_regulator_get_optional function, unlike it was assumed in the > > commit

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Laurent Pinchart
Hi Maxime, (CC'ing Mark Brown) Thank you for the patch. On Wednesday, 10 January 2018 17:59:41 EET Maxime Ripard wrote: > The devm_regulator_get_optional function, unlike it was assumed in the > commit a1c55bccf600 ("drm/panel: lvds: Add support for the power-supply > property"), is actually

Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-11 Thread Laurent Pinchart
Hi Maxime, (CC'ing Mark Brown) Thank you for the patch. On Wednesday, 10 January 2018 17:59:41 EET Maxime Ripard wrote: > The devm_regulator_get_optional function, unlike it was assumed in the > commit a1c55bccf600 ("drm/panel: lvds: Add support for the power-supply > property"), is actually

[PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-10 Thread Maxime Ripard
The devm_regulator_get_optional function, unlike it was assumed in the commit a1c55bccf600 ("drm/panel: lvds: Add support for the power-supply property"), is actually returning an error pointer with -ENODEV instead of NULL when there's no regulator to find. Make sure we handle that case properly.

[PATCH] drm/panel: lvds: Handle the optional regulator case properly

2018-01-10 Thread Maxime Ripard
The devm_regulator_get_optional function, unlike it was assumed in the commit a1c55bccf600 ("drm/panel: lvds: Add support for the power-supply property"), is actually returning an error pointer with -ENODEV instead of NULL when there's no regulator to find. Make sure we handle that case properly.