Re: [PATCH 1/2] regulator: pca9450: enable restart handler for I2C operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux