From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Maxime Ripard" <maxime@cerno.tech>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
dri-devel@lists.freedesktop.org,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Noralf Trønnes" <noralf@tronnes.org>,
"Daniel Vetter" <daniel@ffwll.ch>,
"David Airlie" <airlied@linux.ie>,
"Lee Jones" <lee.jones@linaro.org>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linux-pwm@vger.kernel.org
Subject: Re: [PATCH v4 3/6] drm: Add driver for Solomon SSD130x OLED displays
Date: Fri, 11 Feb 2022 17:49:07 +0200 [thread overview]
Message-ID: <YgaFc++EP3/hv+iA@smile.fi.intel.com> (raw)
In-Reply-To: <eed8200c-7716-ce4f-dac5-bd6f0345b631@redhat.com>
On Fri, Feb 11, 2022 at 01:05:57PM +0100, Javier Martinez Canillas wrote:
> On 2/11/22 12:33, Andy Shevchenko wrote:
> > On Fri, Feb 11, 2022 at 10:19:24AM +0100, Javier Martinez Canillas wrote:
...
> >> + * Helper to write command (SSD130X_COMMAND). The fist variadic argument
> >> + * is the command to write and the following are the command options.
> >
> > This is not correct explanation. Please, rephrase to show that _each_ of the
> > options is sent with a preceding command.
> >
>
> It's a correct explanation IMO from the caller point of view. The first argument
> is the command sent (i.e: SSD130X_SET_ADDRESS_MODE) and the next ones are the
> the command options (i.e: SSD130X_SET_ADDRESS_MODE_HORIZONTAL).
>
> The fact that each command and options are preceding with a SSD130X_COMMAND
> value is part of the protocol of the device and a detail that's abstracted
> away by this helper function to the callers.
My previous suggestion about bulk transaction was purely based on this
(misinterpreted) description. Can we make sure somehow that another reader
don't trap into the same?
...
> >> + bl = devm_backlight_device_register(dev, dev_name(dev), dev, ssd130x,
> >> + &ssd130xfb_bl_ops, NULL);
> >> + if (IS_ERR(bl)) {
> >
> >> + ret = PTR_ERR(bl);
> >> + dev_err_probe(dev, ret, "Unable to register backlight device\n");
> >> + return ERR_PTR(ret);
> >
> > dev_err_probe(dev, PTR_ERR(bl), "Unable to register backlight device\n");
> > return bl;
> >
> > ?
>
> No, because this function's return value is a struct ssd130x_device pointer,
> not a struct backlight_device pointer.
return ERR_CAST(bl);
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-02-11 15:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 9:19 [PATCH v4 0/6] drm: Add driver for Solomon SSD130x OLED displays Javier Martinez Canillas
2022-02-11 9:19 ` [PATCH v4 3/6] " Javier Martinez Canillas
2022-02-11 11:33 ` Andy Shevchenko
2022-02-11 12:05 ` Javier Martinez Canillas
2022-02-11 12:23 ` Geert Uytterhoeven
2022-02-11 12:27 ` Javier Martinez Canillas
2022-02-11 15:49 ` Andy Shevchenko [this message]
2022-02-11 12:44 ` Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YgaFc++EP3/hv+iA@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert@linux-m68k.org \
--cc=javierm@redhat.com \
--cc=lee.jones@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=maxime@cerno.tech \
--cc=mripard@kernel.org \
--cc=noralf@tronnes.org \
--cc=sam@ravnborg.org \
--cc=thierry.reding@gmail.com \
--cc=tzimmermann@suse.de \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).