From patchwork Sat Jun 9 14:02:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 10455963 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 455C6601D4 for ; Sat, 9 Jun 2018 14:13:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3C6B223A5 for ; Sat, 9 Jun 2018 14:13:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6EBD223B2; Sat, 9 Jun 2018 14:13:16 +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 85195223A5 for ; Sat, 9 Jun 2018 14:13:16 +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=h6bMI3M8QLEx0cJgSdbKnrAM4kgtTg2E+k6oeRzeNGs=; b=BYnApTZF82mjj3cI+ym19AvFkX 7pJKWr8RSCkrDMI0kZQWL010TKG4iqBRTFFEkfuUtb/S/DrFuJEqmNIU9cK2z2eWYLFSWv18g4BxT QfEAJkwjnE0g4RwUPcB/PPSifsPex53F3USvulfLPCnZEQVtHUb66r2O8rw6+tH7TeoQMzzZYquTE kGF0EqvpLMvU+nPL8d+MPHfiln2Z+sqngmRsaJjLt7aiRAnnXMai+gYBjpXyRsanYV+JzsmpvJeo/ kR8Z46XMPd7WLKjzYa/YPnbaYKh+MZQcude73ismEaNjQRxIRsVmKviOLV7TVOQU+B3+4uZkLYX5h IYIz7+YA==; 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 1fRec5-0005ZL-EP; Sat, 09 Jun 2018 14:13:05 +0000 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fReSV-0007Mz-A8 for linux-arm-kernel@lists.infradead.org; Sat, 09 Jun 2018 14:03:25 +0000 Received: by mail-lf0-x241.google.com with SMTP id n15-v6so24166560lfn.10 for ; 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=AudS9UgxPxj2VS3x+hMtWpTXnNnq86Ftosdo/ANeFVnSKf5zprtN825Q5RyxAXxv40 fYlqq8trjVTazhH282uBviEDR/QHanCdTSOnVGOo1a0GGCHdGCCgpS6mu0VYgus6tl3H AOkwbq+7tT64Mg5mC7y33/v7hT6yR1gl5tZVrHt3Io/Le+OIcrE+HYadO9l+4Gx1BkvI +cmDi2YWWrx38zxGYKCkfD3+QBLX8Nbu+Mg9V6ojinujeLphaDVqaED31y+iLDDb4rUL pbEiyMTuDuzRWV0IZj83RzeH5KH96S2jGzu+1XDiJIgo713gLcuFuN0LzIhmR7BDYTFq 4lzg== X-Gm-Message-State: APt69E0UlzrbqKMh/4Z6N4zA3Ms7pVjPwL8EA6lz6IGIiUzbS59eNEDh awWshO2B88gQsJLS/paZ7t8KZ2KB6iE= X-Google-Smtp-Source: ADUXVKLg8vI07CGiWyN8GwUv/qV9EhDp5kRn2lsVuCI+lf6shsWJ3n9OQ3ZRr9qgfm370FpbKJd4Sg== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180609_070311_382569_4AA2981D X-CRM114-Status: GOOD ( 15.81 ) 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 --- 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)