From patchwork Tue Nov 10 23:46:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11895849 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=-12.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 862D3C388F7 for ; Tue, 10 Nov 2020 23:47:10 +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 28CC3207E8 for ; Tue, 10 Nov 2020 23:47:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YC3lkdEJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28CC3207E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.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 30F1089D64; Tue, 10 Nov 2020 23:47:09 +0000 (UTC) Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id C626389D63 for ; Tue, 10 Nov 2020 23:47:06 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id b17so4197283ljf.12 for ; Tue, 10 Nov 2020 15:47:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GSgt/pPBiOJZ6llJdG2JMoW9+H1DFAY+cbBM7SnOX6s=; b=YC3lkdEJ3jzc+Wi6dNJdRwwt0CgK2Ay+vzqMAyNvVymYQu5s5jL/Xf2/5+16rxfAF8 7OHX3EAwWqMgrU6MGDtPx/z3icV8zckmYbUivHsWGu4LsOKHnR5dCqJYAiVVpX5lpa4j pY9tjHJoTs2KtmeGJzhpuMG3BdREhQ0nnMUct7GT+Mx0TQEF69OHpD++QQePuXgrxGsM edb6Ng8x/WK13sgBapkwT4uElVBJ+D1ci1nZwVSTfZ10tMiu+VjGgMbvdngYqKVWeVZp TYmIofOZI6LndFHOkGBgo2hl+TanJnDtchqILKrWYq3s8Fox/8cxc1Av3jUxjzOQyEvu 55IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GSgt/pPBiOJZ6llJdG2JMoW9+H1DFAY+cbBM7SnOX6s=; b=jFsixtZmLg58XP+rrHexf2FANAtAuGCGHbv49eYYVG7ZwY6upGJAMoi57tJYcd062t /pKf7wPyFNDpgApcyKegu3rIk4B8nFgJt/sJS8jVew0DWQdrdb3fIwRSG9PgdtwtYIJ3 UusDuAZ8HK89IO1ZN10C1lAzCI9a1q6riFa8+ULCrQ8XZV1S9PM2hwq9QUrkjmwY+efR ApnNHmV3XrTTgyN2Ent0YoVmWqkRawqzDxeP/T5/+tpJ5MV9+007ovnHg47Yqo7jPX7M 6XWeA1WIm1F4OHsqUygDLePrfR0oBNGUAA0+NqX6YQIm00EGj45P7uRouGM4dssKnFw+ ussQ== X-Gm-Message-State: AOAM531QlyEHAvEbXmQUfNHiMb8BuuTP2Ms9+CGeJ2mzsS29jvCaS9Nt 0LRGLy6tl4YCS+PRVfUpfEI9G6Se+qPGtpKX X-Google-Smtp-Source: ABdhPJxsgdAc7zos0+Bo9IFM/D2bfc33il0pXf61SW91nFotffpQKHyw3bhTsjmetpaRJIEQS0IdrA== X-Received: by 2002:a2e:9798:: with SMTP id y24mr8619126lji.341.1605052025204; Tue, 10 Nov 2020 15:47:05 -0800 (PST) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id y65sm39883lff.73.2020.11.10.15.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 15:47:04 -0800 (PST) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , Stephan Gerhold , =?utf-8?q?Pawe=C5=82_Chmiel?= Subject: [PATCH 4/5] drm/panel: s6e63m0: Support 3WIRE protocol Date: Wed, 11 Nov 2020 00:46:52 +0100 Message-Id: <20201110234653.2248594-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201110234653.2248594-1-linus.walleij@linaro.org> References: <20201110234653.2248594-1-linus.walleij@linaro.org> MIME-Version: 1.0 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: dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The panel can be connected using 3WIRE, then it is however necessary that the flag SPI_3WIRE is preserved on the device, as we set this from generic device tree parsing code (or similar). Just |= the SPI mode. Cc: Stephan Gerhold Cc: Paweł Chmiel Signed-off-by: Linus Walleij --- drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c index e47647f418ff..b1adf8f89c62 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c @@ -72,7 +72,8 @@ static int s6e63m0_spi_probe(struct spi_device *spi) int ret; spi->bits_per_word = 9; - spi->mode = SPI_MODE_3; + /* Preserve e.g. SPI_3WIRE setting */ + spi->mode |= SPI_MODE_3; ret = spi_setup(spi); if (ret < 0) { dev_err(dev, "spi setup failed.\n");