Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0DFCC433F5 for ; Thu, 11 Nov 2021 15:16:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C8890603E9 for ; Thu, 11 Nov 2021 15:16:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233817AbhKKPTo (ORCPT ); Thu, 11 Nov 2021 10:19:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230177AbhKKPTj (ORCPT ); Thu, 11 Nov 2021 10:19:39 -0500 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69071C061766 for ; Thu, 11 Nov 2021 07:16:50 -0800 (PST) Received: by mail-ot1-x335.google.com with SMTP id b5-20020a9d60c5000000b0055c6349ff22so9261605otk.13 for ; Thu, 11 Nov 2021 07:16:50 -0800 (PST) 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=FhB8iItBejzwjrEa1loJueZ9ZXnRDY7hXmZta29xgJ4=; b=RHhhmajT9R6bgHbRESc2fgGIJLv2CWFiaAkYb1xPPG+nNOQf6SpbKlUAhc5IufiRDY BU7qnZ6QjGBz57yN5sG5Sv9pkFHUKy8UAZDWTsBRmPn0wcv7vfBPaIfQ4OpqYMcnbFZ/ wnxZubBSMhKfY1ILz9ikdxOvzGUNqtZTIBgAvTqI8JIamxhHi3KkMmZZOQiaqhkHqKL6 ql6hLDx8Za/XsD5qQzjpDOvGZeRpSBm5LQlBMqBxxc2MyDhf9metgDRpPNJsafGIkpb/ +LRDXHoJoRF3Aw0MB4odMuCncLgN7Ws/hK8JaZnSoTn+y1q0yKjdzUPD1sCTTlF4wFeO sJLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FhB8iItBejzwjrEa1loJueZ9ZXnRDY7hXmZta29xgJ4=; b=AAK0osIbeSDCnkis5pvSIESlLBtfluZGxjITQ5uv2G/+pKSUEfrnoaYn9nU9cQ6UZp juV8hOOCldYmo8MLrEkmJzK46gvQrLJ09cHhSaBJYbVlc8MLj0O3I1Rmufb2kJbdIi/l hwe2KvG4YscwSVdmnja5tXx22cbtqRodITAfIUAwqIkG7fanO/FAQhRMH6pBU5Jr28mA IWl9i1GJnyHlsnLfv6nSSkcn3lTCTalLwECFDe3v0U/N0Ng8g8nt7naWCg2CLwXhvjuO a9swWGI0Z1DXvix29nBBJYNwuystPqXZgJWNsIxWTGmskhP6waeVilWs3mR2+zP7k7zj O+Qg== X-Gm-Message-State: AOAM533S7KeC1jK7dkNSzxmFqfmTO7vUBkGDNVYINX+lBOljItSr2viq nxEKNv4g+/lM/nICd/m4XcZH+Ll5o3DIy47plxJmfw== X-Google-Smtp-Source: ABdhPJxYcwHKiOWs+DTPgi9NESiPf7NVzw/HdlcpYLb2qQtA0XFzifD249u7EjiXWMyo/n0b8DRsmXxQk9rPwf2aPd4= X-Received: by 2002:a9d:6348:: with SMTP id y8mr6611657otk.179.1636643809760; Thu, 11 Nov 2021 07:16:49 -0800 (PST) MIME-Version: 1.0 References: <20211103114830.62711-1-alistair@alistair23.me> <20211103114830.62711-3-alistair@alistair23.me> <20211105152154.20f5cbd1@aktux> <20211110183654.61328998@kemnade.info> In-Reply-To: <20211110183654.61328998@kemnade.info> From: Linus Walleij Date: Thu, 11 Nov 2021 16:16:37 +0100 Message-ID: Subject: Re: [PATCH v2 2/4] Documentation: DT: bindings: input: Add documentation for cyttsp5 To: Andreas Kemnade Cc: Alistair Francis , Alistair Francis , linux-arm-kernel , devicetree , linux-input , Linux Kernel Mailing List , Mylene Josserand , Henrik Rydberg , Dmitry Torokhov , Rob Herring Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 10, 2021 at 6:37 PM Andreas Kemnade wrote: > Alistair Francis wrote: > You have a kind of double inversion here, so things are automagically fixed. > IMHO to describe it correctly would be to set GPIO_ACTIVE_LOW here > and in the driver > > /* Reset the gpio to be in a reset state */ > ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); > if (IS_ERR(ts->reset_gpio)) { > rc = PTR_ERR(ts->reset_gpio); > dev_err(dev, "Failed to request reset gpio, error %d\n", rc); > return rc; > } > gpiod_set_value(ts->reset_gpio, 0); > > That is the way how other active-low reset lines are handled. Correct. This is a source of confusion, I contemplated just changing the name of GPIOD_OUT_HIGH to GPIOD_OUT_ASSERTED etc to indicate what is going on. gpiod_set_value(ts->reset_gpio, 0) should similarly be interpreted as "de-assert this line" no matter the polarity. Yours, Linus Walleij