lkml.org 
[lkml]   [2024]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/2] regulator: pca9450: enable restart handler for I2C operation
From
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


\
 
 \ /
  Last update: 2024-05-27 16:47    [W:0.156 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site