Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp708238ybk; Wed, 20 May 2020 09:59:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVZjLlyJyq0KKifKquFjibW287xrV7VzeCm4QR4jvOAieaZBAcLLg/m01wOtTYoCvX/AkZ X-Received: by 2002:aa7:c6c6:: with SMTP id b6mr4205195eds.53.1589993948176; Wed, 20 May 2020 09:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589993948; cv=none; d=google.com; s=arc-20160816; b=EiOYjqdhhg4xKc6zmCGeCNhYTkyIbMqbND0aDNS7q3W43z0J0pulxehDnJOZI4WhJo KuLBTvR/qzUFzeT+/2l+XbrI9giKeBUAcRCI1Y33JraURmhYqGv2dGO4AiehjEgN2B/1 x1thactpnoafuVV3VyBOuofBjebFYJCifk0dJFvV4L1a7MrVDuLJ9Z9QF2eZqyOZ1QTv /kqqijet9xzw0s8hHwkYrSUfyK1/7CUuuHtwnYdhC17RKf98cGR1XTm/zYRym3BSNt56 VBtboYtKX8FQnuEEw4mVYTu+oKtcheD5E8p0HbTpJ+X5gPc/PIKHTvDmnFYyVromHLBo tuwA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=AHcfvKfm+1TXPgb7KzZBWIXOp+P6KeHuUyity1JFNFE=; b=cNPmW4GvGTrbw2xoh0gDPz8IMPAaH7NTAlGGvE13zDKWXD0kUniOX8vaI1pu/dXYih srvYfpAps+9W72rihtTcq7qNMs1OEkwleXyWG2pofpsrLyg/P4J1D4GI+hHPL7WCPmNm WQDekw6wpNbKiM8ZJNIKxFwgo4cak+jN6dFqa+LYJOEJDZfkQYpZ61KFTSGIcfdYjpVx rO+ChrlqwRr2+ynipnKg4WQFcc5haT/rBCwbmuOxJzneGC73f3v12PUliyM99q7P6J+Q 96f5Inb1+qChfppm6/04/d/qlWYI3gc2S97mDsHrXsxEy0VDVwolpJTlANRwYnOSUYy1 0R9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si2096897ejd.57.2020.05.20.09.58.45; Wed, 20 May 2020 09:59:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726957AbgETQy4 (ORCPT + 99 others); Wed, 20 May 2020 12:54:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726510AbgETQyz (ORCPT ); Wed, 20 May 2020 12:54:55 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8CFFC061A0E; Wed, 20 May 2020 09:54:55 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 1E3692A2D17 Subject: Re: [PATCHv3 5/5] Input: EXC3000: Add reset gpio support To: Sebastian Reichel , Dmitry Torokhov , Ahmet Inan , Martin Fuzzey Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com References: <20200520153936.46869-1-sebastian.reichel@collabora.com> <20200520153936.46869-6-sebastian.reichel@collabora.com> From: Enric Balletbo i Serra Message-ID: Date: Wed, 20 May 2020 18:54:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200520153936.46869-6-sebastian.reichel@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, On 20/5/20 17:39, Sebastian Reichel wrote: > Add basic support for an optional reset gpio. > > Signed-off-by: Sebastian Reichel Thanks to address the comments I did in second version. so, Reviewed-by: Enric Balletbo i Serra > --- > .../input/touchscreen/eeti,exc3000.yaml | 2 ++ > drivers/input/touchscreen/exc3000.c | 17 +++++++++++++++++ > 2 files changed, 19 insertions(+) > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/eeti,exc3000.yaml b/Documentation/devicetree/bindings/input/touchscreen/eeti,exc3000.yaml > index 7e6e23f8fa00..007adbc89c14 100644 > --- a/Documentation/devicetree/bindings/input/touchscreen/eeti,exc3000.yaml > +++ b/Documentation/devicetree/bindings/input/touchscreen/eeti,exc3000.yaml > @@ -22,6 +22,8 @@ properties: > const: 0x2a > interrupts: > maxItems: 1 > + reset-gpios: > + maxItems: 1 > touchscreen-size-x: true > touchscreen-size-y: true > touchscreen-inverted-x: true > diff --git a/drivers/input/touchscreen/exc3000.c b/drivers/input/touchscreen/exc3000.c > index b5a3bbb63504..de9d0ae1210a 100644 > --- a/drivers/input/touchscreen/exc3000.c > +++ b/drivers/input/touchscreen/exc3000.c > @@ -8,7 +8,9 @@ > */ > > #include > +#include > #include > +#include > #include > #include > #include > @@ -33,6 +35,9 @@ > > #define EXC3000_TIMEOUT_MS 100 > > +#define EXC3000_RESET_MS 10 > +#define EXC3000_READY_MS 100 > + > static const struct i2c_device_id exc3000_id[]; > > struct eeti_dev_info { > @@ -66,6 +71,7 @@ struct exc3000_data { > const struct eeti_dev_info *info; > struct input_dev *input; > struct touchscreen_properties prop; > + struct gpio_desc *reset; > struct timer_list timer; > u8 buf[2 * EXC3000_LEN_FRAME]; > struct completion wait_event; > @@ -325,6 +331,17 @@ static int exc3000_probe(struct i2c_client *client) > init_completion(&data->wait_event); > mutex_init(&data->query_lock); > > + data->reset = devm_gpiod_get_optional(&client->dev, "reset", > + GPIOD_OUT_HIGH); > + if (IS_ERR(data->reset)) > + return PTR_ERR(data->reset); > + > + if (data->reset) { > + msleep(EXC3000_RESET_MS); > + gpiod_set_value_cansleep(data->reset, 0); > + msleep(EXC3000_READY_MS); > + } > + > input = devm_input_allocate_device(&client->dev); > if (!input) > return -ENOMEM; >