media: i2c: ds90ub9x3: Remove unneeded of_gpio_n_cells assignment
Subsystems (2)
PATCH 1/1 media: i2c: ds90ub9x3: Remove unneeded of_gpio_n_cells assignment
The default for of_gpio_n_cells is 2, no need to assign the same in the user.
--- drivers/media/i2c/ds90ub913.c | 1 - drivers/media/i2c/ds90ub953.c | 1 - 2 files changed, 2 deletions(-)
drivers/media/i2c/ds90ub913.c +0 -1
@@ -216,7 +216,6 @@ static int ub913_gpiochip_probe(struct ub913_data *priv) gc->direction_output = ub913_gpio_direction_out; gc->set = ub913_gpio_set; gc->of_xlate = ub913_gpio_of_xlate; - gc->of_gpio_n_cells =2 ; ret =gpiochip_add_data (gc, priv);if (ret) {
drivers/media/i2c/ds90ub953.c +0 -1
@@ -420,7 +420,6 @@ static int ub953_gpiochip_probe(struct ub953_data *priv) gc->get = ub953_gpio_get; gc->set = ub953_gpio_set; gc->of_xlate = ub953_gpio_of_xlate; - gc->of_gpio_n_cells =2 ; ret =gpiochip_add_data (gc, priv);if (ret) {
Signature · 1 line
2.47.2
Tomi Valkeinen
maintainerHi,
Quoted 2 lines · Andy Shevchenko
The default for
of_gpio_n_cellsis 2, no need to assign the same in the user.
Where is this documented? I'm also having trouble finding the implementation.
Tomi
Quoted 30 lines
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/media/i2c/ds90ub913.c | 1 - drivers/media/i2c/ds90ub953.c | 1 - 2 files changed, 2 deletions(-)drivers/media/i2c/ds90ub913.c +0
-1@@ -216,7 +216,6 @@ static int ub913_gpiochip_probe(struct ub913_data *priv) gc->direction_output = ub913_gpio_direction_out; gc->set = ub913_gpio_set; gc->of_xlate = ub913_gpio_of_xlate; - gc->of_gpio_n_cells =2 ; ret =gpiochip_add_data (gc, priv);if (ret) {drivers/media/i2c/ds90ub953.c +0
-1@@ -420,7 +420,6 @@ static int ub953_gpiochip_probe(struct ub953_data *priv) gc->get = ub953_gpio_get; gc->set = ub953_gpio_set; gc->of_xlate = ub953_gpio_of_xlate; - gc->of_gpio_n_cells =2 ; ret =gpiochip_add_data (gc, priv);if (ret) {
Quoted 6 lines · Tomi Valkeinen
Quoted 2 lines · Andy Shevchenko
The default for
of_gpio_n_cellsis 2, no need to assign the same in the user.Where is this documented? I'm also having trouble finding the implementation.
The idea was introduced back in 391c970c0dd1 ("of/gpio: add default of_xlate function if device has a node pointer"). But now I realised that it was never assumed that default is 2 for the cases when the ->of_xlate() explicitly provided. So, this is wrong patch, thanks for the review!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Andy, Tomi,
Quoted 5 lines · Andy Shevchenko
Quoted 4 lines · Tomi Valkeinen
Quoted 2 lines · Andy Shevchenko
The default for
of_gpio_n_cellsis 2, no need to assign the same in the user.
Quoted 7 lines
Quoted 2 lines
Where is this documented? I'm also having trouble finding the implementation.
The idea was introduced back in
391c970c0dd1("of/gpio: add defaultof_xlatefunction if device has a node pointer"). But now I realised that it was never assumed that default is 2 for the cases when the ->of_xlate() explicitly provided. So, this is wrong patch, thanks for the review!
Does the same conclusion apply to the similar max96717 patch as well?
Signature · 1 line
Sakari Ailus
Quoted 9 lines · Sakari Ailus
Quoted 8 lines · Andy Shevchenko
Quoted 6 lines · Tomi Valkeinen
Quoted 2 lines · Andy Shevchenko
The default for
of_gpio_n_cellsis 2, no need to assign the same in the user.Where is this documented? I'm also having trouble finding the implementation.
Quoted 6 lines
Quoted 4 lines
The idea was introduced back in
391c970c0dd1("of/gpio: add defaultof_xlatefunction if device has a node pointer"). But now I realised that it was never assumed that default is 2 for the cases when the ->of_xlate() explicitly provided. So, this is wrong patch, thanks for the review!Does the same conclusion apply to the similar max96717 patch as well?
If you are referring to [email protected] (and why not replying there?), then no, that change is correct.
Signature · 2 lines
With Best Regards, Andy Shevchenko