From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Armin Wolf <W_Armin@gmx.de>,
markgross@kernel.org, rafael@kernel.org, lenb@kernel.org,
hmh@hmh.eng.br, matan@svgalib.org, corentin.chary@gmail.com,
jeremy@system76.com, productdev@system76.com,
mario.limonciello@amd.com, pobrn@protonmail.com,
coproscefalo@gmail.com, platform-driver-x86@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] platform/x86: dell: Add new dell-wmi-ddv driver
Date: Wed, 28 Sep 2022 17:16:19 +0300 [thread overview]
Message-ID: <YzRXM2wN4Z5TYsS9@smile.fi.intel.com> (raw)
In-Reply-To: <aaacb093-c5b2-09b4-2ddc-966b3b11544e@redhat.com>
On Wed, Sep 28, 2022 at 01:33:53PM +0200, Hans de Goede wrote:
> On 9/28/22 12:47, Andy Shevchenko wrote:
> > On Tue, Sep 27, 2022 at 10:45:21PM +0200, Armin Wolf wrote:
...
> >> + default m
> >
> > Why? (Imagine I have Dell, but old machine)
>
> Then you can select N if you really want to.
>
> > (And yes, I see that other Kconfig options are using it, but we shall avoid
> > cargo cult and each default choice like this has to be explained at least.)
>
> This has been discussed during the review of v1 already.
>
> There are quite a few dell modules and the choice has
> been made to put these all behind a dell platform drivers
> options and then default all the individual modules to 'm'.
Okay, thanks for pointing out that this was discussed. I was not aware.
...
> >> + kfree(obj);
> >
> > I'm wondering what is the best to use in the drivers:
> > 1) kfree()
> > 2) acpi_os_free()
> > 3) ACPI_FREE()
> > ?
>
> Most ACPI driver code I know of just uses kfree() the other 2
> are more ACPI-core / ACPICA internal helpers.
To me 2) would look more consistent, esp. in case if it is extended in
the future.
...
> >> + ret = device_create_file(&battery->dev, &data->temp_attr);
> >> + if (ret < 0)
> >> + return ret;
> >> +
> >> + ret = device_create_file(&battery->dev, &data->eppid_attr);
> >> + if (ret < 0) {
> >> + device_remove_file(&battery->dev, &data->temp_attr);
> >> +
> >> + return ret;
> >> + }
> >
> > Why dev_groups member can't be utilized?
>
> Because this is an extension to the ACPI battery driver, IOW
> this adds extra attributes to the power-supply-class device
> registered by the ACPI battery driver. Note that the device
> in this case is managed by the power-supply-class code, so
> there is no access to dev_groups even in the ACPI battery code.
Ah, I see now, so we extend the attributes of the 3rd party driver here.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-09-28 14:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 20:45 [PATCH v2 0/2] platform/x86: dell: Add new dell-wmi-ddv driver Armin Wolf
2022-09-27 20:45 ` [PATCH v2 1/2] ACPI: battery: Pass battery hook pointer to hook callbacks Armin Wolf
2022-10-24 13:19 ` Rafael J. Wysocki
2022-10-24 13:47 ` Hans de Goede
2022-09-27 20:45 ` [PATCH v2 2/2] platform/x86: dell: Add new dell-wmi-ddv driver Armin Wolf
2022-09-28 10:47 ` Andy Shevchenko
2022-09-28 11:33 ` Hans de Goede
2022-09-28 14:16 ` Andy Shevchenko [this message]
2022-09-28 20:57 ` Armin Wolf
2022-09-29 9:50 ` Andy Shevchenko
2022-09-29 13:12 ` Hans de Goede
2022-10-21 9:34 ` Armin Wolf
2022-10-21 9:58 ` Hans de Goede
2022-09-29 9:51 ` Andy Shevchenko
2022-09-28 9:52 ` [PATCH v2 0/2] " Hans de Goede
2022-09-28 10:48 ` Andy Shevchenko
2022-09-28 11:37 ` Hans de Goede
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=YzRXM2wN4Z5TYsS9@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=W_Armin@gmx.de \
--cc=coproscefalo@gmail.com \
--cc=corentin.chary@gmail.com \
--cc=hdegoede@redhat.com \
--cc=hmh@hmh.eng.br \
--cc=jeremy@system76.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=markgross@kernel.org \
--cc=matan@svgalib.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=pobrn@protonmail.com \
--cc=productdev@system76.com \
--cc=rafael@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox