Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1510898rwr; Thu, 20 Apr 2023 16:44:25 -0700 (PDT) X-Google-Smtp-Source: AKy350YF8z2EWtdl1EmgeEBBrlMUv+iOXWDVkjr2O7Jek8GWqYilrtHRhCWnMskeL3aHIi7cZmZr X-Received: by 2002:a17:902:ab92:b0:1a6:8ed5:428a with SMTP id f18-20020a170902ab9200b001a68ed5428amr3320694plr.22.1682034265608; Thu, 20 Apr 2023 16:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682034265; cv=none; d=google.com; s=arc-20160816; b=Mlhy2FXON7uugQHmOVlJ/iXgP7EwZ9sntsZWBaN3w9RHhAkyhbVpR6djrLqF/Z3DMn WQ35DzlZonbFCddf3FOy3sgP+PrVlSyOn8SfQh7QMmWuHqhXdbm0jUuFtayKxU4sp+eU Ty+A/FgvLurGpOva4qQDF5BPA86quZyZfCw4jPIyU1VQmh695WDUKNiKmPNlSX26+bF6 Scq7f1XID8OcK7MRVodROPpZH/ch3ihUQCX1XqjySRFAdOl+NG5ncyuTzqrD9dHGYFY1 pxJl4HoO8aPvZOUckafPN3tMVJDBqlBiMWcXkxz5W+5NoO3Az9TJkY9awpXvrNkbvLtR xSbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=csCjhgR/SJOt5QRcWIgsZZAjRac984Esza3qjXOQaaY=; b=gRIev+lmIpKd1hFwWdfdDszK6MQmniGuPAHvV4mxMeUCMCHDhbgeuODB7Ul5ud8shY JrPRECJpSnj1gmcFRp1ZaZCbsLhCnukNnz7vQWeB/Kzi1hW8Y1f0tAuCMsjpZ4J65idj fkoScQ6wPjSYt/QDo9knUxv+rcI5c2NlAhe1Vwkc63AI5FYqJVEnvjDHjhSY0qeoFGyu ItOsmXWwiM7QuyxOG/g0HptEqY4+dLC6mmkpLGOe+Y7cgmyb4WK37CsMKw8J8SCnK3zl T1nf7j/KanIjO4G8GA+d9LJwB1p16GklwKYJOECChhoPB/qH1/97EliqqjiQKSH/4RTL 5POA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mariushoch.de header.s=MBO0001 header.b=h6Jcv5eY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nv13-20020a17090b1b4d00b002471f613111si6080999pjb.62.2023.04.20.16.44.12; Thu, 20 Apr 2023 16:44:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mariushoch.de header.s=MBO0001 header.b=h6Jcv5eY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232060AbjDTXhD (ORCPT + 99 others); Thu, 20 Apr 2023 19:37:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231610AbjDTXhB (ORCPT ); Thu, 20 Apr 2023 19:37:01 -0400 Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7AC51FDE; Thu, 20 Apr 2023 16:36:59 -0700 (PDT) Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Q2Yw616sqz9sRf; Fri, 21 Apr 2023 01:36:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mariushoch.de; s=MBO0001; t=1682033814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=csCjhgR/SJOt5QRcWIgsZZAjRac984Esza3qjXOQaaY=; b=h6Jcv5eYzbYH4wRpMRe+JH45ui7W/AQtCpzQIhVFY35wLnSKB6FpZ4v/itpyXbpxNKBooW t9syyE4Im0/W1CDE8u1XKjjgXkQ7LEonNWJar0vjvVpvx/b7SBA5VVqGcb0hCeuvl+jFA4 huOAMoipUC3M/eAbeNQed7zIFAp/JhKxaIlGgOnCY3pul41gO6pDs4e7eNvxdBD1AxGhg7 hxEhcpMm2bW6clLmRGCLT3clVf/ukKr6fOcb7uFiO6D3/++lSh+f16tw/YjLZ9X+ZCZ62W L8sf1SQvwERkzrbkTjIo2uRq5vgsBvC17rK2Tu6a+6b58n8f4Bw9XIUJU1P8Lg== From: Marius Hoch To: Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Hans de Goede , Marius Hoch Subject: [PATCH v2] iio: light: al3320a: Handle ACPI device CALS0001 Date: Fri, 21 Apr 2023 01:26:31 +0200 Message-Id: <20230420232631.68864-1-mail@mariushoch.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This sensor can be found as CALS0001 on the Lenovo Yoga Tablet 2 series. Tested on a Lenovo Yoga Tablet 2 1051-F. Signed-off-by: Marius Hoch --- v2: Explicitly include (don't rely on linux/i2c.h including it) --- drivers/iio/light/al3320a.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/iio/light/al3320a.c b/drivers/iio/light/al3320a.c index 9ff28bbf34bb..36214d790f71 100644 --- a/drivers/iio/light/al3320a.c +++ b/drivers/iio/light/al3320a.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -247,11 +248,18 @@ static const struct of_device_id al3320a_of_match[] = { }; MODULE_DEVICE_TABLE(of, al3320a_of_match); +static const struct acpi_device_id al3320a_acpi_match[] = { + {"CALS0001"}, + { }, +}; +MODULE_DEVICE_TABLE(acpi, al3320a_acpi_match); + static struct i2c_driver al3320a_driver = { .driver = { .name = AL3320A_DRV_NAME, .of_match_table = al3320a_of_match, .pm = pm_sleep_ptr(&al3320a_pm_ops), + .acpi_match_table = al3320a_acpi_match, }, .probe_new = al3320a_probe, .id_table = al3320a_id, base-commit: cb0856346a60fe3eb837ba5e73588a41f81ac05f -- 2.39.2