Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2059378imm; Sat, 9 Jun 2018 07:06:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL7lkn3aA02ru/O7sO4RsDxD+ifj1MxibM+XBioaKmH0Zn3vhrO0Pnr5Yy3roX2Qh413p12 X-Received: by 2002:a62:fc8d:: with SMTP id e135-v6mr10397724pfh.208.1528553198648; Sat, 09 Jun 2018 07:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528553198; cv=none; d=google.com; s=arc-20160816; b=VJ+02jElykrneTJrghs8dDnUhysSjlkCSHrhu67DMblfG6OluVAB7ZORDZDOgEJVM1 +qwt7/3XtdhmI3v/+W7W75BDnhpPqgjGJE/GTrgw0mlLJplURyEWTI7o+7r6tBJgCDRY 4MmZdyEY3JVt5qo+UiiMm6fWj5svSKAcb76n3gq49WnMDNflKFTrBmAS99QumC+q41Iq b793rg2+7t3bjWlmw3uxuR5KwMCQiOy2hY7GenMWCv3gy9N1Tim/lwIGQ7n6XJ8A9y/e MpFg0XJ1IJRcRCEI3bKzOeG8Wa8enHmGQPl402hb16g4XfozXN/DIXodgyfc+wPsMYSM Iu4w== 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=Cllgb48Ha6uWerR09aJv3S2+cDev6DG6WH9tvQJMi9w=; b=i6zQT3ikE15cSh1valHazguYxkEPgEThzQUa94EUkogQl54SPElP6lr1oyB4Eg4j8l jNm6sv7l0sCr9g1sWzHZz90PFo5TKfu0CyTd35WfXMV749RqcRmhpyJLo0shWNJQNLXa YOUhIAEcAsbngZStCll/4VHwHSWDRl6JBttkSO+gyavckPnD5d7czSRbGkXvsE//DuTw TIiEt9o6AyE8Hj5CHTp1wAgykg9DNyYWFVOPLp5mVXm+PilmZJRqBI5WP1+YhDhaR5My Qei3l14AN0bfkpXGZU8o1k+DC28itz4VvQMyGOUwRaFzrkQPr1rAbRqaF2YyOpArOuMv WMAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QOpHnwO6; 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 o61-v6si36728705pld.109.2018.06.09.07.06.24; Sat, 09 Jun 2018 07:06:38 -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=QOpHnwO6; 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 S1753479AbeFIOEe (ORCPT + 99 others); Sat, 9 Jun 2018 10:04:34 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:34477 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753376AbeFIODB (ORCPT ); Sat, 9 Jun 2018 10:03:01 -0400 Received: by mail-lf0-f68.google.com with SMTP id o9-v6so24194978lfk.1; Sat, 09 Jun 2018 07:03:00 -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=Cllgb48Ha6uWerR09aJv3S2+cDev6DG6WH9tvQJMi9w=; b=QOpHnwO66Pq5QbaGVTCZ23HmrHOOMH/RQYDROTSRT2/0KpwDX8M5eX0BiegT00QNG6 x48ZTFSCx+dPC3bYpYhwseecLUGCl5VQz7meXN79XfEGujo2R1B25S2sG1ixsHITz1u6 ONGIfl04vZGLQCMQrc08RsPsap2+skfIGlVZMZSnY5dwtl5uZ96bKrQlhbJndnLrBpLJ 0ikrocrcKdWmGqlapZF6O4kqO9DDc1DD1tKdC+ViIXzu/VW11c5RXpr0MduGtWEJ8/Ys rpH8UoO2dO3U9ANiIVEF1prBCKl5DKNfNBLkoPRII3C2SwwIdb3FLmSbFrX+y1CgYQ6o ehNw== 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=Cllgb48Ha6uWerR09aJv3S2+cDev6DG6WH9tvQJMi9w=; b=OCNNRQHLymC7QBbGVaVNm3OM7xQGx7XR6EhTIAtXB7vhCuLuSMIjT0qIShpQufkQwF r2efrjM71OsqkxISnhN/2/0FFOeBo01oAsZtUkSvtuazuyqmSS6DQfo1/F5OdBZuoQDV K7xCc4XnWfp3ErN6+9/yb2hTW3F+SwgEzCFLEwZuqNjUdzhwpX7Zx/d3gk0Bhz+km3+C gfcDTFiUwLRHYE+oXdKZaV1dYzjN00iTAmF28P6BCGvjVvSgToSrbS383VfNW2wIS6NB KoyYdBJTUDPBi9CaxTtb8U3mYP6L9/kl9vW+D9BlNR8N2u+teQ60aaj6jvY5Icyte9LC ADXg== X-Gm-Message-State: APt69E1pVWhwugA56JeUXlsgbhrZIg70SVry6WxZQcXH8xPWXe5n8Uyd 6MQXDeKJSf5CPe0ZyB+7EGk= X-Received: by 2002:a2e:9b52:: with SMTP id o18-v6mr4877596ljj.49.1528552979402; Sat, 09 Jun 2018 07:02:59 -0700 (PDT) Received: from localhost.localdomain (apn-31-0-40-98.dynamic.gprs.plus.pl. [31.0.40.98]) by smtp.gmail.com with ESMTPSA id n84-v6sm4477727lfi.19.2018.06.09.07.02.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Jun 2018 07:02:58 -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 , Liam Girdwood , Mark Brown , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org, linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik Subject: [PATCH 05/10] ARM: OMAP1: ams-delta: Hog "keybrd_dataout" GPIO pin Date: Sat, 9 Jun 2018 16:02:19 +0200 Message-Id: <20180609140224.32606-5-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180609140224.32606-1-jmkrzyszt@gmail.com> References: <20180609140224.32606-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 --- 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 d48beab1d00d..0b4d5a952ecb 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.1