From patchwork Sun Apr 14 17:57:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aren X-Patchwork-Id: 13629175 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 4978DC4345F for ; Sun, 14 Apr 2024 17:57:58 +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:References:In-Reply-To: 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: List-Owner; bh=rRpQFSTfTknuYiDtbjp7SUMkLCtYrM8lvsI7kogTjbU=; b=VnGjJ9EIF4781h Pw5bQ4h7linAklbIZ6amsH+MftujBAOEcdMF7cvug0WRbdCuKp4QmBxSXHWwoNxAiyi2Dl5jvLIJF scBqbEQ5UjA2CL3PxKtjshqXMhgtlIcbfXoyJNkRlzM7nelN9t+rjmx1Yb83ib/Cd71rueqHTFUhx hqImfqeP4nr70wo6osxDlJjnYUwiLK5PIUaEMefHgqpjBa6xsenT2bewkdNl7R8rE5pXHesEUK6fb qvUoNJBF3uo4igbPCWVVyE1PFqIjvGTlh/zOkLYFDis65JLOyMLjkztEpHuDTGetUXzMXJubfpisz 3KSUCgjcPilbQx3L2Tgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw46v-000000062mb-1yeH; Sun, 14 Apr 2024 17:57:49 +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 1rw46s-000000062m1-2vZV for linux-arm-kernel@lists.infradead.org; Sun, 14 Apr 2024 17:57:48 +0000 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by a.peacevolution.org (Postfix) with ESMTPA id B694A477A3; Sun, 14 Apr 2024 17:57:42 +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 1/4] dt-bindings: iio: light: stk33xx: add regulator for vdd supply Date: Sun, 14 Apr 2024 13:57:13 -0400 Message-ID: <20240414175716.958831-1-aren@peacevolution.org> In-Reply-To: <20240414175300.956243-1-aren@peacevolution.org> References: <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=1713117463; h=from:subject:date:message-id:to:cc:mime-version:content-transfer-encoding:in-reply-to:references; bh=CesaFwldMwrSvD6nWyMyYyBUiPFFE7iFAN11Z414ucM=; b=Lx4uQdlLS7jsXaUgeIRq2ULGpkrC7J9Np6EBiZIqdpS+VQcICSMbuWkQiUcKSqZLL/WVzq Il08BR6tlN938EPhlGLsv5/PoURrsWbeKDin+fUDEMX8rEJkmG1+3Uwo0ZFjWy+6NtAh0f GYE00rsAzEtDTdluoNdsg5G5AJ0S62k= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_105746_831057_8A336A78 X-CRM114-Status: UNSURE ( 6.74 ) 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 Signed-off-by: Aren Moynihan --- Documentation/devicetree/bindings/iio/light/stk33xx.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/light/stk33xx.yaml b/Documentation/devicetree/bindings/iio/light/stk33xx.yaml index f6e22dc9814a..db35e239d4a8 100644 --- a/Documentation/devicetree/bindings/iio/light/stk33xx.yaml +++ b/Documentation/devicetree/bindings/iio/light/stk33xx.yaml @@ -29,6 +29,7 @@ properties: interrupts: maxItems: 1 + vdd-supply: true proximity-near-level: true required: From patchwork Sun Apr 14 17:57:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aren X-Patchwork-Id: 13629176 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 6B929C4345F for ; Sun, 14 Apr 2024 17:58:06 +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:References:In-Reply-To: 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: List-Owner; bh=jc91s1jnPFN+Et/NYaeVMkddkRT7FIKkFDYWJO6MhFM=; b=T96yoOmAVt3dcz cJUlQ6anAwKn5DVLKqF7OmUWc5FhWGLM4EZdwdpG5yYyVaIOYt+5vElY10zN92pba1mDDgiA3zPJv Dd0JHV08LnynrpL/CGvHwVxYGXZHT9E6r3fYAxE7HbVfxV3J9+M16JCsMC6z73RnYydHIdhzOqkCR iE3bcDneUGsUV+72Lv4HFKxgmqGtYsByC1X0qNugNIahkk29IYvZcYn44RFwhEqzJarjwwRVOhNhJ KixqgAzeKdZGVrXETA2nUiW2M1MRyTQwmjUm0iT5gPmWX2eHitnrnR4Uko1Ne5letKs3qblg/fqVc txrj+TynF9Q1kip1mozg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw472-000000062oz-1tRL; Sun, 14 Apr 2024 17:57:56 +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 1rw46z-000000062ni-3x71 for linux-arm-kernel@lists.infradead.org; Sun, 14 Apr 2024 17:57:55 +0000 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by a.peacevolution.org (Postfix) with ESMTPA id D8FB347965; Sun, 14 Apr 2024 17:57:51 +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 2/4] iio: light: stk3310: Implement vdd supply and power it off during suspend Date: Sun, 14 Apr 2024 13:57:14 -0400 Message-ID: <20240414175716.958831-2-aren@peacevolution.org> In-Reply-To: <20240414175716.958831-1-aren@peacevolution.org> References: <20240414175300.956243-1-aren@peacevolution.org> <20240414175716.958831-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=1713117473; h=from:subject:date:message-id:to:cc:mime-version:content-transfer-encoding:in-reply-to:references; bh=ZKSgSZr/52jxxhOzrlt61t9DbIznbduvvmE0nk+D74c=; b=apJvp2uxLX++fTOkwbVsX7C+kB+jPyIlrIE4AdtpWE3L5VYuZbvakkgCW2Z5U65LZ42tyD XrGjA6nmS3WSOdjT3wxoIvvicMTgUnI0NDNxrxT5csega06OKL83o4eFE3aTrb8/+THORg 81m+ubmpuFGWceJWeE5c90HOWbL0+KE= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_105754_210102_34504E1D X-CRM114-Status: GOOD ( 16.32 ) 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 From: Ondrej Jirman VDD power input can be used to completely power off the chip during system suspend. Do so if available. Signed-off-by: Ondrej Jirman Signed-off-by: Aren Moynihan --- drivers/iio/light/stk3310.c | 56 +++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c index 7b71ad71d78d..bfa090538df7 100644 --- a/drivers/iio/light/stk3310.c +++ b/drivers/iio/light/stk3310.c @@ -16,6 +16,7 @@ #include #include #include +#include #define STK3310_REG_STATE 0x00 #define STK3310_REG_PSCTRL 0x01 @@ -117,6 +118,7 @@ struct stk3310_data { struct regmap_field *reg_int_ps; struct regmap_field *reg_flag_psint; struct regmap_field *reg_flag_nf; + struct regulator *vdd_reg; }; static const struct iio_event_spec stk3310_events[] = { @@ -607,6 +609,16 @@ static int stk3310_probe(struct i2c_client *client) mutex_init(&data->lock); + data->vdd_reg = devm_regulator_get_optional(&client->dev, "vdd"); + if (IS_ERR(data->vdd_reg)) { + ret = PTR_ERR(data->vdd_reg); + if (ret == -ENODEV) + data->vdd_reg = NULL; + else + return dev_err_probe(&client->dev, ret, + "get regulator vdd failed\n"); + } + ret = stk3310_regmap_init(data); if (ret < 0) return ret; @@ -617,9 +629,18 @@ static int stk3310_probe(struct i2c_client *client) indio_dev->channels = stk3310_channels; indio_dev->num_channels = ARRAY_SIZE(stk3310_channels); + if (data->vdd_reg) { + ret = regulator_enable(data->vdd_reg); + if (ret) + return dev_err_probe(&client->dev, ret, + "regulator vdd enable failed\n"); + + usleep_range(1000, 2000); + } + ret = stk3310_init(indio_dev); if (ret < 0) - return ret; + goto err_vdd_disable; if (client->irq > 0) { ret = devm_request_threaded_irq(&client->dev, client->irq, @@ -645,32 +666,61 @@ static int stk3310_probe(struct i2c_client *client) err_standby: stk3310_set_state(data, STK3310_STATE_STANDBY); +err_vdd_disable: + if (data->vdd_reg) + regulator_disable(data->vdd_reg); return ret; } static void stk3310_remove(struct i2c_client *client) { struct iio_dev *indio_dev = i2c_get_clientdata(client); + struct stk3310_data *data = iio_priv(indio_dev); iio_device_unregister(indio_dev); stk3310_set_state(iio_priv(indio_dev), STK3310_STATE_STANDBY); + if (data->vdd_reg) + regulator_disable(data->vdd_reg); } static int stk3310_suspend(struct device *dev) { struct stk3310_data *data; + int ret; data = iio_priv(i2c_get_clientdata(to_i2c_client(dev))); - return stk3310_set_state(data, STK3310_STATE_STANDBY); + ret = stk3310_set_state(data, STK3310_STATE_STANDBY); + if (ret) + return ret; + + if (data->vdd_reg) { + regcache_mark_dirty(data->regmap); + regulator_disable(data->vdd_reg); + } + + return 0; } static int stk3310_resume(struct device *dev) { - u8 state = 0; struct stk3310_data *data; + u8 state = 0; + int ret; data = iio_priv(i2c_get_clientdata(to_i2c_client(dev))); + + if (data->vdd_reg) { + ret = regulator_enable(data->vdd_reg); + if (ret) { + dev_err(dev, "Failed to re-enable regulator vdd\n"); + return ret; + } + + usleep_range(1000, 2000); + regcache_sync(data->regmap); + } + if (data->ps_enabled) state |= STK3310_STATE_EN_PS; if (data->als_enabled) From patchwork Sun Apr 14 17:57:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aren X-Patchwork-Id: 13629177 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 05097C001CC for ; Sun, 14 Apr 2024 17:58:18 +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:References:In-Reply-To: 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: List-Owner; bh=ljpvUCS47CnTPHWqshfIvHcksSTyiiKh3D+GISeuU2Q=; b=D0DNdk2cnMOxaP xKdCji4bZ+T12fRvaJVs0Qqv1rsmxp4n/av03TT8BgDuGbIMPSf3TJvgbwAWwL0lmsr37yENpgnUR RNgh0bUJpGAwV4VSHD04VkXEm+VSeomJCEpVU4mS7Aap7645rNfg4JUpO9Pz+fc+GMCLn/TH4N5/+ ON9rMzRnEwyAlz5Y5S1B2TT0nVDwOpHx7Fg2w00SIMAlOY7vvctN5SIHdYg3hVF8Tq5esop+DWvFz NfKnmhFZNus79xVzW55cXcQTfhP4CBjJ3RWD0tSqBvOTq0giBO1oR1MncHFuxBwApouWnzTgqHK8W PL2Y/DYWS5mCPCRdi0aQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw47E-000000062vG-08cS; Sun, 14 Apr 2024 17:58:08 +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 1rw474-000000062pp-2Bt5 for linux-arm-kernel@lists.infradead.org; Sun, 14 Apr 2024 17:58:00 +0000 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by a.peacevolution.org (Postfix) with ESMTPA id 93FFB477A3; Sun, 14 Apr 2024 17:57:56 +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 3/4] iio: light: stk3310: log error if reading the chip id fails Date: Sun, 14 Apr 2024 13:57:15 -0400 Message-ID: <20240414175716.958831-3-aren@peacevolution.org> In-Reply-To: <20240414175716.958831-1-aren@peacevolution.org> References: <20240414175300.956243-1-aren@peacevolution.org> <20240414175716.958831-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=1713117477; h=from:subject:date:message-id:to:cc:mime-version:content-transfer-encoding:in-reply-to:references; bh=mSyThA18ConajLRbOxnTiXskFDN8zF2RJ8eodogp9aI=; b=Wd0IIGb4UF+4/RrNlJGIPlj2aYp24AY7lM6c471i2R/h3KubNP+F2SPPos44PXxcVOKZkn 5oWvrEd1gPsGkpKek5sM3J5dg1MFE/GReG8LyEMVwSKIbPhOjidt5Ddnbb6TFIMyRFH2+X JamfRiETlmwufCuwjHaQ3hAbAU5MFNo= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_105758_730363_17726AE2 X-CRM114-Status: GOOD ( 10.73 ) 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 If the chip isn't powered, this call is likely to return an error. Without a log here the driver will silently fail to probe. Common errors are ENXIO (when the chip isn't powered) and ETIMEDOUT (when the i2c bus isn't powered). Signed-off-by: Aren Moynihan --- drivers/iio/light/stk3310.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c index bfa090538df7..c0954a63a143 100644 --- a/drivers/iio/light/stk3310.c +++ b/drivers/iio/light/stk3310.c @@ -472,8 +472,10 @@ static int stk3310_init(struct iio_dev *indio_dev) struct i2c_client *client = data->client; ret = regmap_read(data->regmap, STK3310_REG_ID, &chipid); - if (ret < 0) + if (ret < 0) { + dev_err(&client->dev, "failed to read chip id: %d", ret); return ret; + } if (chipid != STK3310_CHIP_ID_VAL && chipid != STK3311_CHIP_ID_VAL && From patchwork Sun Apr 14 17:57:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aren X-Patchwork-Id: 13629178 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 BB60FC4345F for ; Sun, 14 Apr 2024 17:58:21 +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:References:In-Reply-To: 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: List-Owner; bh=rpxVQE9PnQzId5JoNUFBy+0tHCC2X6GWDYzVQXmTz+o=; b=edZfkLPd8cOzW+ leYxsXV1aHLl9aoNV2DpOAEiQaNV1HVWPPq6wbLIwk/S6gzsit2pNjm6L+pBRYNs4YzKRaAH+PDwm eXuSPWHTHFQA+4EbFPqk3ql896AiEm1W/UqEj1KLIenN5D2XkqjweSt7O+o6iOO7jbPkDs4RZTqA+ 9DZA3X2qBXwFV817/vaTN4M5Mp+w6y/h5N8hFdVfzYq6l3KojFWovspmPUXJWtjZz8srcDtB2PJW4 i5rgbAh3WzsJKi2nAWx9P3NNkuRStVrGH5RFs0CXAnIwBgh0wTKSUwy+WbBpJQOFQwmIn9VeUhzKl zZgDSqIm+huuArVtEMFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw47G-000000062ww-3yfj; Sun, 14 Apr 2024 17:58:10 +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 1rw476-000000062rG-3mTu for linux-arm-kernel@lists.infradead.org; Sun, 14 Apr 2024 17:58:02 +0000 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by a.peacevolution.org (Postfix) with ESMTPA id 17D3547963; Sun, 14 Apr 2024 17:57:59 +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 4/4] arm64: dts: allwinner: pinephone: Add power supply to stk3311 Date: Sun, 14 Apr 2024 13:57:16 -0400 Message-ID: <20240414175716.958831-4-aren@peacevolution.org> In-Reply-To: <20240414175716.958831-1-aren@peacevolution.org> References: <20240414175300.956243-1-aren@peacevolution.org> <20240414175716.958831-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=1713117480; h=from:subject:date:message-id:to:cc:mime-version:content-transfer-encoding:in-reply-to:references; bh=6v+9LICWwNBv05pAzbiQ9LAhqjunLZ7gdVFFNyxU1mw=; b=k60ZaVvdziPJhGY/EVOspCAhKUai7wJ8U9M0QTYRcu3bnqfH6ZljC0sKXdOFyl3Rc6EZtB Df7jHgk5D9kypbfcvwbP+DtUUeHIWvbEHp9f4ZBDKi7YM3u1jBWct4ZQoRtneWKU/lNYxt ap8ClX1qJE7r8knOQPcjvKk4JK42gBQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_105801_099945_042CCEA2 X-CRM114-Status: UNSURE ( 7.90 ) 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 From: Ondrej Jirman This makes the driver disable the supply during sleep. Signed-off-by: Ondrej Jirman Signed-off-by: Aren Moynihan --- arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi index b5a232209f2b..e87bc21db316 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi @@ -250,6 +250,7 @@ light-sensor@48 { reg = <0x48>; interrupt-parent = <&pio>; interrupts = <1 0 IRQ_TYPE_EDGE_FALLING>; /* PB0 */ + vdd-supply = <®_ldo_io0>; }; /* Accelerometer/gyroscope */