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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 369DBC07E94 for ; Fri, 4 Jun 2021 07:39:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 156BC613AC for ; Fri, 4 Jun 2021 07:39:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230139AbhFDHlC (ORCPT ); Fri, 4 Jun 2021 03:41:02 -0400 Received: from mail-lj1-f180.google.com ([209.85.208.180]:41732 "EHLO mail-lj1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbhFDHlC (ORCPT ); Fri, 4 Jun 2021 03:41:02 -0400 Received: by mail-lj1-f180.google.com with SMTP id p20so10361139ljj.8 for ; Fri, 04 Jun 2021 00:39:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yOwepKabhCPmKTPr0etztsIVO+a68VfMgdxaEubWJlE=; b=rwB7ox9tYomxWvX8pOfPH2vYKaZ4BWEM2T9a6uudPWtrOMTNqFZDsdL2981Y056vxm HRQLogEbfa/4mVpEhWpRC56BLtBUGXZcDNUA6arITkh1ql1/EkX9i3/G/0WWzqMm0QbM kN67G7QyB8pGEdd1ImDTzHKF5WXDpgzAPrBla8dbgMBaM1Kuc18Ps3qy61TdQ7725Hng xU+MEkKCFa0kYrg6PDT1KE6cEdVfVHvsWgf7eWdqHWR7FV/w/tdiCG7hYT62flgmu27/ 8F/XSBfH5LhLnD2ey80QH2BJ1BL5SIY00mH5qlo5CqzJU4cW5nGUiXd/Yc5Xh09npXvd nJmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yOwepKabhCPmKTPr0etztsIVO+a68VfMgdxaEubWJlE=; b=ornXvutpYpgmVEa7c45Sv5TXk9/u3Yhzc2TpK1Qjl2J2tog1hxPxLl9JpPoJsPmg44 JraXIQV0IXLAC7DdEqTaXRbLRgU5wjgeirFfbO8aPf9ZO2Flc1yiNlWF4aByvD1CjQ/m pp+vH0zWzZtZ3KKGIrBUWioyGweM8T/JGLfTez1MkECRjjxJN35UV4N2DWj0txECYJ6I yAjWHefA7oup8iuusmKqIihRWXSID5t6lBleaagUg1FgnkrfvKJv0c22wC9raLdI2WoY MLyX6KRCpIy6CvpLTlRYCFVpfw2bvHM7sIhqvAxQ5f0hpTDaQjbpExYdcaqVkUYOdI8s 887w== X-Gm-Message-State: AOAM533ZKJb3y2RWuchydP171Z28qn5msL4ZaXxo5esRxGW5LJwMZQNM L5iPAEMIVyMbySUykDO4XqNjhhKHealTcvmt6vSFEg== X-Google-Smtp-Source: ABdhPJzIdQWpOrgRv6RLNJ0NrzNffeoHpg0DZsixNT0uYWD8v+BKejrVg5yCVhJ+QA3/sha9tPbGYfCHi5I0O691tBY= X-Received: by 2002:a2e:1319:: with SMTP id 25mr2511427ljt.200.1622792295347; Fri, 04 Jun 2021 00:38:15 -0700 (PDT) MIME-Version: 1.0 References: <20210603043726.3793876-1-dmitry.torokhov@gmail.com> <20210603043726.3793876-7-dmitry.torokhov@gmail.com> In-Reply-To: <20210603043726.3793876-7-dmitry.torokhov@gmail.com> From: Linus Walleij Date: Fri, 4 Jun 2021 09:38:04 +0200 Message-ID: Subject: Re: [PATCH 7/7] Input: cy8ctmg110_ts - switch to using gpiod API To: Dmitry Torokhov Cc: Linux Input , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 3, 2021 at 6:37 AM Dmitry Torokhov wrote: > Instead of legacy gpio API let's use newer gpiod API. This also allows us > to get rid of platform data. > > Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij > static void cy8ctmg110_power(struct cy8ctmg110 *ts, bool poweron) > { > - if (ts->reset_pin) > - gpio_direction_output(ts->reset_pin, 1 - poweron); > + if (ts->reset_gpio) > + gpiod_set_value_cansleep(ts->reset_gpio, !poweron); I would perhaps drop in a comment that this de-asserts the RESET line when we power on and asserts it when we power off. > + ts->reset_gpio = devm_gpiod_get_optional(&client->dev, NULL, > + GPIOD_OUT_HIGH); And here that this will assert RESET. But that is just nitpicks, the code is fine. Yours, Linus Walleij