Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1009695rdb; Fri, 16 Feb 2024 02:28:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVNRo3KE4LsPRdlbV8EIQ6RGrp862ob1PaN5wHgdhA5V13t2BZxmUK09vmM/B3I7NtuHN6IXBH+PcT8JRLUEGuaNrfkUU9mAM/0zdJYIw== X-Google-Smtp-Source: AGHT+IHlGMAGGZNnCKkGFgCnuuAO2V4rwQi597CrGk8rqkiI3YMc4/A/XGOkH1XivHCaBtHuDAeV X-Received: by 2002:a17:906:1397:b0:a3d:51c4:8128 with SMTP id f23-20020a170906139700b00a3d51c48128mr3001018ejc.12.1708079328069; Fri, 16 Feb 2024 02:28:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708079328; cv=pass; d=google.com; s=arc-20160816; b=rwT6B+ieZx9R16tjU2o3T5m0f/vhRurqG652DQBwPWe5/licgIArX+r1ikyne1a11d ClajlY7T0MLxKgzI+bWFcWwp4M/XCe2+7l56azbCBGJzfltV3ci90d88AUfoTJ7j4KLj 1hGeNorUcees0DsnnfKDg+BL0pNtYfRQ0uhKgRwKj8uKYXV1gUEQiyPB5lcj1ssnSYun Hdpco6zxRPWDl52HVEiWBBtYV2tr7Nvy43tOljWJjdezxOWON9OPhGRLHkdOfvvz5U1a oGK3Y2fe2kUdg/b6iIEQlGwoXDxljfsFZx4Ox4RJlXpf1JJBZ5c9O81R5FuNqZg5OMjl UMng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=TEp/vyPWnvACAqc7nGbhJ6grdWG6FPZoSSQEHxSneQA=; fh=GZ7Y1w8dudA+k6tu6VtZjuvgb4vRk6eGUlxN140LGjA=; b=Vp7r8/6u22A1xhSzd/oKAQL2OKciP7pfLZZBf2WDJZMKzjBYmixm+EdjwHhZYzJc1V 265890+E/zyZmwK0wxoLeBDgeGPb6v2IaHGZcp80KMa7CoJKS+ULzbugvhbaB/huO3eE CmdSieFdk7qd1n2nR/5xukl6OrkaGOPlkm+USxqerxgouzG2MS2bQarUV2z2WT1tgrps 4cnovXg9l4i+3w/fWzxJBWPcpQIIvrWxv9/HHy3XeEZeNdHCYD1xkGJmjI73g6gtn6Hq p+86NdJ8SuMa7+7U5aaoL727wabl7RgRlPkWqn8zR90wYzN2plkqYFjDzFa7bgNRov+x t/Vg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-68443-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68443-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g15-20020a1709063b0f00b00a3d6f647fe0si1428291ejf.846.2024.02.16.02.28.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 02:28:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68443-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-68443-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68443-linux.lists.archive=gmail.com@vger.kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id CD0D01F226B6 for ; Fri, 16 Feb 2024 10:28:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 604F22C1B4; Fri, 16 Feb 2024 10:28:36 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 83A512C197 for ; Fri, 16 Feb 2024 10:28:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708079315; cv=none; b=rSsXInrX50k92mdbbPHtcg+eGhX3isAA68+xhxNV4gJqupLMqAjX+ToGMtnHuARi7QbwByc4pq24cuC4ML+W/5dNHCvUH25pSeNBhGxADInrqL7wrypVWIidZv7ll/ngO+WQ9i2jYPVrt3PvD9lRVLGqhuO/mBIYPzr1zkihBRk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708079315; c=relaxed/simple; bh=ZeXvEB7viOHK4bgTozoMlOU4OC6pZg8V0UUCaiKpFeI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DRo6qi3/g5/e1q3IMLeIHJV4lJbGwwwdFrplAldkE+Vo4HKy15zlokOSf9wwusa6F/TONkqwWeIrfxqxyTQqevuv7FvQGBWUSLzRHYRhsziXHNSUnuwnJXXJ+WZoOz8bdUPw12yBBBYPaqspP1LDy8ZKIdZNlzYJbv4XxUwJhLw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ravS9-0006gI-Ih; Fri, 16 Feb 2024 11:28:21 +0100 From: Marco Felsch To: puranjay12@gmail.com, jic23@kernel.org, lars@metafoo.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, thomas.haemmerle@leica-geosystems.com Subject: [RESEND PATCH 2/2] iio: temperature: tmp117: add support for vcc-supply Date: Fri, 16 Feb 2024 11:28:20 +0100 Message-Id: <20240216102820.1395815-2-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240216102820.1395815-1-m.felsch@pengutronix.de> References: <20240216102820.1395815-1-m.felsch@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::28 X-SA-Exim-Mail-From: m.felsch@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Thomas Haemmerle Add support to specify the VCC supply which is required to power the device. Signed-off-by: Thomas Haemmerle Signed-off-by: Marco Felsch --- Resend since I forgot to add the DT maintainers drivers/iio/temperature/tmp117.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/iio/temperature/tmp117.c b/drivers/iio/temperature/tmp117.c index 059953015ae7..69328066811a 100644 --- a/drivers/iio/temperature/tmp117.c +++ b/drivers/iio/temperature/tmp117.c @@ -17,6 +17,7 @@ #include #include #include +#include #include @@ -152,6 +153,10 @@ static int tmp117_probe(struct i2c_client *client) if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WORD_DATA)) return -EOPNOTSUPP; + ret = devm_regulator_get_enable(&client->dev, "vcc"); + if (ret) + return ret; + dev_id = i2c_smbus_read_word_swapped(client, TMP117_REG_DEVICE_ID); if (dev_id < 0) return dev_id; -- 2.39.2