From patchwork Sun Nov 25 11:24:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishad Kamdar X-Patchwork-Id: 10697763 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E62615A7 for ; Mon, 26 Nov 2018 08:34:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 188E42979A for ; Mon, 26 Nov 2018 08:34:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 058C52979C; Mon, 26 Nov 2018 08:34:06 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 94EE12979A for ; Mon, 26 Nov 2018 08:34:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 543F46E049; Mon, 26 Nov 2018 08:34:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by gabe.freedesktop.org (Postfix) with ESMTPS id 35C5689CF5 for ; Sun, 25 Nov 2018 11:24:30 +0000 (UTC) Received: by mail-pl1-x644.google.com with SMTP id b22-v6so12496261pls.7 for ; Sun, 25 Nov 2018 03:24:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ruZlVQBdSmUF/Z0DwV9S/yoSoYQ4BIFvk5eGKjRr8so=; b=ZZPWOXeIkK3yqC5Ew1gMv5s9x6fBmP9NMsnJSWhQ5hMwr25mmuhvJZZZktwnQuC0rt pdAgf56Z/zZwomvpNepAKun155cefJf/2j2iKcT+9Mj8gIkvTxWMMJYha/Eoe2DjUZi9 /sY2nMVGUqPSsCP9jMK6D0hAmLQZfzLhXfRJpuZhTAux5XINel44o7XDXanjgUpIUu2k OEnKzyHPB0hZvslOBbQAgxFtG/su/Td6H4UoyQaQlyRsGJt1OQCpCnBNiiOeO19IG1yC Xk/ELem+zZZOTVSfG4DaXwhbf2/XccCMCxwoH/a8y838j6og2NEb/vRhsBjZ6JEoFYBw Aq+A== X-Gm-Message-State: AA+aEWZznWwV44PqeKL2R5Ut/lu6SMTCY1DrqnForFAUvc19nR/WH/1C 2IPpb6pWWaHUyU8EDJkiHbQ= X-Google-Smtp-Source: AFSGD/XxJS7hZ7twVxrfhvgBVwME9yIB4Hr8TivJlwWbYmbVwoFiHk9uY4hMo5hE4A/8OUFIJm6xeA== X-Received: by 2002:a17:902:2aaa:: with SMTP id j39mr23633464plb.335.1543145069756; Sun, 25 Nov 2018 03:24:29 -0800 (PST) Received: from nishad ([106.51.27.228]) by smtp.gmail.com with ESMTPSA id y184sm61041688pgd.71.2018.11.25.03.24.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Nov 2018 03:24:29 -0800 (PST) Date: Sun, 25 Nov 2018 16:54:23 +0530 From: Nishad Kamdar To: Greg Kroah-Hartman Subject: [PATCH 02/26] Staging: fbtft: fbtft-bus: Switch to the gpio descriptor interface Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Mailman-Approved-At: Mon, 26 Nov 2018 08:34:00 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , devel@driverdev.osuosl.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This switches the fbtft-bus to use GPIO descriptors rather than numerical gpios. Signed-off-by: Nishad Kamdar --- drivers/staging/fbtft/fbtft-bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c index 8ce1ff9b6c2a..2ea814d0dca5 100644 --- a/drivers/staging/fbtft/fbtft-bus.c +++ b/drivers/staging/fbtft/fbtft-bus.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include #include -#include +#include #include #include "fbtft.h" @@ -135,8 +135,8 @@ int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len) remain = len / 2; vmem16 = (u16 *)(par->info->screen_buffer + offset); - if (par->gpio.dc != -1) - gpio_set_value(par->gpio.dc, 1); + if (!par->gpio.dc) + gpiod_set_value(par->gpio.dc, 1); /* non buffered write */ if (!par->txbuf.buf)