|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5 |
|
| #
001d7ef8 |
| 24-Dec-2024 |
Mukesh Ojha <[email protected]> |
pinctrl: Fix the clean up on pinconf_apply_setting failure
When some client does devm_pinctrl_get() followed by pinctrl_select_state() that does pinmux first successfully and later during config set
pinctrl: Fix the clean up on pinconf_apply_setting failure
When some client does devm_pinctrl_get() followed by pinctrl_select_state() that does pinmux first successfully and later during config setting it sets the wrong drive strenght to the pin due to which pinconf_apply_setting fails. Currently, on failure during config setting is implemented as if pinmux has failed for one of the pin but that does not seem right and need to undo the pinmux for all the pin if config setting fails.
Current commit does a bit refactor to reuse the code and tries to clean up mux setting on config setting failure.
Signed-off-by: Mukesh Ojha <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4 |
|
| #
5a3e85c3 |
| 14-Oct-2024 |
Mukesh Ojha <[email protected]> |
pinmux: Use sequential access to access desc->pinmux data
When two client of the same gpio call pinctrl_select_state() for the same functionality, we are seeing NULL pointer issue while accessing de
pinmux: Use sequential access to access desc->pinmux data
When two client of the same gpio call pinctrl_select_state() for the same functionality, we are seeing NULL pointer issue while accessing desc->mux_owner.
Let's say two processes A, B executing in pin_request() for the same pin and process A updates the desc->mux_usecount but not yet updated the desc->mux_owner while process B see the desc->mux_usecount which got updated by A path and further executes strcmp and while accessing desc->mux_owner it crashes with NULL pointer.
Serialize the access to mux related setting with a mutex lock.
cpu0 (process A) cpu1(process B)
pinctrl_select_state() { pinctrl_select_state() { pin_request() { pin_request() { ... .... } else { desc->mux_usecount++; desc->mux_usecount && strcmp(desc->mux_owner, owner)) {
if (desc->mux_usecount > 1) return 0; desc->mux_owner = owner;
} }
Signed-off-by: Mukesh Ojha <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7 |
|
| #
92f43683 |
| 03-Sep-2024 |
Li Zetao <[email protected]> |
pinctrl: Remove redundant null pointer checks in pinctrl_remove_device_debugfs()
Since the debugfs_create_dir() never returns a null pointer, checking the return value for a null pointer is redundan
pinctrl: Remove redundant null pointer checks in pinctrl_remove_device_debugfs()
Since the debugfs_create_dir() never returns a null pointer, checking the return value for a null pointer is redundant, and using IS_ERR is safe enough.
Signed-off-by: Li Zetao <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3 |
|
| #
ae1cf475 |
| 06-Jun-2024 |
Yang Yingliang <[email protected]> |
pinctrl: core: fix possible memory leak when pinctrl_enable() fails
In devm_pinctrl_register(), if pinctrl_enable() fails in pinctrl_register(), the "pctldev" has not been added to dev resources, so
pinctrl: core: fix possible memory leak when pinctrl_enable() fails
In devm_pinctrl_register(), if pinctrl_enable() fails in pinctrl_register(), the "pctldev" has not been added to dev resources, so devm_pinctrl_dev_release() can not be called, it leads memory leak.
Introduce pinctrl_uninit_controller(), call it in the error path to free memory.
Fixes: 5038a66dad01 ("pinctrl: core: delete incorrect free in pinctrl_enable()") Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
| #
adec57ff |
| 04-Jun-2024 |
Hagar Hemdan <[email protected]> |
pinctrl: fix deadlock in create_pinctrl() when handling -EPROBE_DEFER
In create_pinctrl(), pinctrl_maps_mutex is acquired before calling add_setting(). If add_setting() returns -EPROBE_DEFER, create
pinctrl: fix deadlock in create_pinctrl() when handling -EPROBE_DEFER
In create_pinctrl(), pinctrl_maps_mutex is acquired before calling add_setting(). If add_setting() returns -EPROBE_DEFER, create_pinctrl() calls pinctrl_free(). However, pinctrl_free() attempts to acquire pinctrl_maps_mutex, which is already held by create_pinctrl(), leading to a potential deadlock.
This patch resolves the issue by releasing pinctrl_maps_mutex before calling pinctrl_free(), preventing the deadlock.
This bug was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc.
Fixes: 42fed7ba44e4 ("pinctrl: move subsystem mutex to pinctrl_dev struct") Suggested-by: Maximilian Heyne <[email protected]> Signed-off-by: Hagar Hemdan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6 |
|
| #
9dfbcf2f |
| 25-Apr-2024 |
Léo DUBOIN <[email protected]> |
pinctrl: core: reset gpio_device in loop in pinctrl_pins_show()
We were not resetting the pointer to the associated gpio_device once we are done displaying a pin's information.
This meant that once
pinctrl: core: reset gpio_device in loop in pinctrl_pins_show()
We were not resetting the pointer to the associated gpio_device once we are done displaying a pin's information.
This meant that once we reached the end of a gpio-range, if there were pins right after it that did not belong to any known range, they would be associated with the previous range's gpio device.
This resulted in those pins appearing as <4294966783:old_gdev> instead of the expected <0:?> (due to gpio_num being -1).
Signed-off-by: Léo DUBOIN <[email protected]> Link: https://lore.kernel.org/r/c40d0634abefa19e689ffd450e0f48a8d63c4fc4.1714049455.git.lduboin@freebox.fr Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
| #
db503298 |
| 25-Apr-2024 |
Léo DUBOIN <[email protected]> |
pinctrl: core: take into account the pins array in pinctrl_pins_show()
We previously only looked at the 'pin_base' of the pinctrl_gpio_ranges struct for determining if a pin matched a GPIO number.
pinctrl: core: take into account the pins array in pinctrl_pins_show()
We previously only looked at the 'pin_base' of the pinctrl_gpio_ranges struct for determining if a pin matched a GPIO number.
This value is present only if the 'pins' array is not NULL, and is 0 otherwise. This means that GPIO ranges declared using gpiochip_add_pingroup_range(), thus making use of pins, were always matched by the pins in the range [0-npins] even if they contained pins in a completely separate range.
Signed-off-by: Léo DUBOIN <[email protected]> Link: https://lore.kernel.org/r/6df39bd47942156be5713f8f4e317d2ad3e0ddeb.1714049455.git.lduboin@freebox.fr Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1 |
|
| #
5038a66d |
| 21-Mar-2024 |
Dan Carpenter <[email protected]> |
pinctrl: core: delete incorrect free in pinctrl_enable()
The "pctldev" struct is allocated in devm_pinctrl_register_and_init(). It's a devm_ managed pointer that is freed by devm_pinctrl_dev_release
pinctrl: core: delete incorrect free in pinctrl_enable()
The "pctldev" struct is allocated in devm_pinctrl_register_and_init(). It's a devm_ managed pointer that is freed by devm_pinctrl_dev_release(), so freeing it in pinctrl_enable() will lead to a double free.
The devm_pinctrl_dev_release() function frees the pindescs and destroys the mutex as well.
Fixes: 6118714275f0 ("pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()") Signed-off-by: Dan Carpenter <[email protected]> Message-ID: <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.8 |
|
| #
3ded2169 |
| 04-Mar-2024 |
Dan Carpenter <[email protected]> |
pinctrl: core: comment that pinctrl_add_gpio_range() is deprecated
The pinctrl_add_gpio_range() function is deprecated add a comment so people don't accidentally use it in new code.
Signed-off-by:
pinctrl: core: comment that pinctrl_add_gpio_range() is deprecated
The pinctrl_add_gpio_range() function is deprecated add a comment so people don't accidentally use it in new code.
Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc7, v6.8-rc6 |
|
| #
f6443e01 |
| 23-Feb-2024 |
Bartosz Golaszewski <[email protected]> |
pinctrl: don't put the reference to GPIO device in pinctrl_pins_show()
The call to gpiod_to_gpio_device() does not increase the reference count of the GPIO device struct so it must not be decreased.
pinctrl: don't put the reference to GPIO device in pinctrl_pins_show()
The call to gpiod_to_gpio_device() does not increase the reference count of the GPIO device struct so it must not be decreased. Remove the buggy __free() decorator.
Fixes: 524fc108b895 ("pinctrl: stop using gpiod_to_chip()") Reported-by: David Arcari <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6 |
|
| #
db4a9133 |
| 11-Dec-2023 |
Andy Shevchenko <[email protected]> |
pinctrl: core: Remove unused members from struct group_desc
All drivers are converted to use embedded struct pingroup. Remove unused members from struct group_desc.
Reviewed-by: Geert Uytterhoeven
pinctrl: core: Remove unused members from struct group_desc
All drivers are converted to use embedded struct pingroup. Remove unused members from struct group_desc.
Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
| #
85174ad7 |
| 11-Dec-2023 |
Andy Shevchenko <[email protected]> |
pinctrl: core: Embed struct pingroup into struct group_desc
struct group_desc is a particular version of the struct pingroup with associated opaque data. Start switching pin control core and drivers
pinctrl: core: Embed struct pingroup into struct group_desc
struct group_desc is a particular version of the struct pingroup with associated opaque data. Start switching pin control core and drivers to use it explicitly.
Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
| #
383da0c7 |
| 11-Dec-2023 |
Andy Shevchenko <[email protected]> |
pinctrl: core: Add a convenient define PINCTRL_GROUP_DESC()
Add PINCTRL_GROUP_DESC() macro for inline use.
Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Andy Shevchenko <
pinctrl: core: Add a convenient define PINCTRL_GROUP_DESC()
Add PINCTRL_GROUP_DESC() macro for inline use.
Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc5 |
|
| #
d98d7385 |
| 04-Dec-2023 |
Andy Shevchenko <[email protected]> |
pinctrl: core: Make pins const unsigned int pointer in struct group_desc
It's unclear why it's not a const unsigned int pointer from day 1. Make the pins member const unsigned int pointer in struct
pinctrl: core: Make pins const unsigned int pointer in struct group_desc
It's unclear why it's not a const unsigned int pointer from day 1. Make the pins member const unsigned int pointer in struct group_desc. Update necessary APIs.
Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc4 |
|
| #
7cc4e6b0 |
| 29-Nov-2023 |
Andy Shevchenko <[email protected]> |
pinctrl: Convert unsigned to unsigned int
Simple type conversion with no functional change implied. While at it, adjust indentation where it makes sense.
Signed-off-by: Andy Shevchenko <andriy.shev
pinctrl: Convert unsigned to unsigned int
Simple type conversion with no functional change implied. While at it, adjust indentation where it makes sense.
Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc3, v6.7-rc2 |
|
| #
5f0dedcc |
| 15-Nov-2023 |
Bartosz Golaszewski <[email protected]> |
pinctrl: don't include GPIOLIB private header
gpio_to_desc() is declared in linux/gpio.h so there's no need to include gpiolib.h directly.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@li
pinctrl: don't include GPIOLIB private header
gpio_to_desc() is declared in linux/gpio.h so there's no need to include gpiolib.h directly.
Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
| #
524fc108 |
| 15-Nov-2023 |
Bartosz Golaszewski <[email protected]> |
pinctrl: stop using gpiod_to_chip()
Don't dereference struct gpio_chip directly, use dedicated gpio_device getters instead.
Signed-off-by: Bartosz Golaszewski <[email protected]> Acked
pinctrl: stop using gpiod_to_chip()
Don't dereference struct gpio_chip directly, use dedicated gpio_device getters instead.
Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
| #
4198a9b5 |
| 15-Nov-2023 |
Maria Yu <[email protected]> |
pinctrl: avoid reload of p state in list iteration
When in the list_for_each_entry iteration, reload of p->state->settings with a local setting from old_state will turn the list iteration into an in
pinctrl: avoid reload of p state in list iteration
When in the list_for_each_entry iteration, reload of p->state->settings with a local setting from old_state will turn the list iteration into an infinite loop.
The typical symptom when the issue happens, will be a printk message like:
"not freeing pin xx (xxx) as part of deactivating group xxx - it is already used for some other setting".
This is a compiler-dependent problem, one instance occurred using Clang version 10.0 on the arm64 architecture with linux version 4.19.
Fixes: 6e5e959dde0d ("pinctrl: API changes to support multiple states per device") Signed-off-by: Maria Yu <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6 |
|
| #
6042aaef |
| 10-Oct-2023 |
Bartosz Golaszewski <[email protected]> |
pinctrl: change the signature of pinctrl_ready_for_gpio_range()
Modify pinctrl_ready_for_gpio_range() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments
Signe
pinctrl: change the signature of pinctrl_ready_for_gpio_range()
Modify pinctrl_ready_for_gpio_range() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments
Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]>
show more ...
|
| #
31d4e8d1 |
| 10-Oct-2023 |
Bartosz Golaszewski <[email protected]> |
pinctrl: change the signature of gpio_to_pin()
Modify gpio_to_pin() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments.
Signed-off-by: Bartosz Golaszewski <ba
pinctrl: change the signature of gpio_to_pin()
Modify gpio_to_pin() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments.
Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]>
show more ...
|
| #
58e772f4 |
| 10-Oct-2023 |
Bartosz Golaszewski <[email protected]> |
pinctrl: change the signature of pinctrl_match_gpio_range()
Modify pinctrl_match_gpio_range() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments.
Signed-off-b
pinctrl: change the signature of pinctrl_match_gpio_range()
Modify pinctrl_match_gpio_range() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments.
Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]>
show more ...
|
| #
82059c3d |
| 10-Oct-2023 |
Bartosz Golaszewski <[email protected]> |
pinctrl: change the signature of pinctrl_get_device_gpio_range()
Modify pinctrl_get_device_gpio_range() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments.
Si
pinctrl: change the signature of pinctrl_get_device_gpio_range()
Modify pinctrl_get_device_gpio_range() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments.
Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]>
show more ...
|
| #
315c4418 |
| 10-Oct-2023 |
Bartosz Golaszewski <[email protected]> |
pinctrl: change the signature of pinctrl_gpio_direction()
Modify pinctrl_gpio_direction() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments.
Signed-off-by: B
pinctrl: change the signature of pinctrl_gpio_direction()
Modify pinctrl_gpio_direction() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments.
Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]>
show more ...
|
|
Revision tags: v6.6-rc5 |
|
| #
acf2981b |
| 03-Oct-2023 |
Bartosz Golaszewski <[email protected]> |
treewide: rename pinctrl_gpio_set_config_new()
Now that pinctrl_gpio_set_config() is no longer used, let's drop the '_new' suffix from its improved variant.
Signed-off-by: Bartosz Golaszewski <bart
treewide: rename pinctrl_gpio_set_config_new()
Now that pinctrl_gpio_set_config() is no longer used, let's drop the '_new' suffix from its improved variant.
Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Linus Walleij <[email protected]>
show more ...
|
| #
b679d6c0 |
| 03-Oct-2023 |
Bartosz Golaszewski <[email protected]> |
treewide: rename pinctrl_gpio_direction_output_new()
Now that pinctrl_gpio_direction_output() is no longer used, let's drop the '_new' suffix from its improved variant.
Signed-off-by: Bartosz Golas
treewide: rename pinctrl_gpio_direction_output_new()
Now that pinctrl_gpio_direction_output() is no longer used, let's drop the '_new' suffix from its improved variant.
Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Linus Walleij <[email protected]>
show more ...
|