From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "Muhammad Usama Anjum" <usama.anjum@collabora.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Len Brown" <lenb@kernel.org>,
"Hans de Goede" <hdegoede@redhat.com>,
"Mark Gross" <markgross@kernel.org>,
"Benson Leung" <bleung@chromium.org>,
"Enric Balletbo i Serra" <eballetbo@gmail.com>,
"Collabora Kernel ML" <kernel@collabora.com>,
groeck@chromium.org, dtor@chromium.org, gwendal@chromium.org,
vbendeb@chromium.org, andy@infradead.org,
"Ayman Bagabas" <ayman.bagabas@gmail.com>,
"Benjamin Tissoires" <benjamin.tissoires@redhat.com>,
"Blaž Hrastnik" <blaz@mxxn.io>,
"Darren Hart" <dvhart@infradead.org>,
"Jeremy Soller" <jeremy@system76.com>,
"Mattias Jacobsson" <2pi@mok.nu>,
"Mauro Carvalho Chehab" <mchehab+samsung@kernel.org>,
"Rajat Jain" <rajatja@google.com>,
"Srinivas Pandruvada" <srinivas.pandruvada@linux.intel.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
chrome-platform@lists.linux.dev
Subject: Re: [PATCH v12] platform/chrome: Add ChromeOS ACPI device driver
Date: Thu, 12 May 2022 12:22:05 +0200 [thread overview]
Message-ID: <YnzfzRhGwtO9RtNi@kroah.com> (raw)
In-Reply-To: <YnzdDMPR3qZ1waJW@google.com>
On Thu, May 12, 2022 at 03:10:20AM -0700, Dmitry Torokhov wrote:
> Hi Muhammad,
>
> On Thu, May 12, 2022 at 10:34:29AM +0500, Muhammad Usama Anjum wrote:
> > +static int chromeos_acpi_device_probe(struct platform_device *pdev)
> > +{
> > + chromeos_acpi_gpio_groups = get_gpio_pkg_num(&pdev->dev);
> > +
> > + /*
> > + * If the platform has more GPIO attribute groups than the number of
> > + * groups this driver supports, give out a warning message.
> > + */
> > + if (chromeos_acpi_gpio_groups > ARRAY_SIZE(chromeos_acpi_all_groups) - 2)
> > + dev_warn(&pdev->dev, "Only %zu GPIO attr groups supported by the driver out of total %u.\n",
> > + ARRAY_SIZE(chromeos_acpi_all_groups) - 2, chromeos_acpi_gpio_groups);
>
> I know that we can bikeshed this until dawn of time, but we are dealing
> here with data coming from the system firmware and a singleton device,
> so it should be all available pretty early in boot sequence. I
> understand we want to solve the "race" even though it is purely
> theoretical, but we should be able to figure out what gpios are
> supported and construct the groups array(s) before registering the
> platform driver. Or do we see that runtime costs of constricting groups
> dynamically outweigh space wasted by unused groups?
I really really do not like dynamically created groups as it's more
complex and fragile. This is much simpler code overall.
thanks,
greg k-h
next prev parent reply other threads:[~2022-05-12 10:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 5:34 [PATCH v12] platform/chrome: Add ChromeOS ACPI device driver Muhammad Usama Anjum
2022-05-12 10:10 ` Dmitry Torokhov
2022-05-12 10:22 ` Greg Kroah-Hartman [this message]
2022-05-12 10:33 ` Andy Shevchenko
2022-05-12 10:51 ` Rafael J. Wysocki
2022-05-12 14:49 ` Guenter Roeck
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=YnzfzRhGwtO9RtNi@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=2pi@mok.nu \
--cc=andy@infradead.org \
--cc=ayman.bagabas@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=blaz@mxxn.io \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=dmitry.torokhov@gmail.com \
--cc=dtor@chromium.org \
--cc=dvhart@infradead.org \
--cc=eballetbo@gmail.com \
--cc=groeck@chromium.org \
--cc=gwendal@chromium.org \
--cc=hdegoede@redhat.com \
--cc=jeremy@system76.com \
--cc=kernel@collabora.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=mchehab+samsung@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=rajatja@google.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=usama.anjum@collabora.com \
--cc=vbendeb@chromium.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