From: Octavian Purdila <octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "Rafael J. Wysocki" <rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org>,
Len Brown <lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Matt Fleming
<matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Joel Becker <jlbec-aKy9MeLSZ9dg9hUCZPvPmw@public.gmane.org>,
"linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-spi <linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Irina Tirdea
<irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [RFC PATCH v2 06/10] spi: add support for ACPI reconfigure notifications
Date: Wed, 4 May 2016 18:04:45 +0300 [thread overview]
Message-ID: <CAE1zotJ1FKNdxCqV_XRUJrFB-fqHpBr54rj3C65ZM80h7=t3DQ@mail.gmail.com> (raw)
In-Reply-To: <20160503121954.GQ6292-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
On Tue, May 3, 2016 at 3:19 PM, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Thu, Apr 28, 2016 at 10:37:57PM +0300, Octavian Purdila wrote:
>> On Thu, Apr 28, 2016 at 8:42 PM, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>
>> > There's more code here now than I remember but this all looks *really*
>> > close to the DT code except for the OF_POPULATED flag that we set when
>> > things are instantiated in DT. The duplication seems bad but the fact
>> > that we're missing the flag worries me... do we have guarantees that
>> > ACPI won't double register?
>
>> We use the adev->flags.visited to check when a device has been already
>> enumerated, and we skip registering a new SPI slave in that case.
>
> OK, but the fact that I need to know that isn't exactly thrilling -
> that's really the issue with the not quite duplication here. It's not
> just if the code works but also the maintainability.
I agree that this is unfortunate. I could not find a common path for
both device tree and ACPI. Perhaps when we remove of_node from struct
device and move to fwnode we could remove some duplication.
I can add a couple of comments around acpi_device_enumerated() and
adev->flags.visited = true; to make it clear that we won't double
enumerate. Will that help?
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-05-04 15:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 22:38 [RFC PATCH v2 00/10] ACPI overlays Octavian Purdila
2016-04-19 22:38 ` [RFC PATCH v2 01/10] kernel: add TAINT_OVERLAY_ACPI_TABLE Octavian Purdila
2016-04-19 22:39 ` [RFC PATCH v2 02/10] acpi: decouple initrd table install from CONFIG_ACPI_INITRD_TABLE_OVERRIDE Octavian Purdila
2016-04-19 22:39 ` [RFC PATCH v2 03/10] acpi: fix enumeration (visited) flags for bus rescans Octavian Purdila
2016-04-19 22:39 ` [RFC PATCH v2 04/10] acpi: add support for ACPI reconfiguration notifiers Octavian Purdila
2016-04-19 22:39 ` [RFC PATCH v2 05/10] i2c: add support for ACPI reconfigure notifications Octavian Purdila
[not found] ` <1461105548-20618-6-git-send-email-octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-04-21 21:27 ` Andy Shevchenko
2016-04-21 21:41 ` Octavian Purdila
2016-04-28 14:58 ` Mika Westerberg
2016-04-19 22:39 ` [RFC PATCH v2 06/10] spi: " Octavian Purdila
[not found] ` <1461105548-20618-7-git-send-email-octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-04-28 15:00 ` Mika Westerberg
2016-04-28 17:42 ` Mark Brown
2016-04-28 19:37 ` Octavian Purdila
2016-05-03 12:19 ` Mark Brown
[not found] ` <20160503121954.GQ6292-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-05-04 15:04 ` Octavian Purdila [this message]
2016-04-19 22:39 ` [RFC PATCH v2 07/10] efi: load SSTDs from EFI variables Octavian Purdila
2016-05-09 4:13 ` Jon Masters
[not found] ` <da0e65ef-7c04-e274-2f15-a50daa8c4c8c-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-09 9:59 ` Octavian Purdila
2016-04-19 22:39 ` [RFC PATCH v2 08/10] acpi: add support for configfs Octavian Purdila
2016-04-19 22:39 ` [RFC PATCH v2 09/10] acpi: add support for loading SSDTs via configfs Octavian Purdila
2016-04-19 22:39 ` [RFC PATCH v2 10/10] HACK: acpi: configfs: add unload_hanlde_path attribute for tables Octavian Purdila
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='CAE1zotJ1FKNdxCqV_XRUJrFB-fqHpBr54rj3C65ZM80h7=t3DQ@mail.gmail.com' \
--to=octavian.purdila-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=jlbec-aKy9MeLSZ9dg9hUCZPvPmw@public.gmane.org \
--cc=lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
--cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).