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: 13629171 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 1E6C83B297; Sun, 14 Apr 2024 17:57:44 +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=1713117467; cv=none; b=cRF6PWpFI/uEtun2GxtXk2fP/HtvxvcUZCXZTiZMTTLZIxHnudkVeerI3Ehjxpev1mAU1aWkGA9fvDMWBr5w2qv/TqysAdinaRpeHmBHsgeY85+Hpza2gRh33XJ6hpHF5tcr5Bq3wEaw494HzUQ1yhI39iUZ1E6qHRnfv8rE67Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713117467; c=relaxed/simple; bh=lu+Op/pdvzNr08jKWJJbCWriMq/Z9Ad7CPKYV4e6O3I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I+jGtX1QiZ8UEhXv8BakipA18BMCGsLYmTHthNR8z6I1F08SZTdywPkawo0qv7P76abLHSWznGD2HNihDWFuHFKM8FzzeSGx3nQ0SB1oOAXC/hduUdpZd1yNmSdnVFNDsGcrZJ79Js821xdVK7NhQgXVSHrB7xoJfFDseIX+OeI= 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=Lx4uQdlL; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=peacevolution.org header.i=@peacevolution.org header.b="Lx4uQdlL" 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> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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=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= 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: 13629172 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 24003135A6C; Sun, 14 Apr 2024 17:57:53 +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=1713117475; cv=none; b=n/BWkzI+YnI59nnmkQpC8VhPip1OnZJ37KKynyX9we3lLP8207IyHwSRYbDbQc/fmz0DLjC9Pa7M7IMuayK/PmLMEgwsWhzqaaT2DMc9LcQeR7WqgCUwvaE0tWezPxRCqQLYbnJvnHmhhFR3eiXDaowtbijrgnaCt7fH1QNwHzw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713117475; c=relaxed/simple; bh=zIGUlsMmzRHbKuN0yC5dPYIwHXfnj1BUrSe5Hnhm/Ag=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hPr72lv0YXZXG91mY7YDmeRUWc4puZ77CUsMM6GPj7lIWFtml8iYDZRlPCKLpyd42HSGTkSjKX5Nrur4HAXWNi9Vo/D+O6hoQDanGNZvJGtGmrqNvyOVRI652rferM1m4oZnpdmmhcPsYkDSEP5sTo6HebyKcQxVrXZCsY+hgz4= 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=apJvp2ux; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=peacevolution.org header.i=@peacevolution.org header.b="apJvp2ux" 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> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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=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= 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: 13629173 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 955CC136987; Sun, 14 Apr 2024 17:57:58 +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=1713117480; cv=none; b=V1LR6XbZT50HDCA+1uUMaBbbzg5gmSqyA2ijzWqck5HMMq9zE5GjxcT3nVuV0TFqsoMgFQhRhelRgBtpXxkTLMMJIB2iGkZnjoOPZnldDcpmE2yqMxydArZezVIvAycKKzoZ6wmoHBh/iRvkAMc/9yULkw+J7RT/HXEQxjSb4XU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713117480; c=relaxed/simple; bh=4J7f19EVJH9G9Gk1UvLU7uM++6o9NhyjBZv3kYWUl54=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i4Nl7UMgvuQPEc48w1SmWyw4mi3ZQz3KOPg+31Ru4bAlOJTxIraC+2rBbgDSlWc81/IlcE4v0XFfO8Ly+/0C+mJHyrbJsqiMEJjURScnf7TMT6tcOyRRrYCXedGNOPPnrkbqiQ7pZDjniRIZ2f6IzuSH4v6Q90/Ik2mdDBIJZzc= 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=Wd0IIGb4; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=peacevolution.org header.i=@peacevolution.org header.b="Wd0IIGb4" 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> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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=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= 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: 13629174 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 2ED11136995; Sun, 14 Apr 2024 17:58:00 +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=1713117482; cv=none; b=lKnfOmISm/X6fC+anjYzbqi8wc6BWY6lpOOICc/LJYRsLlg2a4fnq/STnqALDrTIo8+k90ug/w68E9EKoJC8vU2gnwOcOiBEzuduc9grUGakY0rWIHxzxhILbNhvAWIj6vwbGGgh+tk9g+POYCewcdEYX7qDewbXa91z+U72Yok= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713117482; c=relaxed/simple; bh=IZ4ArRXGNTB7NRJq7uPcufZOTFJ3eOVFZCNrF9ub0b4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tIxJFwnuICQS9yKTnwR3vmp4Wk1T6+DeXV6Xup88dllfr6YOfV75Bv8iiYuHt/jkbYUxJilel9/LHiKc/N3ujD2THnRiQW7zPnKvDa7u4CezasxUGwTX5E0aUhjTddK2iJGuZAjLQqnBQ7OMD1+iOswCh18nNdRWZYcpbVksPF4= 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=k60ZaVvd; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=peacevolution.org header.i=@peacevolution.org header.b="k60ZaVvd" 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> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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=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= 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 */