From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 21A0927FB2E for ; Wed, 13 May 2026 14:26:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778682414; cv=none; b=kQPWP4yCRsDvieZhKRGJ5wB8M7Kkwlcqg1bAE2//hRkYKbKRO2W3jXgqMf6hJCm2YQRD/0Z1O+aFwYnbdxtmCsU4+8VVRxzjcjaSeO9k4kjuUAylUavkUQRSvN2aGkU3PUrx5WYtZiZz3PGapEPkVCb1eh9sH1wL0/IYDns6JyI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778682414; c=relaxed/simple; bh=43usKQwgDJhhxBpU9LGaTevXnc0colQXUWRKIdd7avg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=e/gi4esJHK1Zs8HbwwDp16ZzIy2ZLA2fHDu14PvP9edlGGnXQIKkw0MkxSsoXqMVTTVVjNA6XzLHoF1Erou1klnCHR7E6BuB14g1ydwFMpbMNa15j1x10CUbgqnleGyLh7qtOEJGfpofQd8USWg423wfgNQ2z9SzshMfkPx1UtY= 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=D3jild4F; arc=none smtp.client-ip=209.85.221.46 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="D3jild4F" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-43fe5574cb9so662944f8f.3 for ; Wed, 13 May 2026 07:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778682411; x=1779287211; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=43usKQwgDJhhxBpU9LGaTevXnc0colQXUWRKIdd7avg=; b=D3jild4FxeQPXuHb5bKt+qPGIMbt+7grMLaaf6ggWlb2p4eNZ+sbY6c6WRU2HvV+gA gi3tAIDoB4Q8D27SCaqS5nd3sO/nJOvjJzleMzeHnpVplzs5jP2nI16ihmyMORgFng1U zBZncD9L02fUz4zHzreOVEEx8CrAXhC+DjoJFBayMT5WmRvNR8v/GfZyL3APfH0MMQp3 MULKks59x0JtU5kkFkuLKcAk8LNBgmwX95NYTc66ixUbbys/SOoWigvU4dd4XHQIKCrx PEvrqFqxWlay1jFIhiSEVtQ2+amNn2IiuVMm4fiC6rit/QQ98k6g55j/WkcIVf9aIEgV MtXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778682411; x=1779287211; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=43usKQwgDJhhxBpU9LGaTevXnc0colQXUWRKIdd7avg=; b=LP9VLxq5P3yDXv4H2/dT2hNCKnl8QONqFz+QaAjCx68oYnakq7eKeKnDcXEgqBKzbY UgBCqQ7OuDS/JvgimqtVBov4xgnYbqQQcMSIlPfT2iGuCQ5eBwlrw6vcJYTfM32ia5Lx Zh9NaYoYdMJiUIXFCgf+3QH+SDg4i7xD3O/0OsKPWCci8pttgya2WMv5994wDOXyEZdp um9wy5K64ClL47XumsE8meu4QXpSHVTCwiSRqSb2+TRJDtD7PqXirEJyKX0fveO8Z7SO n74Vzeu27Hi+5Kx9zgOhQ2dK0/gssqjLZkYzn8WORcqt/93XoWdHfwT7g1FPURi3jSb6 5HhA== X-Forwarded-Encrypted: i=1; AFNElJ/hgyRsE+JPPs4AgcU7kCYf3qG9btXF/ncGGZ4+5VYDtTGZnazs9R0+OQOza4wPoY10V1+Z1A1EICivszo=@vger.kernel.org X-Gm-Message-State: AOJu0YyZtbOAmRsJZ14/zSglRQKjTKfMNRFRsjEGvV4rEF5nsLtnxqb/ MXJ/rVKx4iV8Etybe0jVRTyZoQx5gKzMBQvb9XHq2EeGmGT/uBhuwid3 X-Gm-Gg: Acq92OFCds5pC+ExKfsIKLuXYtwuAd9HXt7KAiqqOqANSFV1Xt/j2lqKu8LGk59bgcO 9Qt6llvycEvjT3eKdKXJmTfXjpP98k3ZgnNyPaKOLVfs4mMk4SSk4ToYSLFFs45Uw0xuuQdWq6k RBQ2e31xZ2zFKyEYuQG6Txz6RqXh7sNKL3CVx7/Rl5VYQnCYWKI0XjPZYt0hoJHvC3aR/HcAKSf AOVDsKwjhx0gP21V8xQb13Rxk/8pGoAIHy/+Tj6BZTS3YwmUwaGFFnsxf6cifcTw5yLvcdkIzpf I+qKP7hSI3sy2JHfKpLzgLHceXGOcNAZOGDTLl168VqyMzyEDlYYjU1bq3al41YJUqCPqigCFmV AEL2UVP39P8yNRmDS218a5f7r+6xMKOVi+NQ0kAnATPVXdFP3rqc9/DJSIvw1LTLad+J9xti0eI f+0nsY3NVqizkmQ3xzm+aE7bdkuXL+IdK39aNJEOQtGKv9 X-Received: by 2002:a05:600c:1385:b0:485:c456:5e4f with SMTP id 5b1f17b1804b1-48fc99a0f46mr25896095e9.0.1778682411364; Wed, 13 May 2026 07:26:51 -0700 (PDT) Received: from localhost.localdomain ([82.215.118.79]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fc8d624fbsm183169395e9.10.2026.05.13.07.26.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2026 07:26:50 -0700 (PDT) From: Stepan Ionichev To: jic23@kernel.org Cc: arthur.becker@sentec.com, dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, gregkh@linuxfoundation.org, hcazarim@yahoo.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, sozdayvek@gmail.com Subject: Re: [PATCH] iio: light: veml6040: add suspend/resume support Date: Wed, 13 May 2026 19:26:32 +0500 Message-Id: <20260513142632.9445-1-sozdayvek@gmail.com> X-Mailer: git-send-email 2.33.0.windows.2 In-Reply-To: <20260513094536.8038-1-sozdayvek@gmail.com> References: <20260513094536.8038-1-sozdayvek@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Wed, May 13, 2026 at 19:15, Jonathan Cameron wrote: > Suspend / resume tend to be a little non trivial to add and datasheets > are sometimes less than perfect in describing powerdown modes, so can > I confirm: Do you have one of these that you are testing this with? Honest disclosure: no, I do not have a VEML6040 board to test with. The patch was prepared from datasheet inspection only (Vishay Doc# 84276 Rev. 1.7, Tables 2-1 and 2-2) plus the existing in-tree usage of the same SD bit in veml6040_shutdown_action(). If lack of hardware testing is a blocker for a PM addition, please drop the patch; I am OK with that. > dev_get_drvdata() rather than going in circles. It's get of > 'implicit' knowledge that works for i2c sequences like this Noted -- if this stays in scope I will switch to dev_get_drvdata(dev) in the suspend/resume callbacks. > Andy pointed out regmap_clear_bits() is handy here and set_bits above. Yes -- Andy made the same suggestion on v1 and I have a local v2 that uses regmap_set_bits()/regmap_clear_bits() (and applies the same simplification to the existing veml6040_shutdown_action() for consistency). I was going to send it after the 24h wait, but happy to hold it until the hardware-testing question is settled. Stepan