Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp59452ybf; Wed, 26 Feb 2020 08:48:14 -0800 (PST) X-Google-Smtp-Source: APXvYqxqY8y+9RLjJeMNgMkwJ4vZ8Xjj76lQhycGi8j/a1rW01RppJm07pMf5GewDhWCBrJ/VffH X-Received: by 2002:aca:d4ca:: with SMTP id l193mr4050004oig.133.1582735694756; Wed, 26 Feb 2020 08:48:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582735694; cv=none; d=google.com; s=arc-20160816; b=CEUeMmE3WkAReV1bbkUaVj4w2e1+P/yFv81nIuYyMLcXpPOKE9z3wc2i23oi8nLvUj KDZucR99pA7IlEgiRcoM8oMd7Ygs1qDBhaQnayzaF4VuTC59ZGzzmyYOsfycdfj0MQ/q nF00Ge4IEHuImZGZLRvYXSvpJFiMPkuEzrtHOYJzgMcbBRqmVjf++geHTsIftFlMt8qP L+JJjdK81OCm0XvMnomnxUqR17zNRh+vfUDNy4k861zuvA+4aDd4bg2OkUWecCtUuQJQ ZzFoGS/jXVTkzgjYmTMLAffss8iwhP+p/gdDysOWiElG3JJM0AEd/FTGME9suTXu5f4S RYWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3FWdu8yiFNXhep3Pm+PE/WEngzA4h1YnchL3v9C5QE0=; b=KCDxNk8nCK53UqTeyOu6tHxyCnHfPiPOA8dWhIVVzSUxlPEj6J0gFhb1BHLYZA0RSy KFMcXMawzrMGrl/z2kvhNCodu0V7bBNAzYjTpLwYEwxzkK6YxHUtsxSvgeHbq2u1AXWr BTLlA3MQzOOcPH3ned8HC3tB6pyKVeLblSEdF3QBc31uqq+1qJ5nVx7hdXbxOtpgfHgn 8QMfJdMDwQN8Xky7ilreDwjJxEbKZiNaDzyRJNQpBAG9j4IM1/od0gsbUDMcslSHrvm6 RH0vMjHGcFKaAS7mPwctvNa+r/dEgJWp2cvV4dnLn1DF9A+BGO5wF2z8r5DyO2wDkUoN +6Fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p23si66252otk.119.2020.02.26.08.48.02; Wed, 26 Feb 2020 08:48:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727141AbgBZQmL (ORCPT + 99 others); Wed, 26 Feb 2020 11:42:11 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:38948 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbgBZQmL (ORCPT ); Wed, 26 Feb 2020 11:42:11 -0500 Received: by mail-ot1-f66.google.com with SMTP id 77so13334oty.6; Wed, 26 Feb 2020 08:42:09 -0800 (PST) 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:in-reply-to:user-agent; bh=3FWdu8yiFNXhep3Pm+PE/WEngzA4h1YnchL3v9C5QE0=; b=PZpOaVbOKmfNUS1IQSKMatfNDgdRbWe7fLGJAeL3l6ayQQsHBdIaqyF8jz4bvPKKxp ADIwNOLJm5AVtlxGS2HtO1K9w3HtEUEVYY68YuRbvxZByaIFeDlhd2I10FDV9pw888Al LzXyLz62w5fHAfK+v9KDGIj6i0DAHwRabNEC2YYEBkUr5XkZEQmsCQ+/IGYhj9ksjFCP 7ybbce58scmATK4akqHO39RB9KWbN8NZ6iodv/xmW9NCXMTpMS2oncNA+0UmcdBTLOZh 0fhXiqUVs4f88e1lIVS8cAlbleKnxlYRW8+ZiSlRZp+ZvCO8WUWEfcjc8P0EiavyfX/+ mmBA== X-Gm-Message-State: APjAAAUif5nUoBf0jAFSDz9k8yBiNE9KGfv3NQJEHweTVOYVU16wzLUN TNXIzxZOWifYglythKAhig== X-Received: by 2002:a9d:7613:: with SMTP id k19mr2222391otl.144.1582735328617; Wed, 26 Feb 2020 08:42:08 -0800 (PST) Received: from rob-hp-laptop (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id b4sm946300oie.55.2020.02.26.08.42.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 08:42:07 -0800 (PST) Received: (nullmailer pid 10219 invoked by uid 1000); Wed, 26 Feb 2020 16:42:06 -0000 Date: Wed, 26 Feb 2020 10:42:06 -0600 From: Rob Herring To: frowand.list@gmail.com Cc: Geert Uytterhoeven , pantelis.antoniou@konsulko.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alan Tull Subject: Re: [PATCH v2 1/2] of: unittest: add overlay gpio test to catch gpio hog problem Message-ID: <20200226164206.GA10128@bogus> References: <1582224021-12827-1-git-send-email-frowand.list@gmail.com> <1582224021-12827-2-git-send-email-frowand.list@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1582224021-12827-2-git-send-email-frowand.list@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Feb 2020 12:40:20 -0600, frowand.list@gmail.com wrote: > From: Frank Rowand > > Geert reports that gpio hog nodes are not properly processed when > the gpio hog node is added via an overlay reply and provides an > RFC patch to fix the problem [1]. > > Add a unittest that shows the problem. Unittest will report "1 failed" > test before applying Geert's RFC patch and "0 failed" after applying > Geert's RFC patch. > > [1] https://lore.kernel.org/linux-devicetree/20191230133852.5890-1-geert+renesas@glider.be/ > > Signed-off-by: Frank Rowand > --- > > changes since v1: > - base on 5.6-rc1 > - fixed node names in overlays > - removed unused fields from struct unittest_gpio_dev > - of_unittest_overlay_gpio() cleaned up comments > - of_unittest_overlay_gpio() moved saving global values into > probe_pass_count and chip_request_count more tightly around > test code expected to trigger changes in the global values > > v1 of this patch incorrectly reported that it had made changes > since the RFC version, but it was mistakenly created from the > wrong branch. > > There are checkpatch warnings. > - New files are in a directory already covered by MAINTAINERS > - The undocumented compatibles are restricted to use by unittest > and should not be documented under Documentation > - The printk() KERN_ warnings are false positives. The level > is supplied by a define parameter instead of a hard coded constant > - The lines over 80 characters are consistent with unittest.c style > > This unittest was also valuable in that it allowed me to explore > possible issues related to the proposed solution to the gpio hog > problem. > > > drivers/of/unittest-data/Makefile | 8 +- > drivers/of/unittest-data/overlay_gpio_01.dts | 23 +++ > drivers/of/unittest-data/overlay_gpio_02a.dts | 16 ++ > drivers/of/unittest-data/overlay_gpio_02b.dts | 16 ++ > drivers/of/unittest-data/overlay_gpio_03.dts | 23 +++ > drivers/of/unittest-data/overlay_gpio_04a.dts | 16 ++ > drivers/of/unittest-data/overlay_gpio_04b.dts | 16 ++ > drivers/of/unittest.c | 253 ++++++++++++++++++++++++++ > 8 files changed, 370 insertions(+), 1 deletion(-) > create mode 100644 drivers/of/unittest-data/overlay_gpio_01.dts > create mode 100644 drivers/of/unittest-data/overlay_gpio_02a.dts > create mode 100644 drivers/of/unittest-data/overlay_gpio_02b.dts > create mode 100644 drivers/of/unittest-data/overlay_gpio_03.dts > create mode 100644 drivers/of/unittest-data/overlay_gpio_04a.dts > create mode 100644 drivers/of/unittest-data/overlay_gpio_04b.dts > Applied, thanks. Rob