Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp986525imm; Wed, 10 Oct 2018 07:27:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV62I5B89dljCVT1UorcxTNhV4cCbobrK9BhJ7AVe0L5uUbKuOgY8SkcUPDHUNeNtL4q6xVdR X-Received: by 2002:a63:3f07:: with SMTP id m7-v6mr30802132pga.115.1539181620285; Wed, 10 Oct 2018 07:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539181620; cv=none; d=google.com; s=arc-20160816; b=SqAEkkuZVR+eKqIwi/obdbfDbcZ4A/xNcK1hLNwLG7yFBcQ6Ku/9SVXpd6JCQwYjyR uXnjMF3K/S/h9X1ryqYqsbvB/6szASppfXrxgV4gxVJl8w6kf5/iewo5pAz3o4K4GrBy N6cZZpwzDY0D8ud6mCMXD0vt2IY4Am4appTxg4Kiu16BEqTha2bqVs/26hJLMYDwnCFr aNrnUe/4ICqBasMZiuodyp02Uf6s6ee+KibSl985UtvGu/9yHxGZTRmozGVNtbZ9DnZX nd1dTGz1cToHK982EiBe7JloxCTs+3QD9VKaFNDcTlo6nCocRAGn8HOeV8A9Cl0GUs4a 6fSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2XInJEjYmma52LCGyl6EobX0n1vM9AMLDHWjXpOc7kU=; b=oOizt9sMJLimy6acDNvwf486LZVQFd7x4xzt54c7fEgqo/HyNRIPrpdGN0/CyqWkGF GRoqDM+41Le7xAyjcVgyvgIYWTEpKgVJdI+rTs9CwEGuunVUT3W2R7BzBwH4oxQXUKc3 v7Fniq9fG2HMn3vuZppPg4W9s8N1hmh3L0mKY4L3eQQh8eSDUs7CvZcyE5eu9y+S8dlO KetTUWR/e0D/DJTennl8EWN6yGAWEGIeFuSjGpNyB+kymqosPWUFVYLJ/PQBwkatSzuq Br9d7W09m/GAtXLsmGz4H89Lr/4RO2qpQ+8k5mX554wGnX+PVjjdUiU2NlQrJg8WFV6r ZIhw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9-v6si25398352pfe.29.2018.10.10.07.26.45; Wed, 10 Oct 2018 07:27:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727427AbeJJVr7 (ORCPT + 99 others); Wed, 10 Oct 2018 17:47:59 -0400 Received: from shell.v3.sk ([90.176.6.54]:53494 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726649AbeJJVr7 (ORCPT ); Wed, 10 Oct 2018 17:47:59 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id E0105BCF62; Wed, 10 Oct 2018 16:25:31 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id BPkrXXem0ap3; Wed, 10 Oct 2018 16:25:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 65983BCF5E; Wed, 10 Oct 2018 16:25:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id M16OtDS2XjH9; Wed, 10 Oct 2018 16:25:12 +0200 (CEST) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 8F761BCF6B; Wed, 10 Oct 2018 16:25:11 +0200 (CEST) From: Lubomir Rintel To: Dmitry Torokhov Cc: Michael Turquette , Rob Herring , Mark Rutland , Stephen Boyd , James Cameron , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Lubomir Rintel Subject: [PATCH v2 8/8] Input: olpc_apsp: allocate the GPIOs used Date: Wed, 10 Oct 2018 16:25:04 +0200 Message-Id: <20181010142504.233467-9-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181010142504.233467-1-lkundrak@v3.sk> References: <20181010142504.233467-1-lkundrak@v3.sk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Take the GPIO lines are used by the SP. The driver doesn't touch the lines -- this is done to disallow anything else from fiddling with them because that would confuse the SP firmware. Also, the lines are now nicely visible in /sys/kernel/debug/gpio. Signed-off-by: Lubomir Rintel --- drivers/input/serio/olpc_apsp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/input/serio/olpc_apsp.c b/drivers/input/serio/olpc_a= psp.c index fe9e19014e70..287759c5f36d 100644 --- a/drivers/input/serio/olpc_apsp.c +++ b/drivers/input/serio/olpc_apsp.c @@ -24,6 +24,7 @@ #include #include #include +#include =20 /* * The OLPC XO-1.75 and XO-4 laptops do not have a hardware PS/2 control= ler. @@ -76,6 +77,8 @@ struct olpc_apsp { struct serio *padio; void __iomem *base; struct clk *clk; + struct gpio_desc *clk_gpio; + struct gpio_desc *data_gpio; int open_count; int irq; }; @@ -211,6 +214,16 @@ static int olpc_apsp_probe(struct platform_device *p= dev) if (IS_ERR(priv->clk)) return PTR_ERR(priv->clk); =20 + priv->clk_gpio =3D devm_gpiod_get_optional(&pdev->dev, "clk", + GPIOD_ASIS); + if (IS_ERR(priv->clk_gpio)) + return PTR_ERR(priv->clk_gpio); + + priv->data_gpio =3D devm_gpiod_get_optional(&pdev->dev, "data", + GPIOD_ASIS); + if (IS_ERR(priv->data_gpio)) + return PTR_ERR(priv->data_gpio); + /* KEYBOARD */ kb_serio =3D kzalloc(sizeof(struct serio), GFP_KERNEL); if (!kb_serio) --=20 2.19.0