lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 16 Feb 2024 11:29:10 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Marco Felsch <m.felsch@...gutronix.de>
Cc: puranjay12@...il.com, lars@...afoo.de, robh+dt@...nel.org,
 krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
 linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, kernel@...gutronix.de,
 thomas.haemmerle@...ca-geosystems.com
Subject: Re: [RESEND PATCH 2/2] iio: temperature: tmp117: add support for
 vcc-supply

On Fri, 16 Feb 2024 11:28:20 +0100
Marco Felsch <m.felsch@...gutronix.de> wrote:

> From: Thomas Haemmerle <thomas.haemmerle@...ca-geosystems.com>
> 
> Add support to specify the VCC supply which is required to power the
> device.
> 
> Signed-off-by: Thomas Haemmerle <thomas.haemmerle@...ca-geosystems.com>
> Signed-off-by: Marco Felsch <m.felsch@...gutronix.de>

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 <linux/kernel.h>
>  #include <linux/limits.h>
>  #include <linux/property.h>
> +#include <linux/regulator/consumer.h>
>  
>  #include <linux/iio/iio.h>
>  
> @@ -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;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ