mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Jorge Lopez <jorgealtxwork@gmail.com>
Cc: Armin Wolf <W_Armin@gmx.de>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, thomas@t-8ch.de
Subject: Re: [PATCH v10 03/14] HP BIOSCFG driver - bioscfg
Date: Tue, 25 Apr 2023 16:59:40 +0200	[thread overview]
Message-ID: <9216dfe9-eea0-b0c0-3630-339a2b60aa2d@redhat.com> (raw)
In-Reply-To: <CAOOmCE_W7_pgQT=8bQBi8_0pD74O6uen6-8p0Orvi1qjEcaHng@mail.gmail.com>

Hi,

On 4/25/23 16:32, Jorge Lopez wrote:
> On Tue, Apr 25, 2023 at 5:34 AM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> Hi All,
>>
>> On 4/19/23 20:04, Armin Wolf wrote:
>>> Am 19.04.23 um 17:13 schrieb Jorge Lopez:
>>
>> <snip>
>>
>>>> +static int __init bioscfg_init(void)
>>>> +{
>>>> +    int ret = 0;
>>>> +    int bios_capable = wmi_has_guid(HP_WMI_BIOS_GUID);
>>>> +
>>>> +    if (!bios_capable) {
>>>> +        pr_err("Unable to run on non-HP system\n");
>>>> +        return -ENODEV;
>>>> +    }
>>>> +
>>>
>>> Currently, this driver will no get automatically loaded on supported hardware,
>>> something which would be quite beneficial for users to have.
>>> Since the HP_WMI_BIOS_GUID is already handled by the hp-wmi driver, maybe this
>>> driver (which also already implements a function similar to hp_wmi_perform_query())
>>> could register a platform device which is then used by this driver? This together
>>> with MODULE_DEVICE_TABLE() would allow for automatically loading the module on supported hardware.
>>
>> Both drivers can already co-exist since the old hp-wmi driver uses the old
>> wmi kernel functions and is not a "wmi_driver" so there is no need for
>> a platform_device for this driver to bind to since the wmi_device is
>> still free for it to bind to.
>>
>> This does indeed need a MODULE_DEVICE_TABLE() statement for
>> the bios_attr_pass_interface_id_table[] id-table. Note only for that
>> table, because the HP_WMI_BIOS_GUID is present on models which do
>> not support this and we don't want the module to auto-load there.
>>
> 
> I am considering adding a check for the  HP_WMI_SET_BIOS_SETTING_GUID
> and HP_WMI_BIOS_GUID during the initialization process.
> The driver will report a message If HP_WMI_SET_BIOS_SETTING_GUID is
> found or not.
> If HP_WMI_SET_BIOS_SETTING_GUID does not exist, the driver cannot
> change the BIOS settings.

Right, adding a check for  HP_WMI_BIOS_GUID to bioscfg_init()
sounds like a good idea.

That + add a a MODULE_DEVICE_TABLE() statement to
the bios_attr_pass_interface_id_table[] id-table.

Regards,

Hans



  reply	other threads:[~2023-04-25 15:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 15:13 [PATCH v10 00/14] HP BIOSCFG driver Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 01/14] HP BIOSCFG driver - Documentation Jorge Lopez
2023-04-21 11:36   ` Pavel Machek
2023-04-19 15:13 ` [PATCH v10 02/14] HP BIOSCFG driver - biosattr-interface Jorge Lopez
2023-04-21 11:37   ` Pavel Machek
2023-04-25 10:30     ` Hans de Goede
2023-04-25 13:43       ` Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 03/14] HP BIOSCFG driver - bioscfg Jorge Lopez
2023-04-19 18:04   ` Armin Wolf
2023-04-19 20:59     ` Limonciello, Mario
2023-04-25 10:34     ` Hans de Goede
2023-04-25 14:32       ` Jorge Lopez
2023-04-25 14:59         ` Hans de Goede [this message]
2023-04-25 18:47           ` Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 04/14] HP BIOSCFG driver - int-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 05/14] HP BIOSCFG driver - ordered-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 06/14] HP BIOSCFG driver - passwdobj-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 07/14] HP BIOSCFG driver - string-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 08/14] HP BIOSCFG driver - bioscfg-h Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 09/14] HP BIOSCFG driver - enum-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 10/14] HP BIOSCFG driver - passwdattr-interface Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 11/14] HP BIOSCFG driver - spmobj-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 12/14] HP BIOSCFG driver - surestart-attributes Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 13/14] HP BIOSCFG driver - Makefile Jorge Lopez
2023-04-20  1:44   ` kernel test robot
2023-04-20 13:33     ` Jorge Lopez
2023-04-20  3:57   ` kernel test robot
2023-04-20 13:28     ` Jorge Lopez
2023-04-19 15:13 ` [PATCH v10 14/14] HP BIOSCFG driver - MAINTAINERS Jorge Lopez
  -- strict thread matches above, loose matches on Subject: below --
2023-04-19 15:12 [PATCH v10 00/14] HP BIOSCFG driver Jorge Lopez
2023-04-19 15:12 ` [PATCH v10 03/14] HP BIOSCFG driver - bioscfg Jorge Lopez

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=9216dfe9-eea0-b0c0-3630-339a2b60aa2d@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=W_Armin@gmx.de \
    --cc=jorgealtxwork@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=thomas@t-8ch.de \
    /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

all inboxes | Powered by JetHome®