Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp604393pxu; Sun, 25 Oct 2020 10:54:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1WdPyDQEsIMEXi7eQWrY+S/vhu5Pu94ge9jAv8c+6ZdqXT3wS/xMyL1GQIHs33g9v514t X-Received: by 2002:a17:906:5841:: with SMTP id h1mr11896811ejs.342.1603648462218; Sun, 25 Oct 2020 10:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603648462; cv=none; d=google.com; s=arc-20160816; b=vOj8weGqUez5VnRpBy5/xlxoELtTgV5fOr7RGQvU7QmczNvBTQjTDLNyzMxWwOIlpl MZoSKC4SVOimN4z4OgknVY0B6qhRZQZTAKCXVyktrmsa8anHjit4t/mtik7vdZkARA65 gDtoOmqPPBEkTprUXh9qQAlx/hagUsOUsiUD2gekIa9aEvwzdaVdK9J4hxbCRQES7R+U 67yfnJ3PnY/RpJkiRXLOI5PWcevseJ4B6PAQhORPK5MbHD9C5VvoyaD1wPxF+nhxqbua XqtGvQTVHb0iLumugj6qPMskno841V+mN67JyyZlT7oh1nW6EV0+7g/CKwU1Ofj21zHX Plwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WeS81+img7GaZvJjPDyZ+olk5wvegDJJPWSHbohGVrs=; b=mMc8rysb72BUAWpFHPYYqsuvwmyukysMeejysZnCJouTHSedE83DBPTQezm6z8JK6D fQNdmx6/u4zRK2G0eKWekUP+f4uzx1yCJsXDkVKWvDVZEqMJkoJWs9PtKRqHNHs4OOPL EMKZdmPXGbwDwKBSUqtfB+9wvuDkW/+NrPEONpsRzyAvXgjq4gvaOogW9qyMm0FJYCCG 00/fXHXjS+VONwGJWhi5Z7JjGdaouLfNrMzczC/+jbBOGzkLqYPkHMK7Jrel4gR0He6a kKnusYHJFQa5hMuLCUV2qgPTTt2ZnZ0qr+Anv65/vhTfnu/jUgIraQfDhEWHaLHRjhZi EvBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HD4do+25; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si6920467ejx.254.2020.10.25.10.54.00; Sun, 25 Oct 2020 10:54:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HD4do+25; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1417554AbgJYRMg (ORCPT + 99 others); Sun, 25 Oct 2020 13:12:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732431AbgJYRMg (ORCPT ); Sun, 25 Oct 2020 13:12:36 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88179C061755; Sun, 25 Oct 2020 10:12:34 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id e7so4790377pfn.12; Sun, 25 Oct 2020 10:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WeS81+img7GaZvJjPDyZ+olk5wvegDJJPWSHbohGVrs=; b=HD4do+251venKNTAcmZyC2yWlT70smOO53vD2jMenjecxpwYg9RYghaixm9vxEsR+G VC5UdY2d9j2Dbtt5TXdGd7MoWvYJW6VQNInb1XVxbqhYedkbRvBy+BkFZoDqY5V8UXAx Fg2IzG/eHvoW/C000g5Hw+fpNZU2gGSKHWJNPOD7IfUVFM0mWDns8CM7g2Pj8J48vjJr kI3YAa3RAsroeoS+zsQ4M8B/LivC/hzb0yCeji3Xoa5RUBjcONn8MzlNdHSCzUnCQRIU fQFYd5wh+UtIqtoEehqeWoBGRoHA9BaKUPCgipd4+MTaB5k8GCanksAuOCxqiLTUi4B6 73/g== 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=WeS81+img7GaZvJjPDyZ+olk5wvegDJJPWSHbohGVrs=; b=NoIVJl7RKj0K8dUZuvEKximaOMO5HcBO+yErvwJdRMPmIlgewIH1J7lqWDDJGcZY4i d0RM011ccUzpHS6ia4Q/RkcixCZQT+u71uxW+T35ba2oLP/8LI8El9pOGEvfPta1msqI 31a9gLZJn/oIY4GKAAW3Cp2+/xm1WEOL61EiTI0Lpst0FynIb5g8q5ximlN8muh9QqI4 BvvgPuwqP3SgeDU2kTuKCBZvjs8X9O7N1tG7fVfRhjSUQXde48ujlnOFYc66diwP6HNX bl41ytNpLlsRgqKkuaS7W9wiBYxb5KqVs56Z3BG3v2Oyqf9H4kvt3Xo1ZNpLTR8Jnh1/ zy8w== X-Gm-Message-State: AOAM532lzx2G5Asmul9g1qc+OFDsnSAA3mFYqkip/3sXdufi1vuCeSTN JNC2apTyqrhGy9oQKw3nAMpl/flck9nRHPTOZDzO/26NpcU= X-Received: by 2002:a65:47c2:: with SMTP id f2mr10328252pgs.4.1603645953639; Sun, 25 Oct 2020 10:12:33 -0700 (PDT) MIME-Version: 1.0 References: <20201024061552.4497-1-coiby.xu@gmail.com> In-Reply-To: <20201024061552.4497-1-coiby.xu@gmail.com> From: Andy Shevchenko Date: Sun, 25 Oct 2020 19:12:16 +0200 Message-ID: Subject: Re: [PATCH] pinctrl: amd: print debounce filter info in debugfs To: Coiby Xu Cc: "open list:GPIO SUBSYSTEM" , Linus Walleij , Hans de Goede , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 24, 2020 at 2:32 PM Coiby Xu wrote: > > Print out the status of debounce filter as follows, > $ cat /sys/kernel/debug/gpio|grep pin130 > pin130 interrupt is disabled| interrupt is masked| disable wakeup in S0i3 state| disable wakeup in S3 state| > disable wakeup in S4/S5 state| input is high| pull-up is disabled| Pull-down is disabled| output is disabled| debouncing filter (high) enabled| debouncing timeout is 124800 (us)| 0x503c8 > + if (!tmr_large) { > + if (!tmr_out_unit) > + unit = 61; > + else > + unit = 244; > + } else { > + if (!tmr_out_unit) > + unit = 15600; > + else > + unit = 62500; > + } In all three if:s can you use positive conditionals? -- With Best Regards, Andy Shevchenko