From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB335CA9EB9 for ; Tue, 29 Oct 2019 04:12:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCE0D21835 for ; Tue, 29 Oct 2019 04:12:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gofsBDoK"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rnSsf3KE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCE0D21835 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=g98rxbkF4ISkGhT8OoaX8lvTZWeSYOkf7+KqMdgUR/I=; b=gofsBDoKQ5VGQ9 atxeloysdJwtiBQF7B2kts6VHhQHT23ZJE3CYgeQuL1Wp1G8NmahKlkpf3Os7q7Nam+X6r/rYvIDX LGgUo/pVnPAIi40ZxPN7x6/Im+o1JSbzOy3PoZry1j7Pl+KAqpctxk9dW/zkTjkiyz/tk0F6VQ37P eEy3gNg5buM51LzcNEfAX/CfgOuFe8Shu0e1VfmNIp/f6FJ6YyI6I1XgxfihkLklOJ6u/lFAI4Cw5 NqHcrZFHxRzjEsT8X2J8nnqf3pfeGD/aTxR35g7L4YtQnNv5HBuxZ7aJzbCx/X0lmEkyYPrF60lPb hE9fYeyjhya8fkr74pOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iPIsD-00081u-8X; Tue, 29 Oct 2019 04:12:49 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iPIs2-0007zo-P5 for linux-arm-kernel@lists.infradead.org; Tue, 29 Oct 2019 04:12:40 +0000 Received: by mail-pg1-x542.google.com with SMTP id f19so8546544pgn.13 for ; Mon, 28 Oct 2019 21:12:36 -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:content-transfer-encoding:in-reply-to :user-agent; bh=fotQTCwFbUkGmWq3Vfv6xZ57FAEae+iQDNEiUNGXyFA=; b=rnSsf3KEcCyiauJP+dBU6It92AJHO4FKeAHf4yULj5px2zirNuwEj6WeFeUVS/BfN4 yG2fgpEZKrbwiCY9/HlGRBKEg4Odvucywf3sn2BcSZhUTkWujkhrFw5A6aHHeXmL9lQK xf0wIqjNH1sYqBeKxN5OHbrR52ZgyZBAklVxVXsG5xzc/Exxft+TivBLBvQqIIBB7mtt sYJXojKde/nKs2PFakGZiwCdHeOJM6E0XKOyxiWq3rAXeeqGBGWGmHRH9LbXIuR+WcDu GHCb6AjItnZphJuyW+CPvn9qgQIISr0RX6Vm83xfRBMn34d5BKEt+CbRvYz+UEQNHNmj 6hqQ== 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:content-transfer-encoding :in-reply-to:user-agent; bh=fotQTCwFbUkGmWq3Vfv6xZ57FAEae+iQDNEiUNGXyFA=; b=ef4tazNR9QYu0Z3vNkTSu5GnBdDwNSO+Ib9u9sIbG0ik0qKJEyOk5bamVlbGQH8TqH kC3gDc4bZY0oC0XNtOGlWMWNPYOfqTXLGGPlbCbvByBxeMXp6XSgis83vrXvh9kl3osJ 3QuexG++yfTb2fz/ndZ1FaEypIISfffbm5e+imcqrqcbwCyvmWiUg4uydIvW6ZFI9x7u i/KF1hI0zn5XghG/+pxkSY228XCGvdSI0Os7xHXbL4/x8hvIdt+HS5TQA0yD7pl4po9f Xjx2JbiCuxHaJhlItwAn9xk3dnEFlSpX6u1qs/y0PBzZz/se2HsCCDrg298fuqEhWwsd ApUA== X-Gm-Message-State: APjAAAVGpTfn6qS13GjtcN9Hs2K8qNERVuNmOF2krCI9wD+lgMMKbhJH vf/sHPeuVtvarReMlJgUiJ0= X-Google-Smtp-Source: APXvYqzhn7DFilMbyw5b9cTxX4wjvnl0wGuIeOA2ub7dz46QVLXJbdGYxKU0J0WYmxtsidT/2aaW9Q== X-Received: by 2002:a63:1e59:: with SMTP id p25mr24365509pgm.361.1572322356001; Mon, 28 Oct 2019 21:12:36 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id t13sm11663745pfh.12.2019.10.28.21.12.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2019 21:12:35 -0700 (PDT) Date: Mon, 28 Oct 2019 21:12:33 -0700 From: Dmitry Torokhov To: Ondrej Jirman Subject: Re: [PATCH 1/3] input: edt-ft5x06: Add support for regulator Message-ID: <20191029041233.GD57214@dtor-ws> References: <20191029005806.3577376-1-megous@megous.com> <20191029005806.3577376-2-megous@megous.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191029005806.3577376-2-megous@megous.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191028_211238_835760_127E2193 X-CRM114-Status: GOOD ( 18.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, =?iso-8859-1?Q?Myl=E8ne?= Josserand , Greg Kroah-Hartman , Chen-Yu Tsai , Maxime Ripard , Marco Felsch , linux-sunxi@googlegroups.com, Rob Herring , linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org, Andy Shevchenko , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Oct 29, 2019 at 01:58:04AM +0100, Ondrej Jirman wrote: > From: Myl=E8ne Josserand > = > Add the support for enabling optional regulator that may be used as VCC > source. > = > Signed-off-by: Ondrej Jirman > Signed-off-by: Myl=E8ne Josserand Applied, thank you. > --- > drivers/input/touchscreen/edt-ft5x06.c | 30 ++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > = > diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touch= screen/edt-ft5x06.c > index 5525f1fb1526..d61731c0037d 100644 > --- a/drivers/input/touchscreen/edt-ft5x06.c > +++ b/drivers/input/touchscreen/edt-ft5x06.c > @@ -28,6 +28,7 @@ > #include > #include > #include > +#include > = > #define WORK_REGISTER_THRESHOLD 0x00 > #define WORK_REGISTER_REPORT_RATE 0x08 > @@ -88,6 +89,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; > @@ -1036,6 +1038,13 @@ edt_ft5x06_ts_set_regs(struct edt_ft5x06_ts_data *= tsdata) > } > } > = > +static void edt_ft5x06_disable_regulator(void *arg) > +{ > + struct edt_ft5x06_ts_data *data =3D arg; > + > + regulator_disable(data->vcc); > +} > + > static int edt_ft5x06_ts_probe(struct i2c_client *client, > const struct i2c_device_id *id) > { > @@ -1064,6 +1073,27 @@ static int edt_ft5x06_ts_probe(struct i2c_client *= client, > = > tsdata->max_support_points =3D chip_data->max_support_points; > = > + tsdata->vcc =3D devm_regulator_get(&client->dev, "vcc"); > + if (IS_ERR(tsdata->vcc)) { > + error =3D PTR_ERR(tsdata->vcc); > + if (error !=3D -EPROBE_DEFER) > + dev_err(&client->dev, > + "failed to request regulator: %d\n", error); > + return error; > + } > + > + error =3D regulator_enable(tsdata->vcc); > + if (error < 0) { > + dev_err(&client->dev, "failed to enable vcc: %d\n", error); > + return error; > + } > + > + error =3D devm_add_action_or_reset(&client->dev, > + edt_ft5x06_disable_regulator, > + tsdata); > + if (error) > + return error; > + > tsdata->reset_gpio =3D devm_gpiod_get_optional(&client->dev, > "reset", GPIOD_OUT_HIGH); > if (IS_ERR(tsdata->reset_gpio)) { > -- = > 2.23.0 > = -- = Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel