From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A67D4311946 for ; Fri, 7 Aug 2026 17:15:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786122909; cv=none; b=nKE+SRA9cHlRbWmbuE3eoJLG2ohFuzQxY5BsguqN+vp687YsBtWv1tWqu/DQtMvHoW1fT3ZEZA15p1f3GnBkx3cKg9upQ7/QbeHEIFxfmVugmgimlVSzuIinSlvGBeFCQVgNWzD9aW8Rq/fgZTyacyXOlWOGK93uaO3wFtLmUCA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786122909; c=relaxed/simple; bh=u+ltRlQclHoHsgMvRxk6MgKJdNdPDNVBalUsGO10YAQ=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ghGhciioWprL58Znp1tBen/MzDVVqdXacauabMqsya7D+pNCUK6AJIGIHrJV5M7p7uUkip/vDNmH03wifq6Abu9Znio8WIry6B4IAMLhnIs4vy4RaVtlW5mmsRFMEqDg99RV4MDlJO65jRerts4v14QtFFE04Ew8nlLW4MCIUu0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nCtp0Lou; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nCtp0Lou" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4956242332dso28506135e9.2 for ; Fri, 07 Aug 2026 10:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786122905; x=1786727705; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=8wCGk7YUKAP39MO6sdV3VrjFUc/b97t30OgB7e+3zsM=; b=nCtp0LouenRz2Q2NiMrKcfQnGZyZUBc2cNMLpE5QDF+bcqlT54eLLqLevVZTB7LaR7 Q6Z5vNQObBbIx2IOu8qK3z1L+hCxK3N/tys+PIsXmkkVoxXHyrAeClTFjFWy18ehFUYx rWLEj660a72p0RMOe66zHyVr/p7+5YiQavB65sC9cv7m4Fh7+lRdmX8Dc/VQL0eVqyT6 MojMTo3gz0rJFB4bz29bAsmGXQaD3KFB2xo0zGFEPWstp/Zs7AsRF+7meqpZdASVgR2D KcQ7TNhqyIZiYKpX/oi5BUP5uWONepmEcCPdV8dY5PWoGLQv5MMKcEDawtlrlscvm3oB djKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786122905; x=1786727705; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=8wCGk7YUKAP39MO6sdV3VrjFUc/b97t30OgB7e+3zsM=; b=UWeTZKLP7+kuSwfM4tYXzzLNnUXA6/jC3c+CT/QWFb9m6ZeEaKMhjSrSOJle0j0DVG jhwELvxcLOhOscIp0J/syzLubuX5ao2YZXqTJjhs2CA1Nt4r6ZPq26ItLeyFc74EiqdA UohGjkA0MwReU/CIu0aab5IiXEeNrdlju6fSkH+HBdFBhfLyeusJVVjGBlKuR/OinZeJ m8zVfs/hTtxhS0GsUJdQvt4U0x+lBDBfc9H2yDm67FrlbKDYf2NX5989kziMlmLj6+3t dwMZNdTMIXjfYTY3pqaKZJBi3ysjzXfH4LPDTgheQDyyqAiVgDqzxXP5mcZVeW4ebZR1 LwGg== X-Forwarded-Encrypted: i=1; AHgh+RoyWj37PMNI5y32NauPHx6Gjzp/KP2yjdCfYddlWYbwVSIdZBLaetuOSR0UCMbVNJpl9LZEKzGJOMCXSRQ=@vger.kernel.org X-Gm-Message-State: AOJu0Ywg4J+l3dq7UiU9ZdZBSm2p12lnLuEmOaCnytRdf4fVacCCxeun OhZ8LRRtzxHbR3KDGmNd+UmlGsUcvuZUgVEyvcjUq6IipOc4D7CyGqqf X-Gm-Gg: AR+sD13CCmtYX0ovVGqI2chm8Xdy904+EXBgXkyMrd4l4NHpeZLraG6sG6TQXXkFNBV nNYo9FynaDi3gpFz9AAFjetszsX1ZccITpZ4dhV7Y6oUUqabxplxRf8fIO4id4cscFUCmS7DJpp u0ajR45EGi/H+XLuIRzs01kZF2G59cc5aFvBr6LKdpvPyrSSkXUnMrB8sjnmjPe+Sv4OvllbzaK LKjFBttfjH1npo90EAuF7kUpx78hml7N5baULobcDaF9Af+HA9TXJ7OKqS+DBstpy2y35PTzEmf CndpZ7Y0felITyU9JlHJ8rmC/KQu95OagcRoWlyiuLfjg/pshMJTcrpqhGCnA2v89Erv8J76Xhu yEhQbPoZuZqgvXOPMo85Po9RNVp0kzROCi1eEOw4VMaZdtmspIdNqKIB1cKd1wRbW6GFa+gVVhD XJQzT8MnoEa2zH7wu3Cpo1zMx7bMvUlvuBXC2mz4erFqO0PBtC4XoR5gC7YCcgKOhNCFsxFqIuy gLtx3Sq X-Received: by 2002:a05:600c:1912:b0:495:4d88:e630 with SMTP id 5b1f17b1804b1-499619928f5mr13550175e9.10.1786122904669; Fri, 07 Aug 2026 10:15:04 -0700 (PDT) Received: from veee-pc ([78.171.143.94]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4995427a244sm160291005e9.10.2026.08.07.10.15.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2026 10:15:04 -0700 (PDT) From: Danil Sirin To: Jonathan Cameron , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , Danil Sirin , Greg Kroah-Hartman , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] iio: accel: mma8452: add ACPI match table Date: Fri, 7 Aug 2026 20:13:25 +0300 Message-ID: <20260807171326.1137-1-danilsirin24@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The mma8452 driver supports obtaining chip-specific data through i2c_get_match_data(), but only provides Device Tree and I2C match tables. On ACPI-based x86 systems, compatible devices such as the MMA8653 are enumerated via ACPI, preventing the driver from binding. Add an ACPI match table mapping the supported devices to the existing chip information structures. Tested on a Bay Trail tablet exposing an MMA8653 device via ACPI. With this change the driver successfully probes, reads the expected chip ID (0x5a), and registers an IIO device. Signed-off-by: Danil Sirin --- v2: - Update Signed-off-by tag with real name drivers/iio/accel/mma8452.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c index cefc7cf4b..8cb78e4cf 100644 --- a/drivers/iio/accel/mma8452.c +++ b/drivers/iio/accel/mma8452.c @@ -1822,6 +1822,17 @@ static const struct dev_pm_ops mma8452_pm_ops = { mma8452_runtime_resume, NULL) }; +static const struct acpi_device_id mma8452_acpi_id[] = { + { "FXLS8471", (kernel_ulong_t)&mma_chip_info_table[fxls8471] }, + { "MMA8451", (kernel_ulong_t)&mma_chip_info_table[mma8451] }, + { "MMA8452", (kernel_ulong_t)&mma_chip_info_table[mma8452] }, + { "MMA8453", (kernel_ulong_t)&mma_chip_info_table[mma8453] }, + { "MMA8652", (kernel_ulong_t)&mma_chip_info_table[mma8652] }, + { "MMA8653", (kernel_ulong_t)&mma_chip_info_table[mma8653] }, + { } +}; +MODULE_DEVICE_TABLE(acpi, mma8452_acpi_id); + static const struct i2c_device_id mma8452_id[] = { { "fxls8471", (kernel_ulong_t)&mma_chip_info_table[fxls8471] }, { "mma8451", (kernel_ulong_t)&mma_chip_info_table[mma8451] }, @@ -1837,6 +1848,7 @@ static struct i2c_driver mma8452_driver = { .driver = { .name = "mma8452", .of_match_table = mma8452_dt_ids, + .acpi_match_table = mma8452_acpi_id, .pm = &mma8452_pm_ops, }, .probe = mma8452_probe, -- 2.55.0