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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DE57C433F5 for ; Thu, 18 Nov 2021 12:53:51 +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 D1A4E61101 for ; Thu, 18 Nov 2021 12:53:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D1A4E61101 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6IeA9fg3eEWr7I6505CHujT2Ot/gPmWMEv1ScLWbXYg=; b=TfFIN+2AiF3wvh SE4LClybJis26/k/hMR0T+04z1TzI7lJbmOJS351zOdqDgD40klx9qCdKadGBzovO7hHIh/4FFyAS T5WwokT3ND2fqDOvEjGalc8rAnkQ/qM74AZ7LU/ZPkt8n256LXlf4SQRr69NYYYkT/jqOPt/50thI SWjD0pRqVPZ8EsUJJj2IHp13R9cLU3/CaQ58GQpfOU9B7NpQsmSvEMCZhDrI3C/rmYv7G9yAvClfl R9+z6E6S9jdS7siQ/bV5DJfcZ7HEHi3xRCmQSc8xvYcVXkdScRThSaK9H8KcRrVQUGjUmxCbZVsE3 5ZN/xlNe2ZbHSvN8RDdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mngti-007n3t-PS; Thu, 18 Nov 2021 12:52:14 +0000 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mngtf-007n2y-Sy for linux-arm-kernel@lists.infradead.org; Thu, 18 Nov 2021 12:52:13 +0000 Received: by mail-io1-xd34.google.com with SMTP id z18so7746623iof.5 for ; Thu, 18 Nov 2021 04:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hh6WFJbrjkxar19GKDaTBBspe0IRHAyuOKu9Kp1/cDA=; b=NAaZpLeTqNCDp9En3qKeDV5jszC/FGakNoK2ytbCmZW+lejAcmA5cI6Q4fuL4FOYb7 LRL2Hsem5g57/046Ey+oMb/iF/siq0c1KP7u6LNHjV7A5caPk5/GhZCAkeEhHR4wS4m2 Eo2AVgLV4/6MjpgndbJvMzcjWJ7rXynYAVJ668HrIGTlPijmRCI8II8FHwRebickVqO+ VsULr0vxbzChoMLpscGhjanlIhUzyGw2Hieg2cX/jjp4X7TJ5PSuDTg8uNFLKOOFDjrp FJjGNL2TqAj3ASsKORgfKNqDlxE7UnhiRUhWD9sRf8kNEli66/xHyVFYV/kOehOetaws Bqyw== 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=hh6WFJbrjkxar19GKDaTBBspe0IRHAyuOKu9Kp1/cDA=; b=MBJeXQcOetHCKIY7ciKmmJhfDymIYU3xV7NHpG5ICxdgzlJB6iC0XpuNza1QbkmmSI kKTrqL9u3YZYaRk41XQfOY6RHDpcoDqJitIDBtHJiQX211ugb/nQ3efFMBmg/GTaXMJO c7/ZyOz8WJFVX73CePxLYMZDK7aLroa+sZAttOW9OwdbeC3LEIpFrdV+jejC80mGnfMx XL5V1mqQTqlueki2yG8hRLra5BlIZbSKhOuH06rHoOawYMNHRwUC6gbkyAVXhQOQdZfw kyZyBOM1Urpwfp7SHj+lgO1k1I/NqWuB2ijjHkKWr4Bf6DJ+7SADnu4iWOIxSh3rsYi3 kiCg== X-Gm-Message-State: AOAM530eh27ljDdyy4lUKHkoUIAChmkIoz83n2ojuD7EBbSyuRRYWqrF kvFRnelRf6RhRP9lA82IuV3ViTVfV8M+AJVXNuk= X-Google-Smtp-Source: ABdhPJx5EhnYWpEZOUik32wYJq838uTveeLUrceUgABJecPHCC8kS5Dj+aDby9ceIVI2hoeZIGAm/F7LdcA47MkjDhQ= X-Received: by 2002:a05:6602:204e:: with SMTP id z14mr17452585iod.90.1637239927727; Thu, 18 Nov 2021 04:52:07 -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: From: Alistair Francis Date: Thu, 18 Nov 2021 22:51:41 +1000 Message-ID: Subject: Re: [PATCH v2 2/4] Documentation: DT: bindings: input: Add documentation for cyttsp5 To: Linus Walleij Cc: Andreas Kemnade , Alistair Francis , linux-arm-kernel , devicetree , linux-input , Linux Kernel Mailing List , Mylene Josserand , Henrik Rydberg , Dmitry Torokhov , Rob Herring X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211118_045211_976442_DEFD9967 X-CRM114-Status: GOOD ( 18.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 12, 2021 at 1:16 AM Linus Walleij wrote: > > 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. Thanks! I have fixed this Alistair > > Yours, > Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09E03C433F5 for ; Thu, 18 Nov 2021 12:56:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E870C61ABA for ; Thu, 18 Nov 2021 12:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245105AbhKRM7N (ORCPT ); Thu, 18 Nov 2021 07:59:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244640AbhKRM5r (ORCPT ); Thu, 18 Nov 2021 07:57:47 -0500 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55073C0797BD; Thu, 18 Nov 2021 04:52:08 -0800 (PST) Received: by mail-io1-xd2f.google.com with SMTP id x10so7734751ioj.9; Thu, 18 Nov 2021 04:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hh6WFJbrjkxar19GKDaTBBspe0IRHAyuOKu9Kp1/cDA=; b=NAaZpLeTqNCDp9En3qKeDV5jszC/FGakNoK2ytbCmZW+lejAcmA5cI6Q4fuL4FOYb7 LRL2Hsem5g57/046Ey+oMb/iF/siq0c1KP7u6LNHjV7A5caPk5/GhZCAkeEhHR4wS4m2 Eo2AVgLV4/6MjpgndbJvMzcjWJ7rXynYAVJ668HrIGTlPijmRCI8II8FHwRebickVqO+ VsULr0vxbzChoMLpscGhjanlIhUzyGw2Hieg2cX/jjp4X7TJ5PSuDTg8uNFLKOOFDjrp FJjGNL2TqAj3ASsKORgfKNqDlxE7UnhiRUhWD9sRf8kNEli66/xHyVFYV/kOehOetaws Bqyw== 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=hh6WFJbrjkxar19GKDaTBBspe0IRHAyuOKu9Kp1/cDA=; b=g9bouWw28NpsMCpdAZI/ze1Rug6OeZyrSt/ItwRtzOKWw0eNf4Qjay0Aq571OJtpOP t4mFC8oXK/lgSzBHXcjEFENNAUa2CyosxLuYIdXhfkqjwyPOwPxgzMdeWqqN9P3c5i+5 e6WXcKzqnQgZNHoz7a9Fb0UQlA/6hCZgyjELsxPHc4Z/fuptyNSDg1odeYRuElLTuzsU k4BCW+bj2p00nzWGQU7Y6mg8LVMPWmvfS7J+z/OArLe0D8EZnH2zP1xCWYQivfhJEnnp VIxKaWuA2Qaqm3wnoULMvxeGz9Iqk0oYlhw9Zfbv1cDje5me5MqRSsB1kLEYhXQ4UvnV NrZw== X-Gm-Message-State: AOAM530z5plKpCBOtzE/lb4o0G1yTowQ4/MfWJ4dhADjEbcAxoe4cPmc ov5VOp/hxGB93dBIp85a43JAtDLISfwqFt40C/d2pw+KZPTYONgC X-Google-Smtp-Source: ABdhPJx5EhnYWpEZOUik32wYJq838uTveeLUrceUgABJecPHCC8kS5Dj+aDby9ceIVI2hoeZIGAm/F7LdcA47MkjDhQ= X-Received: by 2002:a05:6602:204e:: with SMTP id z14mr17452585iod.90.1637239927727; Thu, 18 Nov 2021 04:52:07 -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: From: Alistair Francis Date: Thu, 18 Nov 2021 22:51:41 +1000 Message-ID: Subject: Re: [PATCH v2 2/4] Documentation: DT: bindings: input: Add documentation for cyttsp5 To: Linus Walleij Cc: Andreas Kemnade , 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 Fri, Nov 12, 2021 at 1:16 AM Linus Walleij wrote: > > 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. Thanks! I have fixed this Alistair > > Yours, > Linus Walleij