- Jun 16, 2023
-
-
Andy Shevchenko authored
The of_gpio.h is not and shouldn't be used in the drivers. Remove it. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by:
Viresh Kumar <viresh.kumar@linaro.org> Link: https://lore.kernel.org/r/20230615164158.25406-1-andriy.shevchenko@linux.intel.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Andy Shevchenko authored
The of_gpio.h is not and shouldn't be used in the drivers. Remove it. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230615164204.25462-1-andriy.shevchenko@linux.intel.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Claudiu Beznea authored
devm_kasprintf() returns a pointer to dynamically allocated memory. Pointer could be NULL in case allocation fails. Check pointer validity. Identified with coccinelle (kmerr.cocci script). Fixes: 77618084 ("pinctrl: introduce driver for Atmel PIO4 controller") Depends-on: 1c4e5c47 ("pinctrl: at91: use devm_kasprintf() to avoid potential leaks") Depends-on: 5a8f9cf2 ("pinctrl: at91-pio4: use proper format specifier for unsigned int") Signed-off-by:
Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230615105333.585304-4-claudiu.beznea@microchip.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Claudiu Beznea authored
devm_kasprintf() returns a pointer to dynamically allocated memory. Pointer could be NULL in case allocation fails. Check pointer validity. Identified with coccinelle (kmerr.cocci script). Fixes: 7e5ea974 ("pinctrl: pinctrl-microchip-sgpio: Add pinctrl driver for Microsemi Serial GPIO") Signed-off-by:
Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230615105333.585304-3-claudiu.beznea@microchip.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Xiaolei Wang authored
The config passed in by pad wakeup is 1, when num_configs is 1, Configuration [1] should not be fetched, which will be detected by KASAN as a memory out of bounds condition. Modify to get configs[1] when num_configs is 2. Fixes: f60c9eac ("gpio: mxc: enable pad wakeup on i.MX8x platforms") Signed-off-by:
Xiaolei Wang <xiaolei.wang@windriver.com> Reviewed-by:
Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20230504233736.3766296-1-xiaolei.wang@windriver.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- Jun 11, 2023
-
-
Linus Walleij authored
Merge tag 'qcom-pinctrl-6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into devel Qualcomm pinctrl Devicetree bindings changes for v6.5 Simplify remaining bindings with usage of unevaluatedProperties. This will have the same functional effect with less code.
-
- Jun 09, 2023
-
-
Jiasheng Jiang authored
Add check for ioremap() and return the error if it fails in order to guarantee the success of ioremap(). Fixes: 3b588e43 ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver") Signed-off-by:
Jiasheng Jiang <jiasheng@iscas.ac.cn> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20230607095829.1345-1-jiasheng@iscas.ac.cn Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Wells Lu authored
Fix Smatch static checker warning: potential null dereference 'configs'. (kmalloc returns null) Changes in v2: 1. Add free allocated memory before returned -ENOMEM. 2. Add call of_node_put() before returned -ENOMEM. Fixes: aa74c44b ("pinctrl: Add driver for Sunplus SP7021") Signed-off-by:
Wells Lu <wellslutw@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/1685277277-12209-1-git-send-email-wellslutw@gmail.com [Rebased on the patch from Lu Hongfei] Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Lu Hongfei authored
Ensure child node references are decremented properly in the error path. Signed-off-by:
Lu Hongfei <luhongfei@vivo.com> Link: https://lore.kernel.org/r/20230606070201.14249-1-luhongfei@vivo.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Andy Shevchenko authored
This is debugfs and there is no much sense to strict the user from sending as much data as they can. The memdup_user_nul() will anyway fail if there is not enough memory. Relax the user input size by removing an artificial limitaion. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230604131215.78847-2-andriy.shevchenko@linux.intel.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Andy Shevchenko authored
Current code is suboptimal in three ways: 1) it explicitly terminates the string which is not needed; 2) it might provoke additional faults, because asked lenght might be bigger than the real one; 3) it consumes more than needed lines in the source. Instead of using kmalloc() + strncpy_from_user() + terminating, just utilize memdup_user_nul(). Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230604131215.78847-1-andriy.shevchenko@linux.intel.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Prathamesh Shete authored
When the PMC device is disabled, probing of the Tegra186 GPIO driver fails because the IRQ domain that is registered by the PMC driver is not found. The PMC IRQ domain is only used for wake-up and does not impact GPIO functionality in general. Therefore, if the PMC device is disabled, skip looking up the PMC IRQ domain to allow the GPIO driver to be probed. Signed-off-by:
Manish Bhardwaj <mbhardwaj@nvidia.com> Signed-off-by:
Prathamesh Shete <pshete@nvidia.com> Reviewed-by:
Jon Hunter <jonathanh@nvidia.com> Acked-by:
Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20230607113104.11761-1-pshete@nvidia.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Prathamesh Shete authored
This change adds support for the two pin controllers found on Tegra234. Signed-off-by:
Prathamesh Shete <pshete@nvidia.com> Signed-off-by:
Thierry Reding <treding@nvidia.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230605154230.2910847-3-thierry.reding@gmail.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Prathamesh Shete authored
Tegra234 contains two pin controllers. Document their compatible strings and describe the list of pins and functions that they provide. Signed-off-by:
Prathamesh Shete <pshete@nvidia.com> Signed-off-by:
Thierry Reding <treding@nvidia.com> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230605154230.2910847-2-thierry.reding@gmail.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Krzysztof Kozlowski authored
The audio pin controller drivers depend on PINCTRL_LPASS_LPI, but since PINCTRL_LPASS_LPI is not the first entry, they are not displayed in menuconfig as dependent of PINCTRL_LPASS_LPI. Re-order the entries to fix this. Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230601152026.1182648-8-krzysztof.kozlowski@linaro.org Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Krzysztof Kozlowski authored
In menuconfig, some entries depending on PINCTRL_MSM are indented and expressed as dependening but some not, because of other Kconfig entries in between, Move all main Qualcomm SoC pin controller driver entries into new Kconfig.msm file so they will be nicely ordered in Kconfig file (by CONFIG_ name) and properly indented as PINCTRL_MSM dependency in menuconfig. Functionally this is the same, but since entire file is guarded with "if PINCTRL_MSM" drop this dependency from individual entries. Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230601152026.1182648-7-krzysztof.kozlowski@linaro.org Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Krzysztof Kozlowski authored
Makefile selected Qualcomm pinctrl drivers only for ARCH_QCOM, making any COMPILE_TEST options inside Kconfig ((ARCH_QCOM || COMPILE_TEST) or (OF || COMPILE_TEST)) not effective. Always descent to the qcom subdirectory to fix this. All individual drivers are selected in Makefile via dedicated CONFIG entries, thus this should not have functional impact except when compile testing. Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230601152026.1182648-6-krzysztof.kozlowski@linaro.org Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Krzysztof Kozlowski authored
The common MSM pinctrl driver code (PINCTRL_MSM) uses pinconf_generic_dt_node_to_map_group() from GENERIC_PINCONF, which is not available for compile testing for !OF cases. Drivers actually do not depend on OF. Move the OF dependency to the entry actually depending on it and drop any "|| COMPILE_TEST", because OF is required also for compile testing (lack of OF was never visible in compile testing because none of the drivers could be compile tested due to Makefile). Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230601152026.1182648-5-krzysztof.kozlowski@linaro.org Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Krzysztof Kozlowski authored
PINCTRL_MSM depends on GPIOLIB, thus individual driver entries depending on the first do not have to depend on the latter. Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230601152026.1182648-4-krzysztof.kozlowski@linaro.org Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Krzysztof Kozlowski authored
Correct typo: Tehcnologies->Technologies. Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230601152026.1182648-3-krzysztof.kozlowski@linaro.org Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Krzysztof Kozlowski authored
Use tab for correct Kconfig indentation. Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230601152026.1182648-2-krzysztof.kozlowski@linaro.org Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Krzysztof Kozlowski authored
Driver can bind only via ACPI matching and acpi_device_id is there unconditionally, so drop useless ACPI_PTR() macro. Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20230601152026.1182648-1-krzysztof.kozlowski@linaro.org Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Sricharan Ramabadhran authored
Add pinctrl definitions for the TLMM of IPQ5018. Reviewed-by:
Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Co-developed-by:
Nitheesh Sekar <quic_nsekar@quicinc.com> Signed-off-by:
Nitheesh Sekar <quic_nsekar@quicinc.com> Co-developed-by:
Varadarajan Narayanan <quic_varada@quicinc.com> Signed-off-by:
Varadarajan Narayanan <quic_varada@quicinc.com> Signed-off-by:
Sricharan Ramabadhran <quic_srichara@quicinc.com> Link: https://lore.kernel.org/r/20230608122152.3930377-5-quic_srichara@quicinc.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Sricharan Ramabadhran authored
Add device tree binding Documentation details for ipq5018 pinctrl driver. Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Co-developed-by:
Nitheesh Sekar <quic_nsekar@quicinc.com> Signed-off-by:
Nitheesh Sekar <quic_nsekar@quicinc.com> Co-developed-by:
Varadarajan Narayanan <quic_varada@quicinc.com> Signed-off-by:
Varadarajan Narayanan <quic_varada@quicinc.com> Signed-off-by:
Sricharan Ramabadhran <quic_srichara@quicinc.com> Link: https://lore.kernel.org/r/20230608122152.3930377-4-quic_srichara@quicinc.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Nishanth Menon authored
For convenience (less code duplication), the pin controller pin configuration register values were defined in the bindings header. These are not some IDs or other abstraction layer but raw numbers used in the registers. These constants do not fit the purpose of bindings. They do not provide any abstraction, any hardware and driver independent ID. In fact, the Linux pinctrl-single driver actually do not use the bindings header at all. Commit f2de003e ("dt-bindings: pinctrl: k3: Deprecate header with register constants") already moved users to the local header, so, drop the binding header. See background discussion in [1]. While at it, clean up the MAINTAINERS file which is the only reference left. [1]: https://lore.kernel.org/linux-arm-kernel/71c7feff-4189-f12f-7353-bce41a61119d@linaro.org/ Suggested-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Nishanth Menon <nm@ti.com> Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230601173831.982429-1-nm@ti.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- Jun 02, 2023
-
-
Chester Lin authored
The .data field in struct of_device_id is used as a const member so it's inappropriate to attach struct s32_pinctrl_soc_info with of_device_id because some members in s32_pinctrl_soc_info need to be filled by pinctrl-s32cc at runtime. For this reason, struct s32_pinctrl_soc_info must be allocated in pinctrl-s32cc and then create a new struct s32_pinctrl_soc_data in order to represent const .data in of_device_id. To combine these two structures, a s32_pinctrl_soc_data pointer is introduced in s32_pinctrl_soc_info. Besides, use of_device_get_match_data() instead of of_match_device() since the driver only needs to retrieve the .data from of_device_id. Link: https://lore.kernel.org/r/20230329041630.8011-1-clin@suse.com/ Suggested-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Chester Lin <clin@suse.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- Jun 01, 2023
-
-
Thierry Reding authored
The SoC-specific data is stored in pmx->soc and that's used throughout the driver to access this data. The probe function has access to a local version of that copy and uses it in some occasions. Replace them with the more standard pmx->soc access for more consistency. Signed-off-by:
Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20230530105308.1292852-2-thierry.reding@gmail.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Thierry Reding authored
The function table is filled with group information based on other instance-specific data at runtime. However, the function table can be shared between multiple instances, causing the ->probe() function for one instance to overwrite the table of a previously probed instance. Fix this by sharing only the function names and allocating a separate function table for each instance. Fixes: 5a004736 ("pinctrl: tegra: Separate Tegra194 instances") Signed-off-by:
Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20230530105308.1292852-1-thierry.reding@gmail.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- May 30, 2023
-
-
Wells Lu authored
Fix Smatch static checker warning: potential null dereference 'configs'. (kmalloc returns null) Fixes: aa74c44b ("pinctrl: Add driver for Sunplus SP7021") Signed-off-by:
Wells Lu <wellslutw@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/1685277277-12209-1-git-send-email-wellslutw@gmail.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- May 29, 2023
-
-
Uwe Kleine-König authored
After commit b8a1a4cd ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f4 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230525204258.711186-1-u.kleine-koenig@pengutronix.de Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Lizhe authored
Before executing microchip_sgpio_irq_set_type(), type has already been cleared IRQ_TYPE_SENSE_MASK, see __irq_set_trigger(). Signed-off-by:
Lizhe <sensor1010@163.com> Link: https://lore.kernel.org/r/20230519170716.3459-1-sensor1010@163.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Jonathan McDowell authored
The AXP209 device has a 4th GPIO which has a slightly different register setup, where the control + status bits are held in a single register rather than sharing AXP20X_GPIO20_SS with GPIOs 0-2. Signed-off-by:
Jonathan McDowell <noodles@earth.li> Reviewed-by:
Jernej Skrabec <jernej.skrabec@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/dde40307f0ebc23b9841c32e702b481ab5193dc4.1684258957.git.noodles@earth.li Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Rohit Agarwal authored
Add initial Qualcomm SDX75 pinctrl driver to support pin configuration with pinctrl framework for SDX75 SoC. While at it, reordering the SDX65 entry. Signed-off-by:
Rohit Agarwal <quic_rohiagar@quicinc.com> Reviewed-by:
Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/1684425432-10072-4-git-send-email-quic_rohiagar@quicinc.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Rohit Agarwal authored
Update the entry for pinctrl bindings maintainer as the current one checks only in the .txt files. Signed-off-by:
Rohit Agarwal <quic_rohiagar@quicinc.com> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by:
Bhupesh Sharma <bhupesh.sharma@linaro.org> Reviewed-by:
Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/1684425432-10072-3-git-send-email-quic_rohiagar@quicinc.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Rohit Agarwal authored
Add device tree binding Documentation details for Qualcomm SDX75 pinctrl driver. Signed-off-by:
Rohit Agarwal <quic_rohiagar@quicinc.com> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by:
Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/1684425432-10072-2-git-send-email-quic_rohiagar@quicinc.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
Merge tag 'renesas-pinctrl-for-v6.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.5 - Fix whitespace.
-
- May 24, 2023
-
-
Dan Carpenter authored
The devm_kasprintf_strarray() function doesn't return NULL on error, it returns error pointers. Update the checks accordingly. Fixes: f494c191 ("pinctrl: at91: use devm_kasprintf() to avoid potential leaks (part 2)") Signed-off-by:
Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by:
Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by:
Ryan Wanner <ryan.wanner@microchip.com> Link: https://lore.kernel.org/r/5697980e-f687-47a7-9db8-2af34ae464bd@kili.mountain Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Ryan Wanner authored
Enable push-pull configuration. Remove integer value argument from open-drain configuration as it is discarded when pinconf function is called from gpiolib. Add push-pull do debug and get functions. Signed-off-by:
Ryan Wanner <Ryan.Wanner@microchip.com> Acked-by:
Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/d898c31277f6bce6f7d830edf4332ff605498c7b.1684313910.git.Ryan.Wanner@microchip.com [Fix two coding style issues] Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Ryan Wanner authored
Add generic push-pull support for pio4 driver. Signed-off-by:
Ryan Wanner <Ryan.Wanner@microchip.com> Acked-by:
Conor Dooley <conor.dooley@microchip.com> Reviewed-by:
Conor Dooley <conor.dooley@microchip.com> Acked-by:
Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/048a41d1dcb3da0e845986a73eaac61a54c69269.1684313910.git.Ryan.Wanner@microchip.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- May 22, 2023
-
-
Bartosz Golaszewski authored
The SA8775P TLMM driver is missing the GPIO-to-wakeup-pin mapping. This adds it. Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by:
Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230515092515.180920-1-brgl@bgdev.pl Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-