Received: by 10.223.176.46 with SMTP id f43csp3930007wra; Tue, 23 Jan 2018 01:14:54 -0800 (PST) X-Google-Smtp-Source: AH8x225QQRZ7EQeG6YWo7SVOZurx2Di8Z8P2u31XTNBizH+/MOnGEijjjzmvRBtsBvgKSy8aTUnF X-Received: by 2002:a17:902:6683:: with SMTP id e3-v6mr4959786plk.22.1516698893988; Tue, 23 Jan 2018 01:14:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516698893; cv=none; d=google.com; s=arc-20160816; b=PMxR0mvZv71bxZenr78yxqzgtKKNc1mYwOOMoUwl1PaSlsy6/YRnJTDUcmSsPL/PDI B/l59WfvIiUQapf6eEnIoXA3yE50KLeYJo6g/kxh2op+iy4ADJx2QhMO4Wiv9sRitFO4 R8QnFUdjuWusOkRTUtocQDoqugr3/YgXlx64ER5Tb7zL5g1cLIQ6/SPfxM5wqHXnNoGH VYAY/nzQXzVOcqTMc95mGiAwzticWS5eZM1XXQow0efSfUij/6Ydl+3dNtPiUxH9b1rO /bJcmByG64xO8ALykA2zFxpHgh3o1IjH6LOegdk52d8TU9+Re9XQoSFyawEoLljqjGg5 fj3g== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=y+nClr0PxdTsO7gVA0QtjQ/iV2m+6eqUSdkTpy1bZdk=; b=bWcK2iz9T5L4qlSggXcdFW1I2zOG+YauNPcWg/PbtQLszuEA/58NLAAQ4WLuKaLRuL 7mxa9sNAVb/f7Q9EMrxE4JmUJfCvElUkxfYbFiO/hhH6gfRmMQOjGJmL7FEtoBUsA2ev b6fpLbmYUo5piM04F+ty0mPb/0hvHit6moQ8yfRbELrrz68GMb0XjUudBVcLH+6IFCTg Yv7+o4QhTTFIqgT092DQJf5xqWSouWieBzXV8auFMZ0Rvc2bz3GtI9rf8aDLQQJz6alz /iKM11Xt8EuRuSHawRUbsN6bLCtoB1GjSEMwdHlVwSytpNcvhdxAzdOgXENmqEmqThku j6BQ== 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 o76si1168437pfa.367.2018.01.23.01.14.40; Tue, 23 Jan 2018 01:14:53 -0800 (PST) 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 S1751243AbeAWJNk convert rfc822-to-8bit (ORCPT + 99 others); Tue, 23 Jan 2018 04:13:40 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:53628 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751027AbeAWJNi (ORCPT ); Tue, 23 Jan 2018 04:13:38 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id A5616209C5; Tue, 23 Jan 2018 10:13:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 49D7820723; Tue, 23 Jan 2018 10:13:36 +0100 (CET) Date: Tue, 23 Jan 2018 10:13:35 +0100 From: Mylene Josserand To: Lothar =?UTF-8?B?V2HDn21hbm4=?= Cc: Dmitry Torokhov , Mark Rutland , devicetree@vger.kernel.org, Russell King - ARM Linux , lkml , Quentin Schulz , Chen-Yu Tsai , Rob Herring , "linux-input@vger.kernel.org" , Maxime Ripard , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 1/2] Input: edt-ft5x06 - Add support for regulator Message-ID: <20180123101335.205681d3@dell-desktop.home> In-Reply-To: <20180123090414.47bcf118@karo-electronics.de> References: <20171228163336.28131-1-mylene.josserand@free-electrons.com> <20171228163336.28131-2-mylene.josserand@free-electrons.com> <20180123090414.47bcf118@karo-electronics.de> Organization: Free Electrons X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Lothar, Le Tue, 23 Jan 2018 09:04:14 +0100, Lothar Waßmann a écrit : > Hi, > > On Mon, 22 Jan 2018 09:42:08 -0800 Dmitry Torokhov wrote: > > Hi Mylène, > > > > On Thu, Dec 28, 2017 at 8:33 AM, Mylène Josserand > > wrote: > > > Add the support of regulator to use it as VCC source. > > > > > > Signed-off-by: Mylène Josserand > > > --- > > > .../bindings/input/touchscreen/edt-ft5x06.txt | 1 + > > > drivers/input/touchscreen/edt-ft5x06.c | 33 ++++++++++++++++++++++ > > > 2 files changed, 34 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt > > > index 025cf8c9324a..48e975b9c1aa 100644 > > > --- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt > > > @@ -30,6 +30,7 @@ Required properties: > > > Optional properties: > > > - reset-gpios: GPIO specification for the RESET input > > > - wake-gpios: GPIO specification for the WAKE input > > > + - vcc-supply: Regulator that supplies the touchscreen > > > > > > - pinctrl-names: should be "default" > > > - pinctrl-0: a phandle pointing to the pin settings for the > > > diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c > > > index c53a3d7239e7..5ee14a25a382 100644 > > > --- a/drivers/input/touchscreen/edt-ft5x06.c > > > +++ b/drivers/input/touchscreen/edt-ft5x06.c > > > @@ -39,6 +39,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > > > > #define WORK_REGISTER_THRESHOLD 0x00 > > > #define WORK_REGISTER_REPORT_RATE 0x08 > > > @@ -91,6 +92,7 @@ struct edt_ft5x06_ts_data { > > > struct touchscreen_properties prop; > > > u16 num_x; > > > u16 num_y; > > > + struct regulator *vcc; > > > > > > struct gpio_desc *reset_gpio; > > > struct gpio_desc *wake_gpio; > > > @@ -993,6 +995,23 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, > > > > > > tsdata->max_support_points = chip_data->max_support_points; > > > > > > + tsdata->vcc = devm_regulator_get(&client->dev, "vcc"); > > > + if (IS_ERR(tsdata->vcc)) { > > > + error = PTR_ERR(tsdata->vcc); > > > + dev_err(&client->dev, "failed to request regulator: %d\n", > > > + error); > > > I would check for -EPROBE_DEFER here and omit the error message in this > case. > > > Lothar Waßmann Sure, I will add this case, thank you for the review. Best regards, -- Mylène Josserand, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com