Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp152787imm; Thu, 21 Jun 2018 15:45:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLRtqRsp0igrT2znvvI8b7hH2RqEurg1n9XHX5qTGcPrmFH934K9jaswtstywZow7gR+u8o X-Received: by 2002:a17:902:8347:: with SMTP id z7-v6mr31025228pln.290.1529621111897; Thu, 21 Jun 2018 15:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529621111; cv=none; d=google.com; s=arc-20160816; b=mgHCAp+hyWV5+wqIk2xlYLW3dqU4pMuGFqGP/WOo7M2xW/Ze6WU+dYXx2FsXD0KXLE 3y4r3LKhVLg3gKExSKtmaBWaYw+lGLKvOAMRbvkpjmpgTj3Z42MeBLPGN1V6F2esqZRy zGvgcnTBTKQLi9qEnq8+UDkDjVBP0hhSJp881j5Pe+krabb3CM65W9Uur8vEB+mF8UMG q1lTu+FWVjcF7o7Bi3Hsx/EJoEJk28ADsKf1/+25Gq46IpP8AuUnfK66vKzxoqJ8lVPi GJ076N8QjKohAm8RdgU15MKMFyNVvLFGjnwX25HbHcdY5h8XBwEJaVro4SS12DAa9TZc HLNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=dZMcQjZGyGgzmNfiUwUeEHTFirCqtMMoxCTH6m+rFvI=; b=NVcRkRFoYPiSnYfvbzHA9BJ+vXXirJLnxb4NT+TnfPPUSjlN0FVHxzrojYJnD7759K qVV4dqtGZTLyQLnEh9JCeCGRo4WbfizQh0V5585Brmdu/Ckv61we/h0k3N+N87mNM1GF WH1uZoDF84QFtOdvqPdCFR1YkoxDomRinJVm34nUFdIH0JgFcxOgHx94dn1Ej7hx3lgK 3qzAMmB09ujiE2bd7sY/RIdsdyefdHxHmcyWvWPGHDncYdTBZ3an9tTNVCwMhY1XJjfr euIL8PyaCtJadm5lVRhEdcRxQ4UbDAj8mgm7nzPt5M2xPn/ZXsUoIGzYCnta8UTzfwwa 5xUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iu1ObuiM; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4-v6si5977771plf.383.2018.06.21.15.44.57; Thu, 21 Jun 2018 15:45:11 -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=@gmail.com header.s=20161025 header.b=iu1ObuiM; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934084AbeFUWmd (ORCPT + 99 others); Thu, 21 Jun 2018 18:42:33 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:34033 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933653AbeFUWm1 (ORCPT ); Thu, 21 Jun 2018 18:42:27 -0400 Received: by mail-lf0-f65.google.com with SMTP id e13-v6so6649291lfc.1; Thu, 21 Jun 2018 15:42:26 -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=iYRkOKdL0h/eCfi7vdpP6eNyyvOsyLq5drhMNxRkTUn5swJ2roJ3j2tJVf21rXd+oP 2sOaifPw/TqulEFBC5U0DuQ/KFhPpwpIaF4LSpvDhVMHop/kiYedHI17TDwe/ronl/vF Ujb5lczuwRIbDfvsJn4ddK2vvPE0YrgTOdhnpP/F+rnzzxz4p7jMC4v81kWNU8RLZ0N7 zKzGVfKEnUIe5aDY+pMgdCAIaXikTUuGRFyNIe0jnNkM7HCVtcBJq5abPu6Q7AI7i+D1 EW3BOEmfgfMWXhTObiYKC4hSVxHpg7cbtGdegmJ/SK91fdJEFM2JFjzSQvnkvo2GHGoW 4pWg== X-Gm-Message-State: APt69E0g0veHJGkKO3S9rMwB6pPrwZH4tCNIMANszBQ4dEsET3QebXJx ACzSbd7/9R8+LDPFPIYWtl8= 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 Cc: "David S . Miller " , Mauro Carvalho Chehab , Greg Kroah-Hartman , Andrew Morton , Randy Dunlap , Linus Walleij , Mark Brown , Liam Girdwood , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-input@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "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) -- 2.16.4