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=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 0A23FC54FCF for ; Mon, 23 Mar 2020 08:45:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 DAE4120736 for ; Mon, 23 Mar 2020 08:45:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAE4120736 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F0C2489E3F; Mon, 23 Mar 2020 08:45:10 +0000 (UTC) Received: from alexa-out-blr-02.qualcomm.com (alexa-out-blr-02.qualcomm.com [103.229.18.198]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8E18B89F08; Mon, 23 Mar 2020 05:03:36 +0000 (UTC) Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by alexa-out-blr-02.qualcomm.com with ESMTP/TLS/AES256-SHA; 23 Mar 2020 10:33:32 +0530 Received: from harigovi-linux.qualcomm.com ([10.204.66.157]) by ironmsg01-blr.qualcomm.com with ESMTP; 23 Mar 2020 10:33:20 +0530 Received: by harigovi-linux.qualcomm.com (Postfix, from userid 2332695) id 4EBB42AD4; Mon, 23 Mar 2020 10:33:19 +0530 (IST) From: Harigovindan P To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v7 2/2] drm/panel: add support for rm69299 visionox panel driver Date: Mon, 23 Mar 2020 10:33:16 +0530 Message-Id: <20200316041647.27953-3-harigovi@codeaurora.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200316041647.27953-1-harigovi@codeaurora.org> References: <20200316041647.27953-1-harigovi@codeaurora.org> MIME-Version: 1.0 X-Patchwork-Submitter: Harigovindan P X-Patchwork-Id: 11439689 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 136E320722 for ; Mon, 16 Mar 2020 04:16:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728964AbgCPEQz (ORCPT ); Mon, 16 Mar 2020 00:16:55 -0400 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]:23551 "EHLO alexa-out-blr-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbgCPEQz (ORCPT ); Mon, 16 Mar 2020 00:16:55 -0400 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 16 Mar 2020 09:46:51 +0530 Received: from harigovi-linux.qualcomm.com ([10.204.66.157]) by ironmsg02-blr.qualcomm.com with ESMTP; 16 Mar 2020 09:46:50 +0530 Received: by harigovi-linux.qualcomm.com (Postfix, from userid 2332695) id EEE0C284A; Mon, 16 Mar 2020 09:46:49 +0530 (IST) X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org X-Mailman-Approved-At: Mon, 23 Mar 2020 08:45:09 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sean@poorly.run, Matthias Kaehlcke , seanpaul@chromium.org, Harigovindan P Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Message-ID: <20200323050316.jKuiYixeOe5hbLlWqsnGZAkHJytk97uFLKXDXz0XM44@z> Add support for Visionox panel driver. Signed-off-by: Harigovindan P Reviewed-by: Matthias Kaehlcke --- Changes in v2: - Dropping redundant space in Kconfig(Sam Ravnborg). - Changing structure for include files(Sam Ravnborg). - Removing backlight related code and functions(Sam Ravnborg). - Removing repeated printing of error message(Sam Ravnborg). - Adding drm_connector as an argument for get_modes function. Changes in v3: - Adding arguments for drm_panel_init to support against mainline. Changes in v4: - Removing error messages from regulator_set_load. - Removing dev struct entry. - Removing checks. - Dropping empty comment lines. Changes in v5: - Removing unused struct member variables. - Removing blank lines. - Fixed indentation. - Invoking dsi_detach and panel_remove while early exiting from probe. Changes in v6: - Changed "35597" to "rm69299" for power_on function. - Removing rm69299_config since it supports single type of panel for now. - Fixed alignment. - Using goto statements when regulator_set_load fails. Changes in v7: - Added new goto statement when regulator_set_load fails. drivers/gpu/drm/panel/Kconfig | 8 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-visionox-rm69299.c | 295 ++++++++++++++++++ 3 files changed, 304 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-visionox-rm69299.c +MODULE_LICENSE("GPL v2"); diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index ae44ac2ec106..7b696f304a99 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -389,6 +389,14 @@ config DRM_PANEL_TRULY_NT35597_WQXGA Say Y here if you want to enable support for Truly NT35597 WQXGA Dual DSI Video Mode panel +config DRM_PANEL_VISIONOX_RM69299 + tristate "Visionox RM69299" + depends on OF + depends on DRM_MIPI_DSI + help + Say Y here if you want to enable support for Visionox + RM69299 DSI Video Mode panel. + config DRM_PANEL_XINPENG_XPP055C272 tristate "Xinpeng XPP055C272 panel driver" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 7c4d3c581fd4..9f11d067a6b2 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -41,4 +41,5 @@ obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o +obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c new file mode 100644 index 000000000000..0f877d21fdf2 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c @@ -0,0 +1,295 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2019, The Linux Foundation. All rights reserved. + */ + +#include +#include +#include +#include +#include + +#include