From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrzej Hajda Subject: Re: [PATCH 08/15] drm/dsi: Implement DCS nop command Date: Tue, 21 Oct 2014 11:53:54 +0200 Message-ID: <54462D32.1090101@samsung.com> References: <1413195395-3355-1-git-send-email-thierry.reding@gmail.com> <1413195395-3355-8-git-send-email-thierry.reding@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E68D6E199 for ; Tue, 21 Oct 2014 02:53:59 -0700 (PDT) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NDS006USGYQ9H90@mailout1.w1.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 21 Oct 2014 10:56:50 +0100 (BST) In-reply-to: <1413195395-3355-8-git-send-email-thierry.reding@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Thierry Reding , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On 10/13/2014 12:16 PM, Thierry Reding wrote: > From: Thierry Reding > > Provide a small convenience wrapper that transmits a DCS nop command. > > Signed-off-by: Thierry Reding For this and patches 09, 11, 12 the same comments apply as for 06/15. Beside this they look OK to me. Regards Andrzej > --- > drivers/gpu/drm/drm_mipi_dsi.c | 18 ++++++++++++++++++ > include/drm/drm_mipi_dsi.h | 1 + > 2 files changed, 19 insertions(+) > > diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c > index 6749b88a6c72..c88dcda2f4ac 100644 > --- a/drivers/gpu/drm/drm_mipi_dsi.c > +++ b/drivers/gpu/drm/drm_mipi_dsi.c > @@ -517,6 +517,24 @@ ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, u8 cmd, void *data, > EXPORT_SYMBOL(mipi_dsi_dcs_read); > > /** > + * mipi_dsi_dcs_nop() - send DCS nop packet > + * @dsi: DSI peripheral device > + * > + * Return: 0 on success or a negative error code on failure. > + */ > +int mipi_dsi_dcs_nop(struct mipi_dsi_device *dsi) > +{ > + ssize_t err; > + > + err = mipi_dsi_dcs_write(dsi, MIPI_DCS_NOP, NULL, 0); > + if (err < 0) > + return err; > + > + return 0; > +} > +EXPORT_SYMBOL(mipi_dsi_dcs_nop); > + > +/** > * mipi_dsi_dcs_enter_sleep_mode() - disable all unnecessary blocks inside the > * display module except interface communication > * @dsi: DSI peripheral device > diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h > index 8693711eb623..be16c8e769bd 100644 > --- a/include/drm/drm_mipi_dsi.h > +++ b/include/drm/drm_mipi_dsi.h > @@ -170,6 +170,7 @@ ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, u8 cmd, > const void *data, size_t len); > ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, u8 cmd, void *data, > size_t len); > +int mipi_dsi_dcs_nop(struct mipi_dsi_device *dsi); > int mipi_dsi_dcs_enter_sleep_mode(struct mipi_dsi_device *dsi); > int mipi_dsi_dcs_exit_sleep_mode(struct mipi_dsi_device *dsi); > int mipi_dsi_dcs_set_display_off(struct mipi_dsi_device *dsi);