Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1174923imm; Wed, 10 Oct 2018 10:12:24 -0700 (PDT) X-Google-Smtp-Source: ACcGV63BWMpDGPJnEulUPaiFWR0WMZ/okqBtVhnDNiL2K6swtNLTDjkbJBH+B0yR3uigR+iqde08 X-Received: by 2002:a63:4745:: with SMTP id w5-v6mr31114483pgk.377.1539191544826; Wed, 10 Oct 2018 10:12:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539191544; cv=none; d=google.com; s=arc-20160816; b=Nap5kdkmuOwHbH/Yy0T/KLH5TCzphdBusNk+7TDExGskpDHpLmlVZg6ylH5fhagv9E n+qNNhli2okMpN/ufHre5RvFnm2PoxzpV54ADwONlSrD3cljGCrmfckx8vZdTtwYKJNw 8UtEOszmUU3KQW+6fWx5rGyd5jubCWUxTdopTowM6LRXj913+1IM/+5PSf9y2GDiOAcB 0CLHFLSMhNzY7fRZCPHPtwGkcSsUFDdrdYRLHQK4062pEohIfTX1hfj9KrKHJdDllNE5 RaHP50RhdclzvrXMa9tWrNwvclzAonIRQJQbdjNGLqbCB5r9WNCme3yv0pSu8k2/7XDh eYeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Yqh6bWuUzP6eSKEYl4RhvXswDfe+ceXyaVCSadEeM5g=; b=l2zHdfvac571URfkI2nD0DlR61KB5lCRLGVnUcy990ImT0O2yn8LyxjKGzzIj/NrEk RIFFzs2ZqCj4S0h02Vr5GlMIeutPZH1soBJCeNrDJY4SeP4tz/lBh4QRXpjpZBftFUfc by+XwuDEwd9Lvjgj3cq31+zPH39DajfylDHGHN/JJi16jLGn+m1hWIe6BK54XoiAU37U zQ5gnWP8S7GSIom2FI2HvmU6vf3HEze3E+e2Fsu8JvjoRrzpJKd9/JUPHjjPt2Re2xVZ 6Vpmu8kuSx0ZlpIt4nbAw+zOo2KvsccJZoTPF539MdeHOzMq9Ba/+pGN/wUKHB/yzKYt BdxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Mhtqx7MZ; 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 x27-v6si26230691pff.196.2018.10.10.10.12.09; Wed, 10 Oct 2018 10:12:24 -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=Mhtqx7MZ; 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 S1727329AbeJKAdW (ORCPT + 99 others); Wed, 10 Oct 2018 20:33:22 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:45917 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727005AbeJKAdW (ORCPT ); Wed, 10 Oct 2018 20:33:22 -0400 Received: by mail-pg1-f193.google.com with SMTP id t70-v6so2801999pgd.12; Wed, 10 Oct 2018 10:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Yqh6bWuUzP6eSKEYl4RhvXswDfe+ceXyaVCSadEeM5g=; b=Mhtqx7MZFgTWmPF5UJ9n5kXPsvmnLf4h4lS3fnlE5/odplKLulzhDCNLt1VHRmUFZE 6wjPJqKxpf6ZenY8dbd86JxcFdJ8hRiW+JWYFAVl/++qqp8mt6/Wtyf1gdXOPKu12/Ht /xyG9WdwteE0DmxnkCrpeCj7dYX/cPo21ia5QqYQqZ28LTYb2gu82vaGGxKFEpqd5i/U HUP6/yZCYJj4vPnKM3954qwFKYq8WCWbxSENB6Kbf8v/ugWTJJwevhaXjQ0Obz7BbApW K7KTbFTySVlJOUD1XSsCmS2ECBi3I32hA+OgGomIyWKxd5/OgYQV2VPig8shaOAZ7rFb 9GiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Yqh6bWuUzP6eSKEYl4RhvXswDfe+ceXyaVCSadEeM5g=; b=s4Xh1qrbmyC5P8HAeKjED7FmkP6Us6Llw+BSmNqqcHhGbADbYm4Lur1xZ4zL2qUinI oAPh/IzakXoECNh04gz1nGYEaNfpy68FglL65ZQJSmqVnibQLN8n2lzXlqhEH4208ObD o1NNI6wRsT5VID3JeKlOv2VnMLn5ZSUQzl/9spRA8B+T2IJ1v1W+PAo0HcCGnVRhjpEM 2Ombd4HCRYPgeks49u5R1DWUU+eNyb+WvVebIQBvnTj3tyOCQYC74kaeO7YA2fMkJ2Cy WVmThKSEGeUEpbOAhCJHK3p4jqFsa2RMvMDUPVNT7bMb1514Rg01nSpvemSPzhEj18t7 CFFg== X-Gm-Message-State: ABuFfogf6zm1IVgbN8swntYFi3eR1shpQTtQ1a2aDx2K+jJjwaX0Ct4p MbdABjYHM+8iMrz02+0NGwQ= X-Received: by 2002:a63:cc0b:: with SMTP id x11-v6mr16738132pgf.33.1539191417399; Wed, 10 Oct 2018 10:10:17 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id b3-v6sm35495406pfb.151.2018.10.10.10.10.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Oct 2018 10:10:16 -0700 (PDT) Date: Wed, 10 Oct 2018 10:10:13 -0700 From: Dmitry Torokhov To: Lubomir Rintel 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 Subject: Re: [PATCH v2 8/8] Input: olpc_apsp: allocate the GPIOs used Message-ID: <20181010171013.GD47260@dtor-ws> References: <20181010142504.233467-1-lkundrak@v3.sk> <20181010142504.233467-9-lkundrak@v3.sk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181010142504.233467-9-lkundrak@v3.sk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 10, 2018 at 04:25:04PM +0200, Lubomir Rintel wrote: > 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. Linus, is this something that should be handled by GPIO "hogs"? > > 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_apsp.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 > > /* > * The OLPC XO-1.75 and XO-4 laptops do not have a hardware PS/2 controller. > @@ -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 *pdev) > if (IS_ERR(priv->clk)) > return PTR_ERR(priv->clk); > > + priv->clk_gpio = devm_gpiod_get_optional(&pdev->dev, "clk", > + GPIOD_ASIS); > + if (IS_ERR(priv->clk_gpio)) > + return PTR_ERR(priv->clk_gpio); > + > + priv->data_gpio = devm_gpiod_get_optional(&pdev->dev, "data", > + GPIOD_ASIS); > + if (IS_ERR(priv->data_gpio)) > + return PTR_ERR(priv->data_gpio); > + > /* KEYBOARD */ > kb_serio = kzalloc(sizeof(struct serio), GFP_KERNEL); > if (!kb_serio) > -- > 2.19.0 > -- Dmitry