Received: by 10.213.65.68 with SMTP id h4csp1859855imn; Mon, 19 Mar 2018 15:29:39 -0700 (PDT) X-Google-Smtp-Source: AG47ELuSpAwctIoV1Ko1z4Pzktjq3CzRcwKPcR5lSscuJkHFN/I9Jdxma78Mky7NCt/0A8Pv4uxx X-Received: by 10.98.105.2 with SMTP id e2mr7504046pfc.1.1521498579591; Mon, 19 Mar 2018 15:29:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521498579; cv=none; d=google.com; s=arc-20160816; b=oOjWy8zySl4os4NheGVjRIv4nWc/vsAlbOZI1Kg7wr0rIwewLIGP369uSkB3jRmJjC I5xC+ofKJH8KNbLG/0vcFtAtfibYsHy7N7e4xSstyEczCKnfxABI/cfp27Zxc4a6HAoe hlOrZvSG6Hz7v0zo2RiWPUfZ7dcx899th95t8ge6mKqS3sKxhe4A4z9F4G1be7WIJ9ta +Sjv6Eisx0OC3WFOfcNlLwDVVk+g4KIVfEHw5JsdR4fGfGag8guJ4ZbG9jBn+9hwaGCW q/QvJpc+SyHpxcxNAJYJ4fmxHBb27gdsyQ9UQVipaZgHlvjCmJJgw47rt99rMOfF87/7 +tsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=bG6H82ZUSe0kTt5cSICnzEnlRLMzksatSOQFNkgJGlU=; b=P/nhqyG7A6txe4lS2HhXuHzuKS1tCwX/bsorGENsbIxCEjvrChLS+qLFR6fwK0P2AI /+hU2wX4nFiLrKn+iYp+BuDx0zZONLTYfMFida4OH1diD5nShpstM5+Jk8e9904oP3TY gR8fWVohUFqIfA1wcz2A3VTBlsfti7eu6F8qpPHL5VFwunVEQBzA/XR38CtHmf9dKCty rDMp45pN5QiMgK/XULsrPYo+sOLJoGMP2ZdHKuCFBMwl7SDSDGY/agEhZhuuJT+2tCJr TuaHmz4kQ37KWu/WeWLhN+sFrXxlo1DGQrfCBEdm4zLPUi28R3OOuKMnWwhiu31RkOvJ fK6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Iheu8hA+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r63-v6si216432plb.356.2018.03.19.15.29.24; Mon, 19 Mar 2018 15:29:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Iheu8hA+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032600AbeCSW2A (ORCPT + 99 others); Mon, 19 Mar 2018 18:28:00 -0400 Received: from mail-by2nam01on0123.outbound.protection.outlook.com ([104.47.34.123]:15712 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933826AbeCSPsu (ORCPT ); Mon, 19 Mar 2018 11:48:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bG6H82ZUSe0kTt5cSICnzEnlRLMzksatSOQFNkgJGlU=; b=Iheu8hA+17vSyjtHWz8M9nYHyb14wVrepNncf2iRl/PjLEnVHxGDiyQdY+p1M9oIKR5IwzKCCDBiNECFDs2PtBmivg5+kN4hULsiaW0hi3mEwjh9o95ay2gwL0Yp6IeDueYPxmf7sOu0ZNcX57LJgq9h3yELv/ySMAMxyWflOOI= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1031.namprd21.prod.outlook.com (52.132.128.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 15:48:18 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 15:48:18 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Robert Jarzmik , Lee Jones , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 059/124] backlight: tdo24m: Fix the SPI CS between transfers Thread-Topic: [PATCH AUTOSEL for 4.15 059/124] backlight: tdo24m: Fix the SPI CS between transfers Thread-Index: AQHTv5mq2fIwjklnbEKM6TTgp+JMfQ== Date: Mon, 19 Mar 2018 15:48:03 +0000 Message-ID: <20180319154645.11350-59-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1031;7:kVmiMRpbzlT3IvzSvK3ZjXAboEeb3ehZ5ZLBAAkgE4u6fspFDPXR8NDiGBC2PpKU66Xi7Qu8KuieiDSImgI97ikiGb6SAq25MuZiEN2aU1nht9GpXj7U/4N/hFhqDlDWkiDpoBXP43dDwT2n71oDkfdBAzy5i0vTNoSzdWrLVTdX7Ec3jj7I6LiVHyRLiNa4vNz8LM/MqPVOFxFXjqhxbwWhScU0OqkGkoqw+ybuGAs5FJKYYVN+r+sMuKB7PPWa;20:25myHgv2PcnRmuURt0DjlGDq33IrpQL/PLyJ0AjrAN0fQJQHBWOO9vw8v5zOF9mztS/T8NrG1FNzfYZAC29aHzFFSJ1iPc7ictSgS9vynizOFtx69u3Q7YSf/onRMg694hKk++kOu+brYSx1ks3ltSeHzs2w6k8tUp7mV748IfE= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 51635b78-a54a-4f48-16f5-08d58db0d599 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1031; x-ms-traffictypediagnostic: DM5PR2101MB1031: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(191636701735510)(89211679590171)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231221)(944501300)(52105095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB1031;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1031; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(396003)(39860400002)(39380400002)(376002)(189003)(199004)(6436002)(6512007)(6666003)(3280700002)(2950100002)(7736002)(6116002)(3846002)(10090500001)(105586002)(4326008)(5660300001)(305945005)(1076002)(81156014)(2906002)(6486002)(81166006)(8676002)(8936002)(2900100001)(106356001)(36756003)(68736007)(54906003)(3660700001)(22452003)(97736004)(6506007)(25786009)(99286004)(10290500003)(76176011)(66066001)(14454004)(72206003)(478600001)(102836004)(26005)(186003)(316002)(2501003)(110136005)(5250100002)(575784001)(86362001)(53936002)(107886003)(86612001)(22906009)(15866825006)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1031;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: xfEsllvDL8ENtTGdUv0SDgxEpvnGIfHlm1WN2CjbGaZCV5zvGHIGjelRpr4M9kulneEsEF0bY7dRAEKMcvqeD2IbaeJdeD39bPbFLcYuff5fKtZiplwKHofKM55SzE7WsSuCgRi5b7yrp2sOmA/juhFBCMibfb/37J3/NmCTKFiduwErmyVP/LWVLXRp23cOsha+uroIEBk5+bzp9P9mnPMIREJ1Q9LpCD45YhD82DxiJKsinAA5iAqXpB+KeuorjFvzwWlcr3SfivLYrSd1e5DsI0auVJVXlL0j6gURofM+9X8E9fEEfV5f/YjlzGpjuWZJEjQYTHNi7RGIYEwGxA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51635b78-a54a-4f48-16f5-08d58db0d599 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:48:03.0439 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1031 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robert Jarzmik [ Upstream commit 2023b0524a6310e9ea80daf085f51c71bff9289f ] Currently the LCD display (TD035S) on the cm-x300 platform is broken and remains blank. The TD0245S specification requires that the chipselect is toggled between commands sent to the panel. This was also the purpose of the former patch of commit f64dcac0b124 ("backlight: tdo24m: ensure chip select changes between transfers"). Unfortunately, the "cs_change" field of a SPI transfer is misleading. Its true meaning is that for a SPI message holding multiple transfers, the chip select is toggled between each transfer, but for the last transfer it remains asserted. In this driver, all the SPI messages contain exactly one transfer, which means that each transfer is the last of its message, and as a consequence the chip select is never toggled. Actually, there was a second bug hidding the first one, hence the problem was not seen until v4.6. This problem was fixed by commit a52db659c79c ("spi: pxa2xx: Fix cs_change management") for PXA based boards. This fix makes the TD035S work again on a cm-x300 board. The same applies to other PXA boards, ie. corgi and tosa. Fixes: a52db659c79c ("spi: pxa2xx: Fix cs_change management") Reported-by: Andrea Adami Signed-off-by: Robert Jarzmik Acked-by: Daniel Thompson Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/video/backlight/corgi_lcd.c | 2 +- drivers/video/backlight/tdo24m.c | 2 +- drivers/video/backlight/tosa_lcd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/= corgi_lcd.c index d7c239ea3d09..f5574060f9c8 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c @@ -177,7 +177,7 @@ static int corgi_ssp_lcdtg_send(struct corgi_lcd *lcd, = int adrs, uint8_t data) struct spi_message msg; struct spi_transfer xfer =3D { .len =3D 1, - .cs_change =3D 1, + .cs_change =3D 0, .tx_buf =3D lcd->buf, }; =20 diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo= 24m.c index eab1f842f9c0..e4bd63e9db6b 100644 --- a/drivers/video/backlight/tdo24m.c +++ b/drivers/video/backlight/tdo24m.c @@ -369,7 +369,7 @@ static int tdo24m_probe(struct spi_device *spi) =20 spi_message_init(m); =20 - x->cs_change =3D 1; + x->cs_change =3D 0; x->tx_buf =3D &lcd->buf[0]; spi_message_add_tail(x, m); =20 diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/t= osa_lcd.c index 6a41ea92737a..4dc5ee8debeb 100644 --- a/drivers/video/backlight/tosa_lcd.c +++ b/drivers/video/backlight/tosa_lcd.c @@ -49,7 +49,7 @@ static int tosa_tg_send(struct spi_device *spi, int adrs,= uint8_t data) struct spi_message msg; struct spi_transfer xfer =3D { .len =3D 1, - .cs_change =3D 1, + .cs_change =3D 0, .tx_buf =3D buf, }; =20 --=20 2.14.1