From patchwork Thu Jun 21 22:41:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 10480869 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 B1D35604D3 for ; Thu, 21 Jun 2018 22:43:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FFCC28573 for ; Thu, 21 Jun 2018 22:43:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9308928DD2; Thu, 21 Jun 2018 22:43:22 +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=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3BEBB28573 for ; Thu, 21 Jun 2018 22:43:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Z3EitMcEmp+mHBqG251NayrjlxbjEHEs6k/H7PlwkYw=; b=aYy4e1oZKvkANZk5P36IAHqR6m Jl+F8Ja9bJV6VDiaJaEE1DWDK+Xoi+UkScnwc6KdRW4SihGiflG6mG1URBvpERhFJf+u4V36BIQes PY23ag9++dNR8HaflEfp12oehMEicejm3cpRy3yHBaCaGIFeKEJiha0cexjVImvPEvYwl2Dc5RrKa MjDxMEy0brEYHcvrp12dPji8Yn8efbjUjdHekxeg8qPmDHvSytORMpq2YW+pcs56RZYeNthNZTB7e n/MGULkfQP8YNiSuvhOIr+4TGokRN9qUfcAz/XXJdzvNTgFxA3ypuvfPZMFFiOFW6b1aHh+RbVr9A uhKraHFQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fW8IG-0003eq-W0; Thu, 21 Jun 2018 22:43:09 +0000 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fW8He-0003Ob-Au for linux-arm-kernel@lists.infradead.org; Thu, 21 Jun 2018 22:42:38 +0000 Received: by mail-lf0-x243.google.com with SMTP id t2-v6so6616939lfd.6 for ; Thu, 21 Jun 2018 15:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dZMcQjZGyGgzmNfiUwUeEHTFirCqtMMoxCTH6m+rFvI=; b=iu1ObuiMiekmTXMnE+ZFy867JP+V0lVBlirpr7w1f/dbbgMyNKauZAWOah/O9e0Cdf JS9n8xzfsFoplkVIr70uQFhvR+LoA41mmjyJ/oFtue4eoK9Sb5GtGaDfZGXu34iz/dut jvkjpikgb9xUpa2TUr+NlG3dF+L7dewH6VH6N1BwYGav7UerdBdgwsxpFW0YqprMwQWe 2yGcxWJ9ynnRbQiwIBx8Adr/9xYSXDvjYaKY9G66R2zJlvB7FDXf8sxW5brxeNgoscz4 VmY+7qhOmzs56LyO/vgsrxhkXleKVNc0G3b75i1RhPgxGFEbwsCo40GvtXhK2OoEzirw ZV3Q== 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; bh=dZMcQjZGyGgzmNfiUwUeEHTFirCqtMMoxCTH6m+rFvI=; b=bm6C5JN2pUjmTpEUodE3bdciqQlSIZM8bq1L1K8NfMYRYdBg+zaA1IQ0wCjwJBaPRm WSdWxV4O+z90ZajOZrVI9ncdfR5KHcAJIOSDXPo+WREsSptZYNlrL+5e3QL6vzbtwnu4 cdSz7i5zLaQO4G4EHPbVlna9SF76PkXB9GYStiRjpmqf5saXKXwUNd80PmI6VCUjgqP9 hkC91iEoFJEHTmdhpmVpP2Uu5JEtptiR+OMa3VN62Ui6twd+UUrBMpqhuTLQGhoGXKC4 1bl5TYPXsw3mKyQsJ3rgEHn+yMlIeJ6utMWsORcDxG37nGZ3worNXMU4KUI1U8YvAv1J xR5A== X-Gm-Message-State: APt69E1MjmC2pH/LN5cFsO5ttodjszfUGFY+9WNtOXWeP4DhXeDGdvDg /ygfqW9imyktSZiy5IeS99U= X-Google-Smtp-Source: ADUXVKJuVrVyMd9HIMaRt5ue5sFL5k+ZEOuti5ITQ9eCTubh0vFy5T8kBerSsaDsT5EeuVBtkPuGXg== X-Received: by 2002:a2e:200f:: with SMTP id g15-v6mr18184793ljg.63.1529620945699; Thu, 21 Jun 2018 15:42:25 -0700 (PDT) Received: from z50.lan (93-181-165-181.internetia.net.pl. [93.181.165.181]) by smtp.gmail.com with ESMTPSA id t6-v6sm1046153lje.18.2018.06.21.15.42.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jun 2018 15:42:25 -0700 (PDT) From: Janusz Krzysztofik To: Dmitry Torokhov , Tony Lindgren , Aaro Koskinen Subject: [PATCH v2 05/10] ARM: OMAP1: ams-delta: Hog "keybrd_dataout" GPIO pin Date: Fri, 22 Jun 2018 00:41:23 +0200 Message-Id: <20180621224128.17623-5-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180621224128.17623-1-jmkrzyszt@gmail.com> References: <20180609140224.32606-1-jmkrzyszt@gmail.com> <20180621224128.17623-1-jmkrzyszt@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180621_154230_408996_8472EDD5 X-CRM114-Status: GOOD ( 15.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , Linus Walleij , Randy Dunlap , Janusz Krzysztofik , Liam Girdwood , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Mark Brown , linux-input@vger.kernel.org, Mauro Carvalho Chehab , Andrew Morton , linux-omap@vger.kernel.org, "David S . Miller " , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP "keybrd_dataout" GPIO pin used to be initialized by ams-delta-serio driver to a state safe for ams-delta-serio device function and not changed thereafter. As such, it may be assumed not under the driver control and responsibility for its initialization handed over to board init file. Introduce a GPIO hog table and take over control of the "keybrd_dataout" GPIO pin from the ams-delta-serio driver. Signed-off-by: Janusz Krzysztofik --- Changelog: v2: rebased on v4.18-rc1, no conflicts arch/arm/mach-omap1/board-ams-delta.c | 8 ++++++++ drivers/input/serio/ams_delta_serio.c | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 706eb2f9301d..2821284aa0c9 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -574,6 +574,12 @@ static struct gpiod_lookup_table *late_gpio_tables[] __initdata = { &ams_delta_nand_gpio_table, }; +static struct gpiod_hog ams_delta_gpio_hogs[] = { + GPIO_HOG(LATCH2_LABEL, LATCH2_PIN_KEYBRD_DATAOUT, "keybrd_dataout", + GPIO_ACTIVE_HIGH, GPIOD_OUT_LOW), + {}, +}; + static void __init ams_delta_init(void) { /* mux pins for uarts */ @@ -594,6 +600,8 @@ static void __init ams_delta_init(void) omap_cfg_reg(J19_1610_CAM_D6); omap_cfg_reg(J18_1610_CAM_D7); + gpiod_add_hogs(ams_delta_gpio_hogs); + omap_serial_init(); omap_register_i2c_bus(1, 100, NULL, 0); diff --git a/drivers/input/serio/ams_delta_serio.c b/drivers/input/serio/ams_delta_serio.c index 854d0d3ada52..b955c6a72e99 100644 --- a/drivers/input/serio/ams_delta_serio.c +++ b/drivers/input/serio/ams_delta_serio.c @@ -121,11 +121,6 @@ static const struct gpio ams_delta_gpios[] __initconst_or_module = { .flags = GPIOF_DIR_IN, .label = "serio-clock", }, - { - .gpio = AMS_DELTA_GPIO_PIN_KEYBRD_DATAOUT, - .flags = GPIOF_OUT_INIT_LOW, - .label = "serio-dataout", - }, }; static int ams_delta_serio_init(struct platform_device *pdev)