From patchwork Sun Apr 14 17:53:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aren X-Patchwork-Id: 13629170 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07749C4345F for ; Sun, 14 Apr 2024 17:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+GrcX1LjIzCDwuImHE2BEUGOYPWdzbQN+Hf7rILmlVg=; b=XtiK5lJ88pH7pz FUnX+2YJb9y6IuUNwhflHE5yLOar7NgnhYOjyrD9yDJspHWEDAtNu8mglRmIRURFzdtWENKPYiTnu dnEYIJ8L7a1zKXf/71znF19YnS9lyUnnvFrQrZTemTNZi+bWAaiegjCep0jRhHIYjDecM0dE1Qlby qqBwFaDNW4rCBKIMI3w+hb2Ny9q69OkmdCPSiUoW2wChjUuEFnZTNF5ePAxOYTiy4UY2cokYgsow9 6AHRkMwrgMu8goNDXMqaPhg3TjqY0CbF8SgizazaQ+jpIi3aSLdgozI2ENDAvMWtdN6wruaBuKT+G RGWHV7Aq2KMzyGLFVZdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw42h-000000062NC-0W3y; Sun, 14 Apr 2024 17:53:27 +0000 Received: from a.peacevolution.org ([206.189.193.133]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw42d-000000062MW-39yw for linux-arm-kernel@lists.infradead.org; Sun, 14 Apr 2024 17:53:25 +0000 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by a.peacevolution.org (Postfix) with ESMTPA id 1627547919; Sun, 14 Apr 2024 17:53:17 +0000 (UTC) From: Aren Moynihan To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Liam Girdwood , Mark Brown Cc: Aren Moynihan , Andy Shevchenko , Ondrej Jirman , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-iio@vger.kernel.org, phone-devel@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Willow Barraco Subject: [PATCH 0/4] iio: light: stk3310: support powering off during suspend Date: Sun, 14 Apr 2024 13:53:00 -0400 Message-ID: <20240414175300.956243-1-aren@peacevolution.org> MIME-Version: 1.0 Authentication-Results: auth=pass smtp.auth=aren@peacevolution.org smtp.mailfrom=aren@peacevolution.org X-Spamd-Bar: ++++ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=peacevolution.org; s=dkim; t=1713117198; h=from:subject:date:message-id:to:cc:mime-version:content-transfer-encoding; bh=tZiJxZ2AuICTeWkRxY/t4eLoCK/lqF8coOe31qJB5uc=; b=AkPOpLs808ZtiKcJa9pz2HuAjlVpX4g8KlIGfQAB66oclE2qRSEVXEAdPokvp0EFUtEP55 KJ7NxiYJzBhLrdswsvhwdog0bvpYittKiIaPsJv5Zvd/20+90uHj/tpykLItXKtliDkVHB FY4m2+3F3qGJbbymyr3VaXOlpVWO3b0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_105324_036486_674F992C X-CRM114-Status: UNSURE ( 7.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In the Pine64 PinePhone, the stk3310 chip is powered by a regulator that is disabled at system boot and can be shut off during suspend. To ensure that the chip properly initializes, both after boot and suspend, we need to manage this regulator. Additionally if the chip is shut off in suspend, we need to make sure that it gets reinitialized with the same parameters after resume. Aren Moynihan (2): dt-bindings: iio: light: stk33xx: add regulator for vdd supply iio: light: stk3310: log error if reading the chip id fails Ondrej Jirman (2): iio: light: stk3310: Implement vdd supply and power it off during suspend arm64: dts: allwinner: pinephone: Add power supply to stk3311 .../bindings/iio/light/stk33xx.yaml | 1 + .../dts/allwinner/sun50i-a64-pinephone.dtsi | 1 + drivers/iio/light/stk3310.c | 60 +++++++++++++++++-- 3 files changed, 58 insertions(+), 4 deletions(-)