From patchwork Sun Jul 19 17:04:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 11673049 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 31395618 for ; Mon, 20 Jul 2020 07:31:39 +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 103502073A for ; Mon, 20 Jul 2020 07:31:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mymailcheap.com header.i=@mymailcheap.com header.b="eiG6FIV1"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=aosc.io header.i=@aosc.io header.b="P8jCNWOJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 103502073A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aosc.io 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 91D4F6E24E; Mon, 20 Jul 2020 07:30:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 503 seconds by postgrey-1.36 at gabe; Sun, 19 Jul 2020 17:14:16 UTC Received: from relay5.mymailcheap.com (relay5.mymailcheap.com [159.100.248.207]) by gabe.freedesktop.org (Postfix) with ESMTPS id 953BF6E14F for ; Sun, 19 Jul 2020 17:14:16 +0000 (UTC) Received: from relay3.mymailcheap.com (relay3.mymailcheap.com [217.182.66.161]) by relay5.mymailcheap.com (Postfix) with ESMTPS id DF38B261D4 for ; Sun, 19 Jul 2020 17:05:51 +0000 (UTC) Received: from filter1.mymailcheap.com (filter1.mymailcheap.com [149.56.130.247]) by relay3.mymailcheap.com (Postfix) with ESMTPS id 3E3EF3ECDF; Sun, 19 Jul 2020 19:05:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by filter1.mymailcheap.com (Postfix) with ESMTP id 6C07D2A3B7; Sun, 19 Jul 2020 13:05:48 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1595178348; bh=ELid77VVNx1YqQOuhBe9RsMJyM8XGB3o70MJQYb+aSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eiG6FIV1vosAbrlmJwsm/wKN0XpWi3TSovx82MTQ4k/EfDix9FaxUK3eFKXyGqmei yh+0qWrr8pTshIrTeETpmqrXAfAFW2R61uw8Rxw27uDTinnWGOGkmKPI+AnFPvko2g AVaT2Z7YlKtZCNugYyU3wxIGL7qMShLYNtS4N+fQ= X-Virus-Scanned: Debian amavisd-new at filter1.mymailcheap.com Received: from filter1.mymailcheap.com ([127.0.0.1]) by localhost (filter1.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nThCY5Q6kNSb; Sun, 19 Jul 2020 13:05:47 -0400 (EDT) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter1.mymailcheap.com (Postfix) with ESMTPS; Sun, 19 Jul 2020 13:05:47 -0400 (EDT) Received: from [148.251.23.173] (ml.mymailcheap.com [148.251.23.173]) by mail20.mymailcheap.com (Postfix) with ESMTP id 405A540B41; Sun, 19 Jul 2020 17:05:46 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=aosc.io header.i=@aosc.io header.b="P8jCNWOJ"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from ice-e5v2.lan (unknown [59.41.163.116]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id 74C9440856; Sun, 19 Jul 2020 17:04:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aosc.io; s=default; t=1595178276; bh=ELid77VVNx1YqQOuhBe9RsMJyM8XGB3o70MJQYb+aSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P8jCNWOJReR+5ws3sHnR5DPKdnVjun1ZNOfRVIoUjIRq4asnZDvDvMS0pgQ1Mh46h 4JqkGsxyUxGZ7UrHgB3QvQabO/61SqqJVIv/g/7hWN846TWF2qfpzOjtuB5sHHuDR1 AFZ8lcQMXf75aablWf8Si0LzjnX52wUxYwfIViZs= From: Icenowy Zheng To: Thierry Reding , Sam Ravnborg , Maxime Ripard Subject: [PATCH 1/4] drm/panel: ilitek-ili9881c: prepare for adding support for extra panels Date: Mon, 20 Jul 2020 01:04:07 +0800 Message-Id: <20200719170411.275812-2-icenowy@aosc.io> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200719170411.275812-1-icenowy@aosc.io> References: <20200719170411.275812-1-icenowy@aosc.io> MIME-Version: 1.0 X-Rspamd-Queue-Id: 405A540B41 X-Spamd-Result: default: False [6.40 / 20.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; ML_SERVERS(-3.10)[148.251.23.173]; DKIM_TRACE(0.00)[aosc.io:+]; RCPT_COUNT_SEVEN(0.00)[8]; FREEMAIL_TO(0.00)[gmail.com,ravnborg.org,kernel.org]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:148.251.0.0/16, country:DE]; RECEIVED_SPAMHAUS_PBL(0.00)[59.41.163.116:received]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[aosc.io:s=default]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[aosc.io]; MID_CONTAINS_FROM(1.00)[]; HFILTER_HELO_BAREIP(3.00)[148.251.23.173,1]; RCVD_COUNT_TWO(0.00)[2]; SUSPICIOUS_RECIPS(1.50)[] X-Rspamd-Server: mail20.mymailcheap.com X-Mailman-Approved-At: Mon, 20 Jul 2020 07:30:37 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Icenowy Zheng Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" There're more panels with ILI9881C controller than the Bananapi one supported by this driver. Extract the mode and init sequence part, to prepare the driver for adding new panels. Signed-off-by: Icenowy Zheng --- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 56 ++++++++++++------- 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c index 3ed8635a6fbdf..4f8e6865029f1 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -20,14 +21,6 @@ #include