From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD38AC433E0 for ; Wed, 1 Jul 2020 16:02:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD724206C3 for ; Wed, 1 Jul 2020 16:02:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aOUZZDDO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD724206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=puri.sm Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=plwkrzhOCS9AEXVIy+7wJWxnkjOGMaLANwWpjopltfc=; b=aOUZZDDO4tcalX+GEUQnyukaL ikuQDhj8jf52hWJnItwtKf37+y/GJiSXI3GatGCzNaNRszhdmvIz3sAIKz+ao6RGjEzOenichXWcj GyJjh0/1xNwE4HtlhUjOE645BjJsnPeX9lhcIGAjYbq/7X7jkn4IaF7qhBESN8GYV7aoDMSm/hyax InKktbbXdVjL+dl5Imaz0YbLzTxp0WU1IWVTkAnSs2QYXxxIumb4oCWp2p6i/p5p8hRHkmLn1uO0A NkM4gFl0k20UW0CMjt4etBbfC8bnptXuOKwZdFS2HKofzqV1KDNiq5d9L2IVAndMFR4+6Qr6NcyNX F2+5ODZoA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqfAe-0007Sh-QC; Wed, 01 Jul 2020 16:01:12 +0000 Received: from honk.sigxcpu.org ([24.134.29.49]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqfAZ-0007Ps-1z for linux-arm-kernel@lists.infradead.org; Wed, 01 Jul 2020 16:01:08 +0000 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id DF87AFB03; Wed, 1 Jul 2020 18:01:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QreS0lBW60hx; Wed, 1 Jul 2020 18:01:03 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 64FD340972; Wed, 1 Jul 2020 18:01:03 +0200 (CEST) Date: Wed, 1 Jul 2020 18:01:03 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Ondrej Jirman Subject: Re: [PATCH v6 05/13] drm/panel: st7703: Rename functions from jh057n prefix to st7703 Message-ID: <20200701160103.GD174356@bogon.m.sigxcpu.org> References: <20200701103126.1512615-1-megous@megous.com> <20200701103126.1512615-6-megous@megous.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200701103126.1512615-6-megous@megous.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200701_120107_325036_57E02078 X-CRM114-Status: GOOD ( 23.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Purism Kernel Team , Samuel Holland , David Airlie , Linus Walleij , Bhushan Shah , Chen-Yu Tsai , Rob Herring , linux-kernel@vger.kernel.org, Martijn Braam , linux-sunxi@googlegroups.com, Thierry Reding , Maxime Ripard , Daniel Vetter , Sam Ravnborg , Luca Weiss , linux-arm-kernel@lists.infradead.org, Icenowy Zheng Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On Wed, Jul 01, 2020 at 12:31:18PM +0200, Ondrej Jirman wrote: > This is done so that code that's not specific to a particular > jh057n panel is named after the controller. Functions specific > to the panel are kept named after the panel. Reviewed-by: Guido G=FCnther = > = > Signed-off-by: Ondrej Jirman > Reviewed-by: Linus Walleij > --- > drivers/gpu/drm/panel/panel-sitronix-st7703.c | 90 ++++++++++--------- > 1 file changed, 46 insertions(+), 44 deletions(-) > = > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/= drm/panel/panel-sitronix-st7703.c > index 38ff742bc120..511af659f273 100644 > --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > @@ -1,6 +1,8 @@ > // SPDX-License-Identifier: GPL-2.0 > /* > - * Rockteck jh057n00900 5.5" MIPI-DSI panel driver > + * Driver for panels based on Sitronix ST7703 controller, souch as: > + * > + * - Rocktech jh057n00900 5.5" MIPI-DSI panel > * > * Copyright (C) Purism SPC 2019 > */ > @@ -21,7 +23,7 @@ > #include > #include > = > -#define DRV_NAME "panel-rocktech-jh057n00900" > +#define DRV_NAME "panel-sitronix-st7703" > = > /* Manufacturer specific Commands send via DSI */ > #define ST7703_CMD_ALL_PIXEL_OFF 0x22 > @@ -45,7 +47,7 @@ > #define ST7703_CMD_SETGIP1 0xE9 > #define ST7703_CMD_SETGIP2 0xEA > = > -struct jh057n { > +struct st7703 { > struct device *dev; > struct drm_panel panel; > struct gpio_desc *reset_gpio; > @@ -56,9 +58,9 @@ struct jh057n { > struct dentry *debugfs; > }; > = > -static inline struct jh057n *panel_to_jh057n(struct drm_panel *panel) > +static inline struct st7703 *panel_to_st7703(struct drm_panel *panel) > { > - return container_of(panel, struct jh057n, panel); > + return container_of(panel, struct st7703, panel); > } > = > #define dsi_generic_write_seq(dsi, seq...) do { \ > @@ -69,7 +71,7 @@ static inline struct jh057n *panel_to_jh057n(struct drm= _panel *panel) > return ret; \ > } while (0) > = > -static int jh057n_init_sequence(struct jh057n *ctx) > +static int jh057n_init_sequence(struct st7703 *ctx) > { > struct mipi_dsi_device *dsi =3D to_mipi_dsi_device(ctx->dev); > struct device *dev =3D ctx->dev; > @@ -141,9 +143,9 @@ static int jh057n_init_sequence(struct jh057n *ctx) > return 0; > } > = > -static int jh057n_enable(struct drm_panel *panel) > +static int st7703_enable(struct drm_panel *panel) > { > - struct jh057n *ctx =3D panel_to_jh057n(panel); > + struct st7703 *ctx =3D panel_to_st7703(panel); > int ret; > = > ret =3D jh057n_init_sequence(ctx); > @@ -156,17 +158,17 @@ static int jh057n_enable(struct drm_panel *panel) > return 0; > } > = > -static int jh057n_disable(struct drm_panel *panel) > +static int st7703_disable(struct drm_panel *panel) > { > - struct jh057n *ctx =3D panel_to_jh057n(panel); > + struct st7703 *ctx =3D panel_to_st7703(panel); > struct mipi_dsi_device *dsi =3D to_mipi_dsi_device(ctx->dev); > = > return mipi_dsi_dcs_set_display_off(dsi); > } > = > -static int jh057n_unprepare(struct drm_panel *panel) > +static int st7703_unprepare(struct drm_panel *panel) > { > - struct jh057n *ctx =3D panel_to_jh057n(panel); > + struct st7703 *ctx =3D panel_to_st7703(panel); > = > if (!ctx->prepared) > return 0; > @@ -178,9 +180,9 @@ static int jh057n_unprepare(struct drm_panel *panel) > return 0; > } > = > -static int jh057n_prepare(struct drm_panel *panel) > +static int st7703_prepare(struct drm_panel *panel) > { > - struct jh057n *ctx =3D panel_to_jh057n(panel); > + struct st7703 *ctx =3D panel_to_st7703(panel); > int ret; > = > if (ctx->prepared) > @@ -230,10 +232,10 @@ static const struct drm_display_mode default_mode = =3D { > .height_mm =3D 130, > }; > = > -static int jh057n_get_modes(struct drm_panel *panel, > +static int st7703_get_modes(struct drm_panel *panel, > struct drm_connector *connector) > { > - struct jh057n *ctx =3D panel_to_jh057n(panel); > + struct st7703 *ctx =3D panel_to_st7703(panel); > struct drm_display_mode *mode; > = > mode =3D drm_mode_duplicate(connector->dev, &default_mode); > @@ -254,17 +256,17 @@ static int jh057n_get_modes(struct drm_panel *panel, > return 1; > } > = > -static const struct drm_panel_funcs jh057n_drm_funcs =3D { > - .disable =3D jh057n_disable, > - .unprepare =3D jh057n_unprepare, > - .prepare =3D jh057n_prepare, > - .enable =3D jh057n_enable, > - .get_modes =3D jh057n_get_modes, > +static const struct drm_panel_funcs st7703_drm_funcs =3D { > + .disable =3D st7703_disable, > + .unprepare =3D st7703_unprepare, > + .prepare =3D st7703_prepare, > + .enable =3D st7703_enable, > + .get_modes =3D st7703_get_modes, > }; > = > static int allpixelson_set(void *data, u64 val) > { > - struct jh057n *ctx =3D data; > + struct st7703 *ctx =3D data; > struct mipi_dsi_device *dsi =3D to_mipi_dsi_device(ctx->dev); > = > DRM_DEV_DEBUG_DRIVER(ctx->dev, "Setting all pixels on\n"); > @@ -282,7 +284,7 @@ static int allpixelson_set(void *data, u64 val) > DEFINE_SIMPLE_ATTRIBUTE(allpixelson_fops, NULL, > allpixelson_set, "%llu\n"); > = > -static void jh057n_debugfs_init(struct jh057n *ctx) > +static void st7703_debugfs_init(struct st7703 *ctx) > { > ctx->debugfs =3D debugfs_create_dir(DRV_NAME, NULL); > = > @@ -290,16 +292,16 @@ static void jh057n_debugfs_init(struct jh057n *ctx) > &allpixelson_fops); > } > = > -static void jh057n_debugfs_remove(struct jh057n *ctx) > +static void st7703_debugfs_remove(struct st7703 *ctx) > { > debugfs_remove_recursive(ctx->debugfs); > ctx->debugfs =3D NULL; > } > = > -static int jh057n_probe(struct mipi_dsi_device *dsi) > +static int st7703_probe(struct mipi_dsi_device *dsi) > { > struct device *dev =3D &dsi->dev; > - struct jh057n *ctx; > + struct st7703 *ctx; > int ret; > = > ctx =3D devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); > @@ -340,7 +342,7 @@ static int jh057n_probe(struct mipi_dsi_device *dsi) > return ret; > } > = > - drm_panel_init(&ctx->panel, dev, &jh057n_drm_funcs, > + drm_panel_init(&ctx->panel, dev, &st7703_drm_funcs, > DRM_MODE_CONNECTOR_DSI); > = > ret =3D drm_panel_of_backlight(&ctx->panel); > @@ -363,13 +365,13 @@ static int jh057n_probe(struct mipi_dsi_device *dsi) > default_mode.vrefresh, > mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes); > = > - jh057n_debugfs_init(ctx); > + st7703_debugfs_init(ctx); > return 0; > } > = > -static void jh057n_shutdown(struct mipi_dsi_device *dsi) > +static void st7703_shutdown(struct mipi_dsi_device *dsi) > { > - struct jh057n *ctx =3D mipi_dsi_get_drvdata(dsi); > + struct st7703 *ctx =3D mipi_dsi_get_drvdata(dsi); > int ret; > = > ret =3D drm_panel_unprepare(&ctx->panel); > @@ -383,12 +385,12 @@ static void jh057n_shutdown(struct mipi_dsi_device = *dsi) > ret); > } > = > -static int jh057n_remove(struct mipi_dsi_device *dsi) > +static int st7703_remove(struct mipi_dsi_device *dsi) > { > - struct jh057n *ctx =3D mipi_dsi_get_drvdata(dsi); > + struct st7703 *ctx =3D mipi_dsi_get_drvdata(dsi); > int ret; > = > - jh057n_shutdown(dsi); > + st7703_shutdown(dsi); > = > ret =3D mipi_dsi_detach(dsi); > if (ret < 0) > @@ -397,28 +399,28 @@ static int jh057n_remove(struct mipi_dsi_device *ds= i) > = > drm_panel_remove(&ctx->panel); > = > - jh057n_debugfs_remove(ctx); > + st7703_debugfs_remove(ctx); > = > return 0; > } > = > -static const struct of_device_id jh057n_of_match[] =3D { > +static const struct of_device_id st7703_of_match[] =3D { > { .compatible =3D "rocktech,jh057n00900" }, > { /* sentinel */ } > }; > -MODULE_DEVICE_TABLE(of, jh057n_of_match); > +MODULE_DEVICE_TABLE(of, st7703_of_match); > = > -static struct mipi_dsi_driver jh057n_driver =3D { > - .probe =3D jh057n_probe, > - .remove =3D jh057n_remove, > - .shutdown =3D jh057n_shutdown, > +static struct mipi_dsi_driver st7703_driver =3D { > + .probe =3D st7703_probe, > + .remove =3D st7703_remove, > + .shutdown =3D st7703_shutdown, > .driver =3D { > .name =3D DRV_NAME, > - .of_match_table =3D jh057n_of_match, > + .of_match_table =3D st7703_of_match, > }, > }; > -module_mipi_dsi_driver(jh057n_driver); > +module_mipi_dsi_driver(st7703_driver); > = > MODULE_AUTHOR("Guido G=FCnther "); > -MODULE_DESCRIPTION("DRM driver for Rocktech JH057N00900 MIPI DSI panel"); > +MODULE_DESCRIPTION("DRM driver for Sitronix ST7703 based MIPI DSI panels= "); > MODULE_LICENSE("GPL v2"); > -- = > 2.27.0 > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel