From: Frank Rowand <frowand.list@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
pantelis.antoniou@konsulko.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Alan Tull <atull@kernel.org>
Subject: Re: [PATCH 1/2] of: unittest: add overlay gpio test to catch gpio hog problem
Date: Thu, 20 Feb 2020 12:53:30 -0600 [thread overview]
Message-ID: <aa62a42e-c06a-aa32-955e-dfc26f688eff@gmail.com> (raw)
In-Reply-To: <ff65f982-f71e-5bef-1811-fdb94fd7da2f@gmail.com>
On 2/19/20 5:37 PM, Frank Rowand wrote:
> On 2/19/20 3:56 PM, Rob Herring wrote:
>> On Tue, Jan 28, 2020 at 11:46:04PM -0600, frowand.list@gmail.com wrote:
>>> From: Frank Rowand <frank.rowand@sony.com>
>>>
>>> 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.
>>
>> What's the status of that? I don't want to leave the tests failing at
>> least outside of a kernel release.
>
> I agree. I would like to see my patches applied, showing the test fail,
> immediately followed by Geert's fix. So my series should not go in
> until Geert's patch is ready.
Geert has sent a v2 patch series.
I have sent a v2 of this patch, tested with v2 of Geert's patch series.
-Frank
>
>>
>>>
>>> [1] https://lore.kernel.org/linux-devicetree/20191230133852.5890-1-geert+renesas@glider.be/
>>>
>>> Signed-off-by: Frank Rowand <frank.rowand@sony.com>
>>> ---
>>>
>>> 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_<LEVEL> 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.
>>>
>>> changes since RFC:
>>> - 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
>>>
>>> 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 | 255 ++++++++++++++++++++++++++
>>> 8 files changed, 372 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
>>>
>>> diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile
>>> index 9b6807065827..009f4045c8e4 100644
>>> --- a/drivers/of/unittest-data/Makefile
>>> +++ b/drivers/of/unittest-data/Makefile
>>> @@ -21,7 +21,13 @@ obj-$(CONFIG_OF_OVERLAY) += overlay.dtb.o \
>>> overlay_bad_add_dup_prop.dtb.o \
>>> overlay_bad_phandle.dtb.o \
>>> overlay_bad_symbol.dtb.o \
>>> - overlay_base.dtb.o
>>> + overlay_base.dtb.o \
>>> + overlay_gpio_01.dtb.o \
>>> + overlay_gpio_02a.dtb.o \
>>> + overlay_gpio_02b.dtb.o \
>>> + overlay_gpio_03.dtb.o \
>>> + overlay_gpio_04a.dtb.o \
>>> + overlay_gpio_04b.dtb.o
>>>
>>> # enable creation of __symbols__ node
>>> DTC_FLAGS_overlay += -@
>>> diff --git a/drivers/of/unittest-data/overlay_gpio_01.dts b/drivers/of/unittest-data/overlay_gpio_01.dts
>>> new file mode 100644
>>> index 000000000000..f039e8bce3b6
>>> --- /dev/null
>>> +++ b/drivers/of/unittest-data/overlay_gpio_01.dts
>>> @@ -0,0 +1,23 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>>> +/dts-v1/;
>>> +/plugin/;
>>> +
>>> +&unittest_test_bus {
>>> + #address-cells = <1>;
>>> + #size-cells = <0>;
>>> + gpio_01 {
>>
>> Missing unit address:
>>
>> gpio@0
>
> But my changelog claimed that I fixed that, isn't that
> good enough? :-)
>
> /me pulls big brown paper bag over head.
>
> And the same for all the issues you point out below, for the
> second patch version in a row.
>
> I'll re-spin on 5.6-rc1 and truly include the fixes.
>
> -Frank
>
>
>>
>>
>>> + compatible = "unittest-gpio";
>>> + reg = <0>;
>>> + gpio-controller;
>>> + #gpio-cells = <2>;
>>> + ngpios = <2>;
>>> + gpio-line-names = "line-A", "line-B";
>>> +
>>> + line_b {
>>
>> Don't use '_'.
>>
>> line-b
>>
>>> + gpio-hog;
>>> + gpios = <2 0>;
>>> + input;
>>> + line-name = "line-B-input";
>>> + };
>>> + };
>>> +};
>>> diff --git a/drivers/of/unittest-data/overlay_gpio_02a.dts b/drivers/of/unittest-data/overlay_gpio_02a.dts
>>> new file mode 100644
>>> index 000000000000..cdafab604793
>>> --- /dev/null
>>> +++ b/drivers/of/unittest-data/overlay_gpio_02a.dts
>>> @@ -0,0 +1,16 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>>> +/dts-v1/;
>>> +/plugin/;
>>> +
>>> +&unittest_test_bus {
>>> + #address-cells = <1>;
>>> + #size-cells = <0>;
>>> + gpio_02 {
>>
>> gpio@1
>>
>> ...and a few more.
>>
>>> + compatible = "unittest-gpio";
>>> + reg = <1>;
>>> + gpio-controller;
>>> + #gpio-cells = <2>;
>>> + ngpios = <2>;
>>> + gpio-line-names = "line-A", "line-B";
>>> + };
>>> +};
>>
>
>
next prev parent reply other threads:[~2020-02-20 18:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 5:46 [PATCH 0/2] of: unittest: add overlay gpio test to catch gpio hog problem frowand.list
2020-01-29 5:46 ` [PATCH 1/2] " frowand.list
2020-02-19 21:56 ` Rob Herring
2020-02-19 23:37 ` Frank Rowand
2020-02-20 18:53 ` Frank Rowand [this message]
2020-01-29 5:46 ` [PATCH 2/2] of: unittest: annotate warnings triggered by unittest frowand.list
2020-01-29 6:01 ` [PATCH 0/2] of: unittest: add overlay gpio test to catch gpio hog problem Frank Rowand
2020-01-29 6:02 ` Frank Rowand
2020-01-29 6:03 ` Frank Rowand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa62a42e-c06a-aa32-955e-dfc26f688eff@gmail.com \
--to=frowand.list@gmail.com \
--cc=atull@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=linux-kernel@vger.kernel.org \
--cc=pantelis.antoniou@konsulko.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.