From patchwork Mon Aug 12 20:39:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 819250 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 108B6194122 for ; Mon, 12 Aug 2024 20:40:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723495222; cv=none; b=YGmcGXwsD7dKW8Q6Yt80f71XIJnTDrZNIwDakKkSfV4fkgN0SkJqERJ0uL5hMbsp4Ly94zG4DM+5E/zADHoKqNGBAzZVbPHAFSsXru/7agtFBE+9nw1ABlmkmLsEGYA8pz4RiLhNInuQB8+Wh9TXVczJeIRZfhyZbQZ6Q0FlkY8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723495222; c=relaxed/simple; bh=gMfm9EGJBYETj9ZrSgquZc2XRJciodS3o7/O1KmD6Wg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jL6yB4q/IgaUd3+nKR7x+uEm2jITmq/st7r4nxNr1DHvcRuFx6vXrn0OC1e3D4I8QyVFDYDHaGqgSFY4VGL7O1fHH4Z7xVZgt25gYQdwgyYntuff6Z45Mlt4zMSYZxr+aIAFTXuH6fiE5ibgTyU6561g8Sbk4XwK7tVYjzmW2J4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=JGpGil0B; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JGpGil0B" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723495220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yxKg8emRufx4ixcByje1XsbE0BM9cSOJfPxHbCdxwJw=; b=JGpGil0BzajtRxZdbtDqRoMTBqPEH7PES2J8p3+BKx2qmbG8gx2A9t6yu028prSPpfh5d5 O8B2ZZE2EFaMdUboCfpULbNcQaJYz1OPrguFvdk1uxvdP8vtC/XFmo5fz000u7C3uLvVg7 2TjuYWPm669J5hPPZuP97nR1TFcS8iY= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-461-3JFmeSjENa2glvDXNo2KJg-1; Mon, 12 Aug 2024 16:40:17 -0400 X-MC-Unique: 3JFmeSjENa2glvDXNo2KJg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EA2C619332AC; Mon, 12 Aug 2024 20:40:15 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.50]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E821C19560AD; Mon, 12 Aug 2024 20:40:11 +0000 (UTC) From: Hans de Goede To: =?utf-8?q?Pali_Roh=C3=A1r?= , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= , Andy Shevchenko , Paul Menzel , Wolfram Sang Cc: Hans de Goede , eric.piel@tremplin-utc.net, Marius Hoch , Dell.Client.Kernel@dell.com, Kai Heng Feng , platform-driver-x86@vger.kernel.org, Jean Delvare , Andi Shyti , linux-i2c@vger.kernel.org Subject: [PATCH v8 3/6] platform/x86: dell-smo8800: Move SMO88xx acpi_device_ids to dell-smo8800-ids.h Date: Mon, 12 Aug 2024 22:39:49 +0200 Message-ID: <20240812203952.42804-4-hdegoede@redhat.com> In-Reply-To: <20240812203952.42804-1-hdegoede@redhat.com> References: <20240812203952.42804-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Move the SMO88xx acpi_device_ids to a new dell-smo8800-ids.h header, so that these can be shared with the new dell-lis3lv02d code. Reviewed-by: Pali Rohár Signed-off-by: Hans de Goede --- Changes in v8: - Add #include for MODULE_DEVICE_TABLE() Changes in v4: - This is a new patch in v3 of this patch-set --- drivers/platform/x86/dell/dell-smo8800-ids.h | 27 ++++++++++++++++++++ drivers/platform/x86/dell/dell-smo8800.c | 16 +----------- 2 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 drivers/platform/x86/dell/dell-smo8800-ids.h diff --git a/drivers/platform/x86/dell/dell-smo8800-ids.h b/drivers/platform/x86/dell/dell-smo8800-ids.h new file mode 100644 index 000000000000..ec58e229ba7a --- /dev/null +++ b/drivers/platform/x86/dell/dell-smo8800-ids.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * ACPI SMO88XX lis3lv02d freefall / accelerometer device-ids. + * + * Copyright (C) 2012 Sonal Santan + * Copyright (C) 2014 Pali Rohár + */ +#ifndef _DELL_SMO8800_IDS_H_ +#define _DELL_SMO8800_IDS_H_ + +#include +#include + +static const struct acpi_device_id smo8800_ids[] = { + { "SMO8800" }, + { "SMO8801" }, + { "SMO8810" }, + { "SMO8811" }, + { "SMO8820" }, + { "SMO8821" }, + { "SMO8830" }, + { "SMO8831" }, + { } +}; +MODULE_DEVICE_TABLE(acpi, smo8800_ids); + +#endif diff --git a/drivers/platform/x86/dell/dell-smo8800.c b/drivers/platform/x86/dell/dell-smo8800.c index f7ec17c56833..f9119ed2bd92 100644 --- a/drivers/platform/x86/dell/dell-smo8800.c +++ b/drivers/platform/x86/dell/dell-smo8800.c @@ -14,10 +14,10 @@ #include #include #include -#include #include #include #include +#include "dell-smo8800-ids.h" struct smo8800_device { u32 irq; /* acpi device irq */ @@ -163,20 +163,6 @@ static void smo8800_remove(struct platform_device *device) dev_dbg(&device->dev, "device /dev/freefall unregistered\n"); } -/* NOTE: Keep this list in sync with drivers/i2c/busses/i2c-i801.c */ -static const struct acpi_device_id smo8800_ids[] = { - { "SMO8800", 0 }, - { "SMO8801", 0 }, - { "SMO8810", 0 }, - { "SMO8811", 0 }, - { "SMO8820", 0 }, - { "SMO8821", 0 }, - { "SMO8830", 0 }, - { "SMO8831", 0 }, - { "", 0 }, -}; -MODULE_DEVICE_TABLE(acpi, smo8800_ids); - static struct platform_driver smo8800_driver = { .probe = smo8800_probe, .remove_new = smo8800_remove,