Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1035461rdb; Fri, 16 Feb 2024 03:29:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUmnlCRnRYQR14k+st60MnxmVnc2367UwQjmHuGqLu4XtUomw8Re7Mhg7wXKX56mr5c0H20O+4tmhujk8Lxw158fx8C7B5ujx7y9SNnrQ== X-Google-Smtp-Source: AGHT+IHlMO8ClMALOZkg60MNly2zlIrbwh4ctQce/E0qgzGWeWXWEuKkaPF3w87i9JF4zYuC419n X-Received: by 2002:a05:620a:167c:b0:787:1fb5:7e61 with SMTP id d28-20020a05620a167c00b007871fb57e61mr4859634qko.46.1708082973525; Fri, 16 Feb 2024 03:29:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708082973; cv=pass; d=google.com; s=arc-20160816; b=HfbVBGfojqv49hfi6YQsbCuG7/5wvShQ+Zgyg6vRT2Vh8lutNhvSnLZSSwS4TJEfi/ hIA2Sgm/SDJ1o4ANhOp/13l/tHCahbopUxaHESjpatVt6OR2FR5jqco0O7QMUAkI/oKV WIskQWz9fkjgm62sDH0BeB+wfoRa6xYY6o42bbpkBpjGha0IiJvppnUFzUj7+R5ttwl3 JSCQUQ0GtNfl058LxqEfGZG5NqpFgDpVUwdl6TLzV5ll8eP+NGED631Q+o57jsUXRvQJ bkk6p0C+21+j1U1zTe1ksUQocE3HXlM/mi307xuuRxXcmUSW/p59hL9M4edRPvOWUXD8 xmsA== 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 :subject:cc:to:from:date:dkim-signature; bh=7DJzEcuh6u2bcw6WaUOjZ9qOdWEu1d68sPOUoqB+wPA=; fh=Pk6vaRCVsWC5tWQ96Qpdct+NUIshMi8JZblOghG8qPw=; b=e7S1JBpyrBXfZasAOt/p296aM5Q6C36iY1rmy2bfSd09sJIpI8nDVnxvig8C2+56Zr E7E09U1dp8qsYtQt1AbRZruAHhLz8SJ2+vg+kBXbBscmyp7iMENsQfPcOCc4pG5XRKSB gA9zr5277rWJfFqUAlmO7o6MkIHXJvA00EJt0Rj5gJS3O2zwfYsAkTKcYCanQx3gy09J 446ZiFZF4BbqfKKM+cPXBr3vb1e3ss5G55k3v3p5SFpUncQlkmC3H5oX3138E3Gd/e/u tkmCA5xWV0AJEID6Q7zqTMINJ0pGKPiEOkJwUjzvsadlJ5NTPw/CxUfTSCSZQTBr88bN TR6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I5HOEDXs; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68521-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68521-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 dt3-20020a05620a478300b00787226c531csi3886399qkb.291.2024.02.16.03.29.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 03:29:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68521-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=@kernel.org header.s=k20201202 header.b=I5HOEDXs; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68521-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68521-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3734C1C23C60 for ; Fri, 16 Feb 2024 11:29:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CA8D77655; Fri, 16 Feb 2024 11:29:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I5HOEDXs" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8BBEB627FF; Fri, 16 Feb 2024 11:29:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708082964; cv=none; b=hTPYIz9HjRxXkBNmCjTKTqioNgr+NPiXkZwc4VkhxePKjLx97hCZ7XZIR41h7PDsuRIA4djmrsB+TPKc4k8nJKqL2DztN868OqNBDDPKctqp/ZHaMK+mQTJbgOhSj/a1xsFW6HvGCMlUlL4TtpUz8QvN+2+cmSLVMBPPvA0h2YE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708082964; c=relaxed/simple; bh=LaKs5DqAuKaU3encHBxSEltA7O1irPZqnTol1trVLEk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MClMKFJc4JqZBkk9+QuE+ACFQVRkywG/vCRFq0k58inlm2rNV+dZmaBLAkIqqP4+IIu7W3n3v06fPsF1h8JMwI9Qycjd+CoFF4+Dn5VCu8RhY1enl3+XnCmhEc0szHXMVaykKJJOfgEbCSfJRM7F0Wt/bfZK7zov6jfGmLyRGws= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I5HOEDXs; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68980C433B2; Fri, 16 Feb 2024 11:29:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708082964; bh=LaKs5DqAuKaU3encHBxSEltA7O1irPZqnTol1trVLEk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=I5HOEDXs4RGYSouKlxxc0vt7BLbZGIAj31GCowFh0QUM9Vk5PvFYU/luROXnSbWo3 et5ArAltsZKlKwWWwB/uP+eDRd3i5VxvGQ1xNbTn7tzYVegk4CbuPzE6JRrJQEoHmW iOfLz0EoBtJGuTM0JaC0mDhSoD5IkVWYkCKrU4ceAUxprUNK7VB74KLkS0u2vbVhKx iONu4FBGFgdEKFSwsVEH27VY/VV+To12D6I5msl7cIEJ8vzs1H7REN7S3MYJIZWLOP lc69mS1uXXeJX99cNtgOlS0yy/PXlqiEfwIfHzqTyW6EVx6WT+qhvhHFNHKeroKfaU Ogb9QsWfW0F/A== Date: Fri, 16 Feb 2024 11:29:10 +0000 From: Jonathan Cameron To: Marco Felsch Cc: puranjay12@gmail.com, lars@metafoo.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, thomas.haemmerle@leica-geosystems.com Subject: Re: [RESEND PATCH 2/2] iio: temperature: tmp117: add support for vcc-supply Message-ID: <20240216112910.4059a09b@jic23-huawei> In-Reply-To: <20240216102820.1395815-2-m.felsch@pengutronix.de> References: <20240216102820.1395815-1-m.felsch@pengutronix.de> <20240216102820.1395815-2-m.felsch@pengutronix.de> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 16 Feb 2024 11:28:20 +0100 Marco Felsch wrote: > 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 Hi. With power supply enables, the question that normally comes up is whether the device takes significant time to become available after the power is turned on. I had a look at the datasheet but couldn't find clear language on how long we need to wait before the device is usable following power up. There is a number for reset of 1.5 msecs so I guess we could use that safely? Maybe no delay is fine for reading the device ID. I've no idea. Sometimes we start with no delay and only end up adding one later when people report issues. We could do that here. Jonathan > --- > 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;