From patchwork Fri Oct 6 19:58:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 9990313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3083960247 for ; Fri, 6 Oct 2017 19:59:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22FD21FF81 for ; Fri, 6 Oct 2017 19:59:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17D0028A24; Fri, 6 Oct 2017 19:59:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7DC01FF81 for ; Fri, 6 Oct 2017 19:59:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752528AbdJFT7G (ORCPT ); Fri, 6 Oct 2017 15:59:06 -0400 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:54378 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752404AbdJFT7F (ORCPT ); Fri, 6 Oct 2017 15:59:05 -0400 Received: from belgarion.home ([90.55.206.157]) by mwinf5d57 with ME id JKya1w0013QH74y03Kz30s; Fri, 06 Oct 2017 21:59:04 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Fri, 06 Oct 2017 21:59:04 +0200 X-ME-IP: 90.55.206.157 From: Robert Jarzmik To: Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Jarzmik Subject: [PATCH 2/3] backlight: tdo24m: add the reset line gpio Date: Fri, 6 Oct 2017 21:58:24 +0200 Message-Id: <20171006195826.27500-2-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171006195826.27500-1-robert.jarzmik@free.fr> References: <20171006195826.27500-1-robert.jarzmik@free.fr> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Toppoly panels have a global reset line. Add an optional gpio control for this line, for platforms which have the ability to drive it. Signed-off-by: Robert Jarzmik --- drivers/video/backlight/tdo24m.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c index e4bd63e9db6b..e4b2dfabf192 100644 --- a/drivers/video/backlight/tdo24m.c +++ b/drivers/video/backlight/tdo24m.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -32,6 +33,7 @@ struct tdo24m { struct spi_message msg; struct spi_transfer xfer; uint8_t *buf; + struct gpio_desc *xres; int (*adj_mode)(struct tdo24m *lcd, int mode); int color_invert; @@ -364,6 +366,7 @@ static int tdo24m_probe(struct spi_device *spi) if (lcd->buf == NULL) return -ENOMEM; + lcd->xres = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_LOW); m = &lcd->msg; x = &lcd->xfer;