From patchwork Thu Oct 12 20:07:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13419790 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C3B6CDB46E for ; Thu, 12 Oct 2023 20:07:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442670AbjJLUHQ (ORCPT ); Thu, 12 Oct 2023 16:07:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442668AbjJLUHO (ORCPT ); Thu, 12 Oct 2023 16:07:14 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84990BB; Thu, 12 Oct 2023 13:07:13 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-406609df1a6so14879555e9.3; Thu, 12 Oct 2023 13:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697141231; x=1697746031; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SBn3G0nuwV1PB65M5Moci3sn5s/1LPXofHRirIrGVQ4=; b=QSkhqgUq7i8qbXWEOQCZkMJV+xvZRIZX5SGurRWcrvA7EHxcSpm90TvjlmP88mk9iF WBkTwx0brfwgsbVqeYbnuGd17V5b+NwtlR+QU5ovA1XTmD7RJlyofFAFSaK13MeKYnjv OFxxkDuZeMjv6uGwYOPwSNLUhDzBGbJM5Pf2dMS4EOZqhqSqrMuLc3RgBQNKAPoJwovm J+0u6CfmI3+9FGisMRN8F00M9tWXwWGykomwIvxjU8n4C8Dz3zn+jCMYBTETO8gzDvgz NJtJerKoCm8YAfbSgw0i6fHmzxFMUWKaTd/PkoUYmAyLPpOomJeUjpJSuiNf0liuX/j4 Xm6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697141231; x=1697746031; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SBn3G0nuwV1PB65M5Moci3sn5s/1LPXofHRirIrGVQ4=; b=neKuV2PBQU3vfuIGu5CnHjHiejC+NHnZU7FjFQqyFUKc3Gai9mc8r2DY9GK92PbhOF iDFdhOcoiWxjz8ecJRAo30XFDDRufwCMGWZd24kzav3LsTB7iWlMLhgQDRQRjCSQsJ8y 21BKiEvyDVOLOUazOQo8+bKIqIT9h2/DQ5wdiIuUmW9IRqfxyfcAhIiAQbn1Dokddq5q CGMZhpugcxDZcAqVuDy83j7qFtZQBourNcVrfzsMLj4excsA7cIh9B41r2umQJ7rZsUw FvjO99E/3U4z/EOB5nxNq1zEAJR9YMtmeN8ZExzEhdEc0jCShz5/KxyDY9KYUtgftEOn kLzA== X-Gm-Message-State: AOJu0YybixF6wgR4ROO2daxaZbNzzNiZuRQ4xKD+M9Pt1z5CKdeNn/2G 2NhKlYVb4PXhhrLw6h1Xo8gCMwbw+fUHMw== X-Google-Smtp-Source: AGHT+IEkhXzryuY0B6dDNUakczzgqaK8IrqHAVO0JxD4mt/UhUN+kiYC9cWnw8FE1njv/Cjjfl8iTg== X-Received: by 2002:a05:600c:21d0:b0:405:3a3b:2aa2 with SMTP id x16-20020a05600c21d000b004053a3b2aa2mr21670636wmj.37.1697141231587; Thu, 12 Oct 2023 13:07:11 -0700 (PDT) Received: from [127.0.1.1] (2a02-8389-41cf-e200-de42-73c9-6d1f-dd27.cable.dynamic.v6.surfer.at. [2a02:8389:41cf:e200:de42:73c9:6d1f:dd27]) by smtp.gmail.com with ESMTPSA id p7-20020a056000018700b003217cbab88bsm182093wrx.16.2023.10.12.13.07.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 13:07:11 -0700 (PDT) From: Javier Carrasco Date: Thu, 12 Oct 2023 22:07:07 +0200 Subject: [PATCH 1/2] iio: si7005: Add device tree support MIME-Version: 1.0 Message-Id: <20231012-topic-si7005_devicetree-v1-1-6c8a6fa7b3ec@gmail.com> References: <20231012-topic-si7005_devicetree-v1-0-6c8a6fa7b3ec@gmail.com> In-Reply-To: <20231012-topic-si7005_devicetree-v1-0-6c8a6fa7b3ec@gmail.com> To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, Javier Carrasco X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1697141229; l=909; i=javier.carrasco.cruz@gmail.com; s=20230509; h=from:subject:message-id; bh=aeSCiAYO0RYYWNlf/LcMpE5mp3Kcd3T3YEwutYopSek=; b=tbw7jQAKEHNLisGF9BF1nVxEGCtfiT1Mbh+tw9OAww90loHfBO8jsOhGIdxB6b0BTfamfOHey Ih6SWU4TTP7AX6sONNLVla5fdWCiZ98qTcDCTIHYW3ZZn1JnGWafAyP X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org This device supports ACPI detection but lacks of the device tree counterpart. Add device tree support. Signed-off-by: Javier Carrasco --- drivers/iio/humidity/si7005.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/iio/humidity/si7005.c b/drivers/iio/humidity/si7005.c index ebfb79bc9edc..9465908cc65e 100644 --- a/drivers/iio/humidity/si7005.c +++ b/drivers/iio/humidity/si7005.c @@ -169,9 +169,16 @@ static const struct i2c_device_id si7005_id[] = { }; MODULE_DEVICE_TABLE(i2c, si7005_id); +static const struct of_device_id si7005_dt_ids[] = { + { .compatible = "silabs,si7005" }, + { } +}; +MODULE_DEVICE_TABLE(of, si7005_dt_ids); + static struct i2c_driver si7005_driver = { .driver = { .name = "si7005", + .of_match_table = si7005_dt_ids, }, .probe = si7005_probe, .id_table = si7005_id, From patchwork Thu Oct 12 20:07:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13419791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32D1DCDB482 for ; Thu, 12 Oct 2023 20:07:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442691AbjJLUHV (ORCPT ); Thu, 12 Oct 2023 16:07:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442408AbjJLUHR (ORCPT ); Thu, 12 Oct 2023 16:07:17 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E400DB7; Thu, 12 Oct 2023 13:07:14 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-32d3755214dso1344749f8f.0; Thu, 12 Oct 2023 13:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697141233; x=1697746033; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=844OlQadaEhHMSKbiHRWaU2MB0ZcHGDbo8z2G63xyiU=; b=Wgxv3GOrOY6H4LQvmZbgdQIJ/SgeihkMheDc9c1t70nC7TGFo9fyLzbfkuO3ldW29Q 88q7/DSV1sGg8/ymfKUVKNG7t5NoekE5FSb7sCXF2dTnhiiRTaj9+7wCeu0eLAQUCosa 2dNa7TaSqutqi9MciDkZpiHIgMHHkfsSnaCS6eOZKwzPshh9+3L3ZZJvgDaqv0JQiwah 7CODyUs39Xgts62fZYNMXgSDqFJUa/qUC+VRff+/28OeLaO10Yn42V9XOarNyz9GErkC 9T5gXStnqKake8XVhfoS8+yHBw+kdDFz+pA1fcfZn6LcqS7z0Q1ThTmz3ME+B4lRLtjl soAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697141233; x=1697746033; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=844OlQadaEhHMSKbiHRWaU2MB0ZcHGDbo8z2G63xyiU=; b=bjhl7qtGSFMDTweCVtXj1etjUTh8uV/sWDVERpphBnPrLvTFI/sAZjX7huiatvgLIE G81EIyCtTPrAd6k7VuBL93xZlZl5W85Q3E9E+biqLKGRp5Pv9z4FoXSM61kQFC6OXE1g jWwd+zuEuKj1BmQU35IZHf2d95bPxXxBnznHVZhqOiY0jk9vk0w1OvAhL6mjepcR12wI dL8mk5y/GJjR7La02jKr0FJ5nKOEZhk83NX1nXsYTX98SsfeUNWkk64shjNfqNLbVIpA ms0N5mUwJ6suPwYm4oT5DNSLDq/vbgxV5mTTuyvhoa2tkreqP9om7VMp+j4Hp3XJ5qa0 +aEw== X-Gm-Message-State: AOJu0YyReyh6/dOxrF7iKH0lM3kZ/pdP2BSF213+XXUGGFecjmunH5Pk FHiHn1N5p2gXYl3xCBa62aYYq7C13nI32Q== X-Google-Smtp-Source: AGHT+IHOGn/X5J+AWMRx7A5V5zQqemztxQ5iU67inudRawhkTjAESJa6IRgUrL4alprG9L8gzReigA== X-Received: by 2002:adf:ee10:0:b0:317:393f:8633 with SMTP id y16-20020adfee10000000b00317393f8633mr21990772wrn.58.1697141232924; Thu, 12 Oct 2023 13:07:12 -0700 (PDT) Received: from [127.0.1.1] (2a02-8389-41cf-e200-de42-73c9-6d1f-dd27.cable.dynamic.v6.surfer.at. [2a02:8389:41cf:e200:de42:73c9:6d1f:dd27]) by smtp.gmail.com with ESMTPSA id p7-20020a056000018700b003217cbab88bsm182093wrx.16.2023.10.12.13.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 13:07:12 -0700 (PDT) From: Javier Carrasco Date: Thu, 12 Oct 2023 22:07:08 +0200 Subject: [PATCH 2/2] dt-bindings: trivial-devices: add silabs,si7005 MIME-Version: 1.0 Message-Id: <20231012-topic-si7005_devicetree-v1-2-6c8a6fa7b3ec@gmail.com> References: <20231012-topic-si7005_devicetree-v1-0-6c8a6fa7b3ec@gmail.com> In-Reply-To: <20231012-topic-si7005_devicetree-v1-0-6c8a6fa7b3ec@gmail.com> To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, Javier Carrasco X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1697141229; l=1043; i=javier.carrasco.cruz@gmail.com; s=20230509; h=from:subject:message-id; bh=2+Iyh8RVH9Y2roARFTNQ7lEeeGJEecebSRkJV3HqyTo=; b=vtYzfZQdHu33vVjqLjQBWU7nHVCR30V1nzT888DJEely7Y+Bida3p8nivZ1Zs5EQ2BtVJvDUZ oKRUSs5mh1zBpWb88sfmv5fRyrTgba7HCrYwLniU9mN/q1NGRXiSnYx X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org This simple I2C humidity sensor does not have any additional properties and can be added to the trivial-devices binding. Signed-off-by: Javier Carrasco Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 430a814f64a5..05bf410ca9dd 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -348,6 +348,8 @@ properties: # Silicon Labs SI3210 Programmable CMOS SLIC/CODEC with SPI interface - silabs,si3210 # Relative Humidity and Temperature Sensors + - silabs,si7005 + # Relative Humidity and Temperature Sensors - silabs,si7020 # Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply - skyworks,sky81452