public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Jean Delvare" <jdelvare@suse.com>,
	"Andi Shyti" <andi.shyti@kernel.org>,
	"Eric Piel" <eric.piel@tremplin-utc.net>,
	"Paul Menzel" <pmenzel@molgen.mpg.de>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	Dell.Client.Kernel@dell.com, "Marius Hoch" <mail@mariushoch.de>,
	"Kai Heng Feng" <kai.heng.feng@canonical.com>,
	"Wolfram Sang" <wsa@kernel.org>,
	platform-driver-x86@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH 1/6] platform/x86: dell-smo8800: Only load on Dell laptops
Date: Sun, 24 Dec 2023 22:48:53 +0100	[thread overview]
Message-ID: <20231224214853.sntvdrsz2mvzgrdf@pali> (raw)
In-Reply-To: <20231224213629.395741-2-hdegoede@redhat.com>

On Sunday 24 December 2023 22:36:17 Hans de Goede wrote:
> The SMO8xxx ACPI HIDs are generic accelerometer ids which are also used
> by other vendors. Add a sys_vendor check to ensure that the dell-smo8800
> driver only loads on Dell laptops.

I saw that this driver was used also on some Acer laptops. As you wrote
above, and now after years I have also feeling that these ACPI HIDs are
generic, not Dell specific.

So I would propose to not restrict smo8800 driver just for Dell laptops
like this patch is introducing.

Maybe better option would be to move this driver out of the dell
namespace.

Are we able to collect dmesg outputs and verify this information on how
many non-dell laptops is this driver loaded?

> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/platform/x86/dell/dell-smo8800.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/platform/x86/dell/dell-smo8800.c b/drivers/platform/x86/dell/dell-smo8800.c
> index f7ec17c56833..4d5f778fb599 100644
> --- a/drivers/platform/x86/dell/dell-smo8800.c
> +++ b/drivers/platform/x86/dell/dell-smo8800.c
> @@ -10,6 +10,7 @@
>  
>  #define DRIVER_NAME "smo8800"
>  
> +#include <linux/dmi.h>
>  #include <linux/fs.h>
>  #include <linux/interrupt.h>
>  #include <linux/kernel.h>
> @@ -108,6 +109,9 @@ static int smo8800_probe(struct platform_device *device)
>  	int err;
>  	struct smo8800_device *smo8800;
>  
> +	if (!dmi_match(DMI_SYS_VENDOR, "Dell Inc."))
> +		return false;
> +
>  	smo8800 = devm_kzalloc(&device->dev, sizeof(*smo8800), GFP_KERNEL);
>  	if (!smo8800) {
>  		dev_err(&device->dev, "failed to allocate device data\n");
> -- 
> 2.43.0
> 

  reply	other threads:[~2023-12-24 21:48 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-24 21:36 [PATCH 0/6] i2c-i801 / dell-smo8800: Move instantiation of lis3lv02d i2c_client from i2c-i801 to dell-smo8800 Hans de Goede
2023-12-24 21:36 ` [PATCH 1/6] platform/x86: dell-smo8800: Only load on Dell laptops Hans de Goede
2023-12-24 21:48   ` Pali Rohár [this message]
2024-01-05 16:25     ` Hans de Goede
2023-12-24 21:36 ` [PATCH 2/6] platform/x86: dell-smo8800: Change probe() ordering a bit Hans de Goede
2023-12-24 21:36 ` [PATCH 3/6] platform/x86: dell-smo8800: Move instantiation of lis3lv02d i2c_client from i2c-i801 to dell-smo8800 Hans de Goede
2023-12-24 21:55   ` Pali Rohár
2024-01-05 16:31     ` Hans de Goede
2024-01-05 18:26       ` Pali Rohár
2024-01-06 12:13         ` Hans de Goede
2024-01-06 12:16           ` Pali Rohár
2023-12-25 20:00   ` Andy Shevchenko
2024-01-08  9:40   ` kernel test robot
2023-12-24 21:36 ` [PATCH 4/6] platform/x86: dell-smo8800: Pass the IRQ to the lis3lv02d i2c_client Hans de Goede
2024-01-08 17:28   ` kernel test robot
2023-12-24 21:36 ` [PATCH 5/6] platform/x86: dell-smo8800: Instantiate an i2c_client for the IIO st_accel driver Hans de Goede
2023-12-24 22:03   ` Pali Rohár
2024-01-05 16:34     ` Hans de Goede
2024-01-05 18:33       ` Pali Rohár
2024-01-05 18:37       ` Andy Shevchenko
2024-01-05 19:04         ` Andy Shevchenko
2024-01-05 19:20           ` Pali Rohár
2024-01-05 19:46             ` Hans de Goede
2024-01-09  2:00   ` kernel test robot
2023-12-24 21:36 ` [PATCH 6/6] platform/x86: dell-smo8800: Add support for probing for the accelerometer i2c address Hans de Goede
2023-12-24 22:07   ` Pali Rohár
2024-01-05 16:36     ` Hans de Goede
2024-01-05 18:51       ` Pali Rohár
2024-01-06 14:30         ` Hans de Goede
2024-01-08 13:22       ` Dell contacts (was: [PATCH 6/6] platform/x86: dell-smo8800: Add support for probing for the accelerometer i2c address) Paul Menzel
2024-01-08 14:06         ` Greg KH
2024-01-06 14:23 ` [PATCH 0/6] i2c-i801 / dell-smo8800: Move instantiation of lis3lv02d i2c_client from i2c-i801 to dell-smo8800 Paul Menzel
2024-01-06 16:15   ` Hans de Goede
2024-01-08 11:29     ` Paul Menzel

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=20231224214853.sntvdrsz2mvzgrdf@pali \
    --to=pali@kernel.org \
    --cc=Dell.Client.Kernel@dell.com \
    --cc=andi.shyti@kernel.org \
    --cc=andy@kernel.org \
    --cc=eric.piel@tremplin-utc.net \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jdelvare@suse.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=mail@mariushoch.de \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=wsa@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