From patchwork Thu Feb 22 12:55:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nuno Sa X-Patchwork-Id: 13567282 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (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 828E378B52; Thu, 22 Feb 2024 12:53:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708606393; cv=none; b=Zk/aZBsmYTW53umOTux6WUFLQQ+XL1FIuSJhzDK/7OAhnxTlE0TVyRqMar/3hCx7CRHOdG2Aq2Ocd5fPcA3H+PFNOe+QGi4kks8gn9RtHI5lOilPq/E7Tp/oG9VsKQtDOXMxlHwMUW7tZNrAMMiMw176fVo5TIeTGEq9EdskTHo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708606393; c=relaxed/simple; bh=/VGP64v3Ln6cjGmWsvRX46hu6V3ENfphnkCHqlx0f7I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=DqyZMLvE4G632dzpx7/bz2A0GuhbrmQtgLbKvytddEAvadbP1Fnq6tMKdJw88A1WIY8IJZ6LV+YlC+KX3XKkUxHXTUnvkmNNE/H2tdOWYCiRUxWCdOVB7WaTuTPTDjUPwuqB6J939O7yd2TRQKoeSnOEE5XdlwJDrk+xZVpohi0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=tgNpbBB/; arc=none smtp.client-ip=148.163.135.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="tgNpbBB/" Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41M9c7PH014757; Thu, 22 Feb 2024 07:52:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:references:in-reply-to:to :cc; s=DKIM; bh=LaMqFHtNFmd6l77ZP4bQThWXZA8vZWBqG3tx5vyLwII=; b= tgNpbBB/f1iND48/mN+TVXco+0J84P+B6GPBDUMkIildJTe5tKBhrL7wmJ/XiHsH tGT3TLMN3zzpHFO/eoVYP7VRT2t5iRnbLa4Wxmhka8OB8+O34BrXU9CY/f7A8oZ8 RTfA9P80DAAsndeBu0n3NYeLc2J05Yvoqf4yKIqEuy+UGa8YTZNK51Eijtd2EEKM Mu3nhcZTF7Mv5Uyc2zSlecpzCpWywIt+65qrNArO6B6eNEwiIxv2VwSSoi1Xf8v9 r1m/Qs6u21TJq9UViN0G8fEUQu4z/4lNkSYSfFW/yLaiu7X3hO0/9TqDoEWs92B6 fzt5RSCQ0ZUHPWjiIZz4Kg== Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3wd21p8ka1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 07:52:51 -0500 (EST) Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 41MCqo97022907 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 22 Feb 2024 07:52:50 -0500 Received: from ASHBCASHYB5.ad.analog.com (10.64.17.133) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 22 Feb 2024 07:52:49 -0500 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBCASHYB5.ad.analog.com (10.64.17.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 22 Feb 2024 07:52:49 -0500 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Thu, 22 Feb 2024 07:52:49 -0500 Received: from [127.0.0.1] ([10.44.3.55]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 41MCqTFD003844; Thu, 22 Feb 2024 07:52:42 -0500 From: Nuno Sa Date: Thu, 22 Feb 2024 13:55:57 +0100 Subject: [PATCH 6/6] iio: temperature: ltc2983: support vdd regulator Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20240222-ltc2983-misc-improv-v1-6-cf7d4457e98c@analog.com> References: <20240222-ltc2983-misc-improv-v1-0-cf7d4457e98c@analog.com> In-Reply-To: <20240222-ltc2983-misc-improv-v1-0-cf7d4457e98c@analog.com> To: , CC: Jonathan Cameron , Lars-Peter Clausen , Michael Hennerich , Rob Herring , Krzysztof Kozlowski , Conor Dooley X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708606552; l=908; i=nuno.sa@analog.com; s=20231116; h=from:subject:message-id; bh=/VGP64v3Ln6cjGmWsvRX46hu6V3ENfphnkCHqlx0f7I=; b=OVb3zTmwz3mChSUZxEkIHU1dIFUyqWu4i8dLdcgO7gML/JGmqv/jKr/XQ88gpV2taFeILFjMj WAavMSAIgw+C6Fy8riX7R74cGIHT2S/bnTPSJdvEQD0y57747lRCHQv X-Developer-Key: i=nuno.sa@analog.com; a=ed25519; pk=3NQwYA013OUYZsmDFBf8rmyyr5iQlxV/9H4/Df83o1E= X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: wef63mPP8aSD28hYTDFHkMxxDOutEjeq X-Proofpoint-ORIG-GUID: wef63mPP8aSD28hYTDFHkMxxDOutEjeq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-22_09,2024-02-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 suspectscore=0 malwarescore=0 mlxlogscore=827 priorityscore=1501 impostorscore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402220101 Add support for the power supply regulator. Signed-off-by: Nuno Sa --- drivers/iio/temperature/ltc2983.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c index 9bd53e102ab3..bc0518ee1b89 100644 --- a/drivers/iio/temperature/ltc2983.c +++ b/drivers/iio/temperature/ltc2983.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -1641,6 +1642,10 @@ static int ltc2983_probe(struct spi_device *spi) if (ret) return ret; + ret = devm_regulator_get_enable(&spi->dev, "vdd"); + if (ret) + return ret; + gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(gpio)) return PTR_ERR(gpio);