Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1512671lqg; Sun, 3 Mar 2024 13:54:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWcVp6MKFj2O2apZ3x63SZyfHsW1hB/PCbpQQ+QOd/N6o+qamtQo/2/oxWaHzQsD8umWWs+fi5dJjjz4EAgcB0AKJ6Y82xwrWirjpzpMA== X-Google-Smtp-Source: AGHT+IGbiFixJ+uz86cs8hVF+ZDz0nDFUQt1W+2iJXgHWDc4eUY7Rr210TKYlE3Ldp2/eXvx85p6 X-Received: by 2002:a05:6a20:3d06:b0:1a1:3cff:874e with SMTP id y6-20020a056a203d0600b001a13cff874emr5735554pzi.8.1709502883311; Sun, 03 Mar 2024 13:54:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709502883; cv=pass; d=google.com; s=arc-20160816; b=T8ar/2DUHTizVrmmsdXUL/8SI8Z5OHoSXo/mzn4bhnWCcIkgOxdy/GQGUxvXWt1ZOF nM6NypEZ6cd2nEKKBb1swBjbz6RQtq9UVRmA7sXhRo2QfXUynB3q7VY9G2dbeukqcJjO gi2Eu1qyiyTrkIttzilJhWYgwRsGM0jL12cbmJohqB9Jsey3eElWFn+ZfeJphJyDT0b9 Q1yQrv8IhfMxDFTndnqcFzcdxx1RZbIl2c/HKv7P5pbHSqw14/9e+ouGe27M7+EIH5LM LvjD2Tu3Y7CpXaMClVC8UPTgWpq9RCy3NX9PsWDNNvmnPb6zKiwlePLsizzXyCygdVp1 2e8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=jtiYH4zwlx8zDDEXeMfd+INoXxmmkFyqY1aEjdjWv3c=; fh=IA/Pu4CiyUKHOS8vCMR6Yr1ZgUkw/rmvVwso7Vn8l20=; b=xnMvdFTmKgm90lisZBUxaoPN2IIU+WR4Dhx6mMqv4tijGWZaxGU/GEl1bf3EYh4Cme lvlkZa9y7JSrfNP60ZrjMV+aV1pD6Hr6aIHuTWn5M129kGJPPiibXh/DWzPJghyjJ9bj WbV5u+7ZgahAJ0VESIxwy6perQ3/XF5pZsqycKVt2fWqqfZSeFYma3xOLDuWz7+CLhvg sOGF36gj1H44XDYbLeHmM+0O9Are1EzaJl/DSOW6PPAhVDxk9XdF/bPpz4E07EztuwUn QCJirO/p58uqKE9zTyT3AVbaAi/ufGRDi4VQ4AdJPB112TdzO9OKMEIxEvsBNYENq98K dYkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F5NQQIZe; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-89918-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89918-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ot11-20020a17090b3b4b00b0029b515247f4si310617pjb.74.2024.03.03.13.54.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 13:54:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89918-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=F5NQQIZe; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-89918-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89918-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E1BB6B20BEF for ; Sun, 3 Mar 2024 21:54:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13FF17A722; Sun, 3 Mar 2024 21:54:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F5NQQIZe" Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 89066BA33; Sun, 3 Mar 2024 21:54:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709502867; cv=none; b=VB+s+iKoe+Sz2qx2Z9gNc+uEjmcToYtYm7r7/8wb+90Pz6We533FksQDd0tyTPf82048oOL21zOpOk7yCZzQs+t31U++pUvIe7KH3BjOrxZhzKfzU3s+oDRGm7bk7D1uBLKpudAgprsnU2PFPffQvJ8jjN/9OYilgDagzRHHsTA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709502867; c=relaxed/simple; bh=J4/vUGcKMLRc7eKsXpAfRNOfuulhtF8ewzuI27Q8VaE=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=AohibKXxK+9pdxMaf+OJYJWYD8ofPCBrxd+4ffRF943dHzPr9MQVfR3Ik/0h4kPx9fGXOLezXgK3S95DEC3KbslKkjhkZPe2bUcEUcmKgV0EDXtXj+3r4DueCcqZ7b5cggMrYnD0aXAchY/A7Nj/ce8MbgZ/M33slr4nwFKukIw= 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=F5NQQIZe; arc=none smtp.client-ip=209.85.208.43 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 Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-566e869f631so2421241a12.0; Sun, 03 Mar 2024 13:54:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709502863; x=1710107663; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=jtiYH4zwlx8zDDEXeMfd+INoXxmmkFyqY1aEjdjWv3c=; b=F5NQQIZeLBvEaFplE9GMbcLHGyz/1/RuZDY8Y9UHlEp1SX7o9zNH9x9sYfUQ1Ya4oF uiW3+XLk9c2OgKxJInvFzzXUEMq/4YY48hwZI5pxLGsVWkjyYFh1CfuBGrlVT3w9BLO6 rn5y1OJ3uRoK1DVHU69XTVgM4jdq1Cz6Cfw6nbUPt0D9V1z+hz4SedyI4Wizq0lxBq0D EH9K92S52/m9+zzlyYONXW5rW8mHsgjrCvSrb1h7XhQwDb0GjawRy8Lkue7fNoMYUd7V mOtOpGWnRZddXe9q3jV2cbv8D669ophiDWH8eWadlkKSOvhM0g9z3WkwSexYbo6f/yGE nUhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709502863; x=1710107663; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jtiYH4zwlx8zDDEXeMfd+INoXxmmkFyqY1aEjdjWv3c=; b=MFwrnCIE4GX6f4nmR+82x7LNoY46g3aI7DzsV5ZRU6cZ4RO9MVfaP4m8NzAKXxJGAV uVBf8Ki6mmjjTjU7fExuPy54KFNvv934au/Bn/DNwTpo1He/skF2ZsNK32w2bka5fbXO 1LpuPA+H5t9fIuuT4+JOoK+84FBraelxEa4Ovi2ptmweeedkL5Wh7xU6PYtJmq3R963J 9KS35bmBAyEOjogTUnVQphX/ZPpywxwp6Qr1zRsEUwuUqkd3QszSHK+w0TwOLZcS6qIe UcC+NOJ2faxNjINPce9A5I8vFoeOETDG2g0sTauOIC84krP4pYry0NKZuXJBti8BHqGO Aokg== X-Forwarded-Encrypted: i=1; AJvYcCVz/gA0YC5Q8yzWVoSwIO6/ckGnXQlKtJjea1ByqP4+aKJTy3jOH19drCiNNMnRi8ctR+J/oopkZ5q0W7wa7Z1Ubu/0QAlLy/ha5hKhbJxWv8g/TINs8YhyyW3JwE+FB0s5dW3VN1WriM49c97a5eaFKlQTiP5fhVBj8CFw7PZ6W1KByA== X-Gm-Message-State: AOJu0YwFBqQ+INh87xf0UxssMhbfIwZbfB61lskcVoN1Cxdi5gI2ynOu 1xAEj+mfKl3YlbpOx45deP8QeUakKPyUBx4oTYEnLa/05odfe9jPtJxZ3KmKJpK4BA== X-Received: by 2002:a50:c943:0:b0:563:c54e:f1 with SMTP id p3-20020a50c943000000b00563c54e00f1mr5296169edh.2.1709502863284; Sun, 03 Mar 2024 13:54:23 -0800 (PST) Received: from [127.0.1.1] (2a02-8389-41cf-e200-b3d8-5b4b-5188-4373.cable.dynamic.v6.surfer.at. [2a02:8389:41cf:e200:b3d8:5b4b:5188:4373]) by smtp.gmail.com with ESMTPSA id n22-20020a05640205d600b00566d6950d14sm2783250edx.92.2024.03.03.13.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 13:54:22 -0800 (PST) From: Javier Carrasco Subject: [PATCH v3 0/3] iio: humidity: hdc3020: add power and reset management Date: Sun, 03 Mar 2024 22:54:19 +0100 Message-Id: <20240303-hdc3020-pm-v3-0-48bc02b5241b@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAIvx5GUC/1XMQQrCMBCF4auUWRuZJJKkrryHuGiTsR2wtiQSl NK7mxYXdfkefP8MiSJTgnM1Q6TMicdnGfpQge+bZ0eCQ9mgUJ1QSSv64DUqFNMgpLW104G0b1o oYIp05/cWu97K7jm9xvjZ2lmu7y9T+C6TpUARHBkMLdma6ks3NPw4+nGANZPVnpo/qgr15I01B p0ht6fLsnwBeGXZIN8AAAA= To: Jonathan Cameron , Lars-Peter Clausen , Li peiyu <579lpy@gmail.com>, Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Jonathan Cameron , linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Javier Carrasco , Krzysztof Kozlowski X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1709502861; l=2134; i=javier.carrasco.cruz@gmail.com; s=20230509; h=from:subject:message-id; bh=J4/vUGcKMLRc7eKsXpAfRNOfuulhtF8ewzuI27Q8VaE=; b=dpPmkVmCIKpkL4MlOOZHOMbSnBSGNk6MMVhwhsPilqxiM4EG4Mj9kok7iobbAONnePvk968KC P+g4TXVJ/RACZcEo4TcUdmaLgkDRdU3wvn7Mu0dJk1+aT7z4H2do92J X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= This series adds power management for the hdc3020 humidity and temperature sensor as well as control over the reset signal the device provides. The hdc3020 carries out measurements automatically, which is not necessary in low-power modes. Furthermore, if the low-power configuration turns off the device, proper initialization is required to account for the setup times and initial status register value. This device provides an active low reset signal that must be handled if connected. This signal can be used by the driver to keep the device under minimal power consumption during low-power modes if the power supply stays active. This series uses char-misc-next as basis to include the last additions to the driver to handle events [1] as well as the fix to include the entries in the Makefile and Kconfig files [2]. [1] https://lore.kernel.org/linux-iio/20240214085350.19382-1-dima.fedrau@gmail.com/ [2] https://lore.kernel.org/linux-iio/20240121135123.71506-1-jic23@kernel.org/ Signed-off-by: Javier Carrasco --- Changes in v3: - Drop unnecessary casting to void in dev_set_drvdata. - Call devm_add_action_or_reset right after powering on. - Link to v2: https://lore.kernel.org/r/20240226-hdc3020-pm-v2-0-cec6766086e8@gmail.com Changes in v2: - Trigger power off sequence if the power on sequence fails. - Check return value of hdc3020_power_on() in the probe. - Remove type casting for void pointer. - Link to v1: https://lore.kernel.org/r/20240220-hdc3020-pm-v1-0-d8e60dbe79e9@gmail.com --- Javier Carrasco (3): iio: humidity: hdc3020: add power management dt-bindings: iio: humidity: hdc3020: add reset-gpios iio: humidity: hdc3020: add reset management .../bindings/iio/humidity/ti,hdc3020.yaml | 5 + drivers/iio/humidity/hdc3020.c | 111 +++++++++++++++++---- 2 files changed, 97 insertions(+), 19 deletions(-) --- base-commit: d4551c189d6e6a3fcf7f625bd4b273e770fad35a change-id: 20240217-hdc3020-pm-177983de3cab Best regards, -- Javier Carrasco