From patchwork Fri Oct 13 19:42:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 10005787 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 8ECA6602B3 for ; Fri, 13 Oct 2017 19:43:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 825F429137 for ; Fri, 13 Oct 2017 19:43:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 772662914B; Fri, 13 Oct 2017 19:43:34 +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 0504629137 for ; Fri, 13 Oct 2017 19:43:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753309AbdJMTnc (ORCPT ); Fri, 13 Oct 2017 15:43:32 -0400 Received: from smtp07.smtpout.orange.fr ([80.12.242.129]:48167 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751906AbdJMTnb (ORCPT ); Fri, 13 Oct 2017 15:43:31 -0400 Received: from belgarion.home ([90.55.206.157]) by mwinf5d65 with ME id M7jH1w00G3QH74y037jVVK; Fri, 13 Oct 2017 21:43:30 +0200 X-ME-Helo: belgarion.home X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Fri, 13 Oct 2017 21:43:30 +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 v2 2/3] backlight: tdo24m: add the reset line gpio Date: Fri, 13 Oct 2017 21:42:48 +0200 Message-Id: <20171013194250.9001-2-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171013194250.9001-1-robert.jarzmik@free.fr> References: <20171013194250.9001-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;