- 04 Sep, 2024 2 commits
-
-
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 2 commits
-
-
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>
-
Andy Shevchenko authored
Use GPIO_LOOKUP_IDX() macro which provides a compound literal and can be used with dynamic data. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240820200858.3659995-1-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 20 Aug, 2024 5 commits
-
-
Andy Shevchenko authored
There is no need to have and export the count variable for the array in question. Instead, make it NULL-terminated. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240819142945.327808-6-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
For the sake of unification and easier maintenance replace swnode_format_propname() call with for_each_gpio_property_name() for-loop. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240819142945.327808-5-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
Instead of the spreading simlar code over the file, introduce a helper. It also enforces the nargs validation for all GPIO software node APIs. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240819142945.327808-4-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
In one case 'ret' is used in the other 'error'. Make the latter use the former, i.e. 'ret'. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240819142945.327808-3-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
Introduce a helper macro for_each_gpio_property_name(). With that in place, update users. This, in particular, will help making the following simplifications easier. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240819142945.327808-2-andriy.shevchenko@linux.intel.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 19 Aug, 2024 2 commits
-
-
Bartosz Golaszewski authored
Merge tag 'ib-mfd-gpio-pwm-v6.12' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/lee/mfd into gpio/for-next Immutable branch between MFD, GPIO and PWM due for the v6.12 merge window
-
Krzysztof Kozlowski authored
Use scoped for_each_xxx loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240816151356.154991-1-krzysztof.kozlowski@linaro.orgSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 10 Aug, 2024 1 commit
-
-
Jared McArthur authored
Current definition of the davinci gpio controller doesn't include the gpio-reserved-ranges property. Add the gpio-reserved-ranges property so it can be used within device tree files. Will prevent users from trying to access gpios that don't exist. Signed-off-by: Jared McArthur <j-mcarthur@ti.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240809154638.394091-2-j-mcarthur@ti.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 05 Aug, 2024 2 commits
-
-
Haibo Chen authored
For IP which do not contain PDDR, currently use the pinmux API pinctrl_gpio_direction_input() to config the output/input, pinmux currently do not support get_direction(). So here add the GPIO get_direction() support only for the IP which has Port Data Direction Register (PDDR). Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Link: https://lore.kernel.org/r/20240801093028.732338-3-haibo.chen@nxp.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Haibo Chen authored
This gpio controller support up to 32 pins per port. And all the register width is 32 bit. So here use u32 to replace the original unsigned long. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Stefan Wahren <wahrenst@gmx.net> Link: https://lore.kernel.org/r/20240801093028.732338-2-haibo.chen@nxp.comSigned-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 01 Aug, 2024 1 commit
-
-
Clark Wang authored
The ADP5585 is a 10/11 input/output port expander with a built in keypad matrix decoder, programmable logic, reset generator, and PWM generator. This driver supports the PWM function using the platform device registered by the core MFD driver. The driver is derived from an initial implementation from NXP, available in commit 113113742208 ("MLK-25922-1 pwm: adp5585: add adp5585 PWM support") in their BSP kernel tree. It has been extensively rewritten. Signed-off-by: Clark Wang <xiaoning.wang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Co-developed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Uwe Kleine-König <ukleinek@kernel.org> Link: https://lore.kernel.org/r/20240722121100.2855-5-laurent.pinchart@ideasonboard.comSigned-off-by: Lee Jones <lee@kernel.org>
-