- 06 Sep, 2024 1 commit
-
-
Bartosz Golaszewski authored
Use the preferred API for assigning system sleep pm callbacks in drivers. Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240904140706.70359-1-brgl@bgdev.plSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 05 Sep, 2024 5 commits
-
-
Zhang Zekun authored
devm_clk_get_optional() and clk_prepare_enable() can be replaced by helper function devm_clk_get_optional_enabled(). Let's simplify code with use of devm_clk_get_optional_enabled() and avoid calling clk_disable_unprepare(). Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Link: https://lore.kernel.org/r/20240904092311.9544-5-zhangzekun11@huawei.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Zhang Zekun authored
devm_clk_get_optional() and clk_prepare_enable() can be replaced by helper function devm_clk_get_optional_enabled(). Let's simplify code with use of devm_clk_get_optional_enabled() and avoid calling clk_disable_unprepare(). Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Link: https://lore.kernel.org/r/20240904092311.9544-4-zhangzekun11@huawei.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Zhang Zekun authored
devm_clk_get() and clk_prepare_enable() can be replaced by helper function devm_clk_get_enabled(). Let's use devm_clk_get_enabled() to simplify code and avoid calling clk_disable_unprepare(). Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Link: https://lore.kernel.org/r/20240904092311.9544-3-zhangzekun11@huawei.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Zhang Zekun authored
devm_clk_get() and clk_prepare_enable() can be replaced by helper function devm_clk_get_enabled(). Let's use devm_clk_get_enabled() to simplify code and avoid calling clk_disable_unprepare(). Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Link: https://lore.kernel.org/r/20240904092311.9544-2-zhangzekun11@huawei.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Chen Ni authored
Replace comma between expressions with semicolons. Using a ',' in place of a ';' can have unintended side effects. Although that is not the case here, it is seems best to use ';' unless ',' is intended. Found by inspection. No functional change intended. Compile tested only. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://lore.kernel.org/r/20240905024245.1642989-1-nichen@iscas.ac.cnSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 04 Sep, 2024 8 commits
-
-
Bartosz Golaszewski authored
Cleanup the includes by putting them in alphabetical order. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Martyn Welch <martyn.welch@collabora.com> Link: https://lore.kernel.org/r/20240903154533.101258-1-brgl@bgdev.plSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Bartosz Golaszewski authored
Simplify the code in error paths by using the managed variant of the clock getter that controls the clock state as well. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240819151705.37258-2-brgl@bgdev.plSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Bartosz Golaszewski authored
There are no more any board files that use the platform data for gpio-davinci. We can remove the header defining it and port the code to no longer store any context in pdata. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240819151705.37258-1-brgl@bgdev.plSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
Sort the headers in alphabetic order in order to ease the maintenance for this part. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240902133148.2569486-6-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240902133148.2569486-5-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
We have a temporary variable to keep a pointer to struct device. Utilise it where it makes sense. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240902133148.2569486-4-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
There is no evidence that the 'dev' member of struct stmpe_gpio is used, drop it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240902133148.2569486-3-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
First of all, remove duplicate message that platform_get_irq() does already print. Second, correct the error message when unable to register a handler, which is broken in two ways: 1) the misleading 'get' vs. 'register'; 2) missing '\n' at the end. (Yes, for the curious ones, the dev_*() cases do not require '\n' and issue it automatically, but it's better to have them explicit) Fix all this here. Fixes: 1882e769 ("gpio: stmpe: Simplify with dev_err_probe()") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240902133148.2569486-2-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 02 Sep, 2024 25 commits
-
-
Krzysztof Kozlowski authored
Drop kerneldoc description of 'lock' to fix W=1 warning: drivers/gpio/gpio-pch.c:101: warning: Excess struct member 'lock' description in 'pch_gpio' Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240902121258.64094-1-krzysztof.kozlowski@linaro.orgSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Rong Qianfeng authored
Use devm_clk_get_enabled() simplify zynq_gpio_probe() and zynq_gpio_remove(). Acked-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Rong Qianfeng <rongqianfeng@vivo.com> Link: https://lore.kernel.org/r/20240820121651.29706-3-rongqianfeng@vivo.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Martyn Welch authored
The mpc8xxx GPIO can generate an interrupt on state change. This interrupt can be used to wake up the device from its sleep state if enabled to do so. Add required support to the driver so that the GPIO can be used in this way. In order for the GPIO to actually function in this way, it is necessary to also set the GPIO bit in the RCPM. This can be done via the device tree fsl,rcpm-wakeup property. Signed-off-by: Martyn Welch <martyn.welch@collabora.com> Link: https://lore.kernel.org/r/20240820143328.1987442-1-martyn.welch@collabora.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Dhruva Gole authored
Fix the build warning with W=1 flag, "Excess struct member 'compatible' description in 'syscon_gpio_data' " by removing the documentation for the non existent member. Signed-off-by: Dhruva Gole <d-gole@ti.com> Link: https://lore.kernel.org/r/20240902-b4-gpio-fix-v1-1-49a997994fa5@ti.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Rong Qianfeng authored
Use devm_clk_get_enabled() simplify xway_stp_probe(). Signed-off-by: Rong Qianfeng <rongqianfeng@vivo.com> Link: https://lore.kernel.org/r/20240820121651.29706-2-rongqianfeng@vivo.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
There is no reason to keep deprecated legacy API implementations in the gpiolib-devres.c. Consolidate devm_gpio_*() with other legacy APIs. While at it, clean up header inclusion block in gpiolib-devres.c. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240828151357.2677340-1-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
$ scripts/kernel-doc -v -none -Wall drivers/gpio/gpiolib* 2>&1 | grep -w warning | wc -l 67 Fix these by adding Return sections. While at it, make sure all of Return sections use the same style. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240828164449.2777666-1-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
of_node_to_fwnode() is a IRQ domain specific implementation of of_fwnode_handle(). Replace the former with more suitable API. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240822223332.705560-1-andy.shevchenko@gmail.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
of_node_to_fwnode() is a IRQ domain specific implementation of of_fwnode_handle(). Replace the former with more suitable API. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240822225818.707550-1-andy.shevchenko@gmail.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
of_node_to_fwnode() is a IRQ domain specific implementation of of_fwnode_handle(). Replace the former with more suitable API. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240822225300.707178-1-andy.shevchenko@gmail.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
of_node_to_fwnode() is a IRQ domain specific implementation of of_fwnode_handle(). Replace the former with more suitable API. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240822224737.706870-1-andy.shevchenko@gmail.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
of_node_to_fwnode() is a IRQ domain specific implementation of of_fwnode_handle(). Replace the former with more suitable API. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240822225629.707365-1-andy.shevchenko@gmail.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
of_node_to_fwnode() is a IRQ domain specific implementation of of_fwnode_handle(). Replace the former with more suitable API. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240822224130.706564-1-andy.shevchenko@gmail.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
of_node_to_fwnode() is a IRQ domain specific implementation of of_fwnode_handle(). Replace the former with more suitable API. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240822223845.706346-1-andy.shevchenko@gmail.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Hongbo Li authored
Use the IS_ERR_OR_NULL() helper instead of open-coding a NULL and an error pointer checks to simplify the code and improve readability. No functional changes are intended. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Link: https://lore.kernel.org/r/20240828122039.3697037-1-lihongbo22@huawei.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
zhangjiao authored
rm .*.cmd when calling make clean Signed-off-by: zhangjiao <zhangjiao2@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20240829062942.11487-1-zhangjiao2@cmss.chinamobile.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Krzysztof Kozlowski authored
The core schema in dtschema already strictly defines contents of nodes with "gpio-hog" property (with additionalProperties: false), thus the only thing device schema should do is: define "type: object" and required "gpio-hog". Make the code a bit simpler by removing redundant parts. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240828-dt-bindings-gpio-hog-v1-3-63b83e47d804@linaro.orgSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Krzysztof Kozlowski authored
GPIO hog nodes should define type, otherwise "dummy-hog" boolean properties would be allowed. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20240828-dt-bindings-gpio-hog-v1-1-63b83e47d804@linaro.orgSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
Besides the fact that (old) drivers use wrong definitions, e.g., GPIOF_DIR_IN instead of GPIOF_IN, shrink the legacy definitions by killing those GPIOF_DIR_* completely. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://lore.kernel.org/r/20240828142554.2424189-3-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
Besides the fact that (old) drivers use wrong definitions, e.g., GPIOF_INIT_HIGH instead of GPIOF_OUT_INIT_HIGH, shrink the legacy definitions by killing those GPIOF_INIT_* completely. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://lore.kernel.org/r/20240828142554.2424189-2-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Shen Lichuan authored
Use dev_err_probe() to simplify the error path and unify a message template. Using this helper is totally fine even if err is known to never be -EPROBE_DEFER. The benefit compared to a normal dev_err() is the standardized format of the error code, it being emitted symbolically and the fact that the error code is returned which allows more compact error paths. Signed-off-by: Shen Lichuan <shenlichuan@vivo.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240829131051.43200-1-shenlichuan@vivo.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Bartosz Golaszewski authored
There are no more board files defining platform data for this driver so remove the header and support from the driver. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240821121456.19553-4-brgl@bgdev.plSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Bartosz Golaszewski authored
Don't use specialized OF accessors if we can avoid it: switch to using the generic device property helpers. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240821121456.19553-3-brgl@bgdev.plSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Bartosz Golaszewski authored
Include mod_devicetable.h for struct of_device_id and its helpers. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240821121456.19553-2-brgl@bgdev.plSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Bartosz Golaszewski authored
Put all headers in alphabetical order. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240821121456.19553-1-brgl@bgdev.plSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 21 Aug, 2024 1 commit
-
-
Fabio Estevam authored
Print the error code in the pca953x_write_regs() and pca953x_read_regs() functions to help debugging. Suggested-by: Russell King (Oracle) <linux@armlinux.org.uk> Signed-off-by: Fabio Estevam <festevam@denx.de> Link: https://lore.kernel.org/r/20240821114202.2072220-1-festevam@gmail.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-