Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp81647lqd; Tue, 23 Apr 2024 15:41:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULilUp1cKHMwPUwgEbemDTAcVUZtES6J85BEUxOl5Cn7fyfOsxuKVJFp1pGmlh89mk+ZSbZQD+AP2D997Vi16kV8Q1q5xLv2WvQPlD0Q== X-Google-Smtp-Source: AGHT+IFN9ONh2jBfdNsrLdeO1ZWAr/eiYLhi/MP/qH6ErqKVxhrCZe4U0QbEzDbY6Lubihd6CVZW X-Received: by 2002:a05:622a:298e:b0:439:baf4:619a with SMTP id hd14-20020a05622a298e00b00439baf4619amr7316636qtb.22.1713912097593; Tue, 23 Apr 2024 15:41:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713912097; cv=pass; d=google.com; s=arc-20160816; b=DOBvV4Wnpmu7h0uE/+hcIRSrpbWutOzuAF4ARQFW9u8nx4rZ7mEHG7pnjhFR5dsE2J UwHgq7MpSYYY6nYcoemwOyUymX7+c/jpgE2LIxwuVRrES1X7NH6BrsV29dYJZOGRbn7F I25AMYRHILH41+19M2ebF83l3Og1S7v90cMi2muMOkbeFgD2f9kAYP4l0AjUV5px7c0y C/VJ2p0rh5NhMcuivy8qPzDW9jgS9y+SKWglhgerpO7nqxDlqR/7wOTOglGnLN42VxAy WkKqHU4MQnhyokg0x/HiOv9TUX5ip0h8Dg4Vf6SokdjBOHceOtMbseJlWC9RXskmQsUj 0aCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=dkim-signature:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from; bh=a7PU4WDv6YB/7pbWHelv2hIhCcSRKNyFO0apkn1vY0U=; fh=tE5n859cV0BjUJONcvWuvDBTrbwjawIl47goqTT+08o=; b=ikmCmSB7x23FNnl+OAucdf3tubglX3IfjQ6Y6zbpaunGARZzhJRcnuYGY89TbTZA+m JLInr5sHoxG9ZLoxcYa8TgEWfBtNSZn9z98MNZzc5dZgaoNQE302Hfso9GCa+F14KrwK CTtbstzZVVVrxv+Zhk2h9gUCDvwLEaO5sWdVJlfCUhFwFOVn8Jn+Y+/VAo1j7eUCLzph w1z3T/OPNp7ZyrE2BnhGKM183WfQYZeWQHDUTlCfvRkESrjHoIse0ffZR8Dt7/AowJdO N/Lj6wGEpC55L4Ugo2B8mr8Gf1P+JEDVAOSjtxftlIIkIWD9xjaG/B4oAtgxPnUEyT+b 1PYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@peacevolution.org header.s=dkim header.b="UbPW8/Oo"; arc=pass (i=1 spf=pass spfdomain=peacevolution.org dkim=pass dkdomain=peacevolution.org dmarc=pass fromdomain=peacevolution.org); spf=pass (google.com: domain of linux-kernel+bounces-155962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=peacevolution.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id eh6-20020a05622a578600b0043796e9d70asi12865274qtb.609.2024.04.23.15.41.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 15:41:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@peacevolution.org header.s=dkim header.b="UbPW8/Oo"; arc=pass (i=1 spf=pass spfdomain=peacevolution.org dkim=pass dkdomain=peacevolution.org dmarc=pass fromdomain=peacevolution.org); spf=pass (google.com: domain of linux-kernel+bounces-155962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=peacevolution.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2D7D91C22AD8 for ; Tue, 23 Apr 2024 22:41:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3D643F8C7; Tue, 23 Apr 2024 22:41:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=peacevolution.org header.i=@peacevolution.org header.b="UbPW8/Oo" Received: from a.peacevolution.org (a.peacevolution.org [206.189.193.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98ED11E898; Tue, 23 Apr 2024 22:41:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=206.189.193.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713912079; cv=none; b=klBn0/JGfFLGGKBeLUfprQJMWBAstaxGpGfLE3lR4xqQI2gtJi03ofVqyEkHuDxcbmi2of4vZVKCMA9bi5HMLm7Qvfq1dGIQ5iSikNBrYk7gZtSDaJpYYXDCSXqhEpn4lit/S4+fl67LznMWnRUOcbkx/LIuBllO3cMYVUYTq+Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713912079; c=relaxed/simple; bh=VgV+qCaKdW6B3jmUvzPURLXsRQqGq9RRxeY0w6UalFg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GsGt1YDqPBH5scMb+JItP2nyrkevQ4RIFuFdEEZ5FMpKu/+XFANzcgSEWp8POXee9aqui2q3M00ZGZxUJaF2fCKKtQ4fQXi1BFgi5bAY4DZTIatxk0fgPSrgOzZGec3Vd5DG/HmV9Z7H2uIkFWv0kIv+UHgIsYqrTdWPSp7Dymw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=peacevolution.org; spf=pass smtp.mailfrom=peacevolution.org; dkim=pass (1024-bit key) header.d=peacevolution.org header.i=@peacevolution.org header.b=UbPW8/Oo; arc=none smtp.client-ip=206.189.193.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=peacevolution.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=peacevolution.org Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by a.peacevolution.org (Postfix) with ESMTPA id 5E54147A02; Tue, 23 Apr 2024 22:41:08 +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=20Kleine-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 v2 0/6] iio: light: stk3310: support powering off during suspend Date: Tue, 23 Apr 2024 18:33:03 -0400 Message-ID: <20240423223309.1468198-2-aren@peacevolution.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: auth=pass smtp.auth=aren@peacevolution.org smtp.mailfrom=aren@peacevolution.org X-Spam-Level: **** X-Spamd-Bar: ++++ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=peacevolution.org; s=dkim; t=1713912069; h=from:subject:date:message-id:to:cc:mime-version:content-transfer-encoding; bh=a7PU4WDv6YB/7pbWHelv2hIhCcSRKNyFO0apkn1vY0U=; b=UbPW8/OogtAEjAnzCYyz7x4fhb0ccUmtFHS+FaUiEgQl2dvZqlxDNioLZAlOQdMLH11n0O 3mmaOoPG+U68t1SVf2nsljrqSyC4FkdDksSU+a9Dfg7I1+WT6swV830ha0br1xEmKE2hDX EwF8D+s1kB33T4XVo6C3ICNK0XqKsEs= 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. Major changes in v2: - Add handling of the IR LED. I was hesitant to include this as it is the same as pull-up regulator for the i2c bus on the hardware I have, so I can't test it well. I think leaving it out is more likely to cause issues than including it. - Convert stk3310 to use dev_err_probe for errors. - Always enable / disable regulators and rely on dummy devices if they're not specified. - more listed in individual patches Aren Moynihan (4): dt-bindings: iio: light: stk33xx: add vdd and leda regulators iio: light: stk3310: Manage LED power supply iio: light: stk3310: use dev_err_probe where possible 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 supplies to stk3311 .../bindings/iio/light/stk33xx.yaml | 4 + .../dts/allwinner/sun50i-a64-pinephone.dtsi | 2 + drivers/iio/light/stk3310.c | 116 +++++++++++++----- 3 files changed, 94 insertions(+), 28 deletions(-) -- 2.44.0