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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af6316ff-78c6-4b0a-894f-6076d36ffb90@kernel.org>
Date: Fri, 19 Apr 2024 15:41:48 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Holger Assmann <h.assmann@...gutronix.de>, lgirdwood@...il.com,
 broonie@...nel.org, robh@...nel.org, krzk+dt@...nel.org,
 conor+dt@...nel.org, yibin.gong@....com
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 1/2] regulator: pca9450: enable restart handler for I2C
 operation

On 19/04/2024 10:31, Holger Assmann wrote:
> The NXP PCA9450 can perform various kinds of power cycles when triggered
> by I2C-command.
> We therefore make this functionality accessible by introducing a
> respective restart handler. It will be used after a priority has been
> defined within the devicetree.
> 


..

> +
>  static int pca9450_i2c_probe(struct i2c_client *i2c)
>  {
>  	enum pca9450_chip_type type = (unsigned int)(uintptr_t)
> @@ -845,12 +875,35 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
>  		return PTR_ERR(pca9450->sd_vsel_gpio);
>  	}
>  
> +	/* Register I2C restart handler if one is defined by device tree */
> +	if (!of_property_read_u32(i2c->dev.of_node, "priority",
> +				  &pca9450->restart_handler.priority)) {

Priority property does not define whether this is or is not restart
handler. In case of missing priority, you should use just default:
SYS_OFF_PRIO_DEFAULT. Not skip the registering.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ