#
9580ba25 |
|
22-Nov-2023 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Simplify code with cleanup helpers Use macros defined in linux/cleanup.h to automate resource lifetime control in the driver. Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b679d6c0 |
|
03-Oct-2023 |
Bartosz Golaszewski <bartosz.golaszewski@linaro.org> |
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 <bartosz.golaszewski@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
|
#
315c46f9 |
|
03-Oct-2023 |
Bartosz Golaszewski <bartosz.golaszewski@linaro.org> |
treewide: rename pinctrl_gpio_direction_input_new() Now that pinctrl_gpio_direction_input() is no longer used, let's drop the '_new' suffix from its improved variant. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
|
#
578d009b |
|
13-Oct-2023 |
Bartosz Golaszewski <bartosz.golaszewski@linaro.org> |
pinctrl: lynxpoint: use new pinctrl GPIO helpers Replace the pinctrl helpers taking the global GPIO number as argument with the improved variants that instead take a pointer to the GPIO chip and the controller-relative offset. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
|
#
1cb71a63 |
|
03-Oct-2023 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Replace kernel.h by what is actually being used The kernel.h is a mess of unrelated things and we only used it as a proxy to array_size.h, hence switch from former to the latter. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
67c9e830 |
|
03-Oct-2023 |
Raag Jadav <raag.jadav@intel.com> |
pinctrl: lynxpoint: drop runtime PM support Since Lynxpoint pinctrl device is not attached to acpi_lpss_pm_domain, runtime PM serves no purpose here. Drop it and switch to pm_sleep_ptr() as now we only have resume handle in place. Signed-off-by: Raag Jadav <raag.jadav@intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Link: https://lore.kernel.org/r/20231003114036.27674-3-raag.jadav@intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
1956149d |
|
17-Jul-2023 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Make use of pm_ptr() Cleaning up the driver to use pm_ptr() and *_PM_OPS() macros that make it simpler and allows the compiler to remove those functions if built without CONFIG_PM and CONFIG_PM_SLEEP support. The lp_gpio_resume() is also assigned to .thaw and .restore members. This is not a problem as the function it enables input pins that had been disabled by firmware and repetion of that doesn't change the pin configuration, i.e. it is idempotent. Reviewed-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20230717172821.62827-6-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
976cf4a6 |
|
14-Aug-2023 |
Raag Jadav <raag.jadav@intel.com> |
pinctrl: lynxpoint: reuse common functions from pinctrl-intel Reuse common functions from pinctrl-intel driver. While at it, select pinctrl-intel for Intel Lynxpoint driver. Signed-off-by: Raag Jadav <raag.jadav@intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Link: https://lore.kernel.org/r/20230814060311.15945-5-raag.jadav@intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
#
b19d82e1 |
|
19-Dec-2022 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Convert to use new memeber in struct intel_function Convert driver to use generic data type and hence a new member in the struct intel_function. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
c4168db7 |
|
07-Oct-2022 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, sort headers alphabetically. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
a7f9757c |
|
20-Jun-2022 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Switch to to embedded struct pingroup Since struct intel_pingroup got a new member, switch the driver to use it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
180f9db7 |
|
12-May-2022 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: make irq_chip immutable Since recently, the kernel is nagging about mutable irq_chips: "not an immutable chip, please consider fixing it!" Drop the unneeded copy, flag it as IRQCHIP_IMMUTABLE, add the new helper functions and call the appropriate gpiolib functions. While at it, switch hwirq variable to use the correct type for the sake of consistency. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
a9cb09b7 |
|
04-May-2021 |
Marc Zyngier <maz@kernel.org> |
pinctrl: Bulk conversion to generic_handle_domain_irq() Wherever possible, replace constructs that match either generic_handle_irq(irq_find_mapping()) or generic_handle_irq(irq_linear_revmap()) to a single call to generic_handle_domain_irq(). Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Marc Zyngier <maz@kernel.org>
|
#
1d112baa |
|
11-Nov-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Enable pin configuration setting for GPIO chip It appears that pin configuration for GPIO chip hasn't been enabled yet due to absence of ->set_config() callback. Enable it here for Intel Lynxpoint PCH. Depends-on: 2956b5d94a76 ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
d25dd66a |
|
11-Nov-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Use defined constant for disabled bias explicitly We have a specific constant to describe a disabled bias, i.e. GPIWP_NONE. Use it explicitly instead of making an assumption about its value. While at it, move argument assignment to the switch-case in lp_pin_config_get(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
0ddebf85 |
|
02-Nov-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Unify initcall location in the code Like in the other Intel pin control drivers, attach initcalls to the corresponding functions. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
e359a6f0 |
|
12-Jun-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Drop no-op ACPI_PTR() call Since we dependent on ACPI, there is no need to use ACPI_PTR() which is a no-op in this case. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
0472567b |
|
15-Jun-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Introduce helpers to enable or disable input Introduce couple of helpers to enable or disable input. i.e. lp_gpio_enable_input() and lp_gpio_disable_input(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
f3e7d281 |
|
10-Jun-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Make use of for_each_requested_gpio() Make use of for_each_requested_gpio() instead of home grown analogue. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
5f3b82a1 |
|
14-Apr-2020 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Use platform_get_irq_optional() explicitly There is no need to repeat functionality of platform_get_irq_optional() in the driver. Replace it with explicit call to the helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
#
3a67fe38 |
|
25-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Update summary in the driver Reflect in the driver that it is now a pin control one. While here, update copyright years and authors. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
64e14e90 |
|
25-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Switch to pin control API When all preparations are done, we may switch to pin control API. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
3683509c |
|
04-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Add GPIO <-> pin mapping ranges via callback When IRQ chip is instantiated via GPIO library flow, the few functions, in particular the ACPI event registration mechanism, on some of ACPI based platforms expect that the pin ranges are initialized to that point. Add GPIO <-> pin mapping ranges via callback in the GPIO library flow. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
03d9eca7 |
|
25-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Implement ->pin_dbg_show() The introduced callback ->pin_dbg_show() is useful for debugging. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
7f32d370 |
|
20-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Add pin control operations Add implementation for: - pin control, group information retrieval: count, name and pins - pin muxing: - function information (count, name and groups) - mux setting - GPIO control (enable, disable, set direction) - pin configuration: - pull disable, up and down - any other option is treated as not supported. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
18213ad4 |
|
25-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Reuse struct intel_pinctrl in the driver We may use now available struct intel_pinctrl in the driver. No functional change implied. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
cecddda7 |
|
25-Oct-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Add pin control data structures In order to implement pin control for Intel Lynxpoint, we need data structures in which to store and pass along pin, community and SoC data information. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
54d371cf |
|
19-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Implement intel_gpio_get_direction callback Allows querying GPIO direction from the pad config register. If the pad is not in GPIO mode, return an error. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
5931e6ed |
|
22-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Implement ->irq_ack() callback Instead of playing tricks with registers in the interrupt handler, utilize the IRQ chip core for ACKing interrupts properly. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
540bff18 |
|
25-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Move ownership check to IRQ chip There is nothing wrong with requesting pin that owned by ACPI. The only difference is how interrupt status will be reflected. It means that in ACPI mode we may not use pin as GPIO-backed IRQ. Taking above into consideration, move the check from GPIO to IRQ chip callback. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
095f2a67 |
|
18-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Move lp_irq_type() closer to IRQ related routines Consolidate IRQ routines for better maintenance. While here, rename lp_irq_type() to lp_irq_set_type() to be in align with a callback name. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
d0f2df40 |
|
25-Oct-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Move ->remove closer to ->probe() Consolidate ->remove and ->probe() callbacks for better maintenance. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
21a06495 |
|
25-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Extract lp_gpio_acpi_use() for future use We may need this function for other features in the pin control driver. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
c35f463a |
|
26-Sep-2018 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Convert unsigned to unsigned int Simple type conversion with no functional change implied. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
e1940ade |
|
25-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Switch to memory mapped IO accessors Convert driver to use memory mapped IO accessors. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
1e78ea71 |
|
25-Oct-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Keep pointer to struct device instead of its container There is no need to keep pointer to struct platform_device, which is container of struct device, because the latter is what have been used everywhere outside of ->probe() path. In any case we may derive pointer to the container when needed. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
03fb681b |
|
25-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Relax GPIO request rules A pin in native mode still can be requested as GPIO, though we assume that firmware has configured it properly, which sometimes is not the case. Here we allow turning the pin as GPIO to avoid potential issues, but issue warning that something might be wrong. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
76347d7a |
|
25-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Assume 2 bits for mode selector New generations can use 2 bits for mode selector. Update the code to support it. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
a718e68e |
|
25-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Use standard pattern for memory allocation The pattern foo = kmalloc(sizeof(*foo), GFP_KERNEL); has an advantage when foo type is changed. Since we are planning a such, better to be prepared by using standard pattern for memory allocation. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
caedcbd0 |
|
25-Oct-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Use %pR to print IO resource Replace explicit casting by pointer to struct resource with specifier replacement to %pR to print the IO resource. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
3b4c2d8e |
|
25-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Drop useless assignment There is no need to assign ret variable in ->probe(). Drop useless assignment. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
7c0bc7bb |
|
25-Oct-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Correct amount of pins When we count from 0 it's possible to get into off-by-one error. That's what had happened to this driver. So, correct amount of pins and related typos in the code. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
b2e05d63 |
|
18-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Use raw_spinlock for locking The Intel Lynxpoint pinctrl driver implements irqchip callbacks which are called with desc->lock raw_spinlock held. In mainline this is fine because spinlock resolves to raw_spinlock. However, running the same code in -rt we will get a BUG() asserted. This is because in -rt spinlocks are preemptible so taking the driver private spinlock in irqchip callbacks causes might_sleep() to trigger. In order to keep -rt happy but at the same time make sure that register accesses get serialized, convert the driver to use raw_spinlock instead. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
#
eb83479e |
|
22-Aug-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
pinctrl: lynxpoint: Move GPIO driver to pin controller folder Move Lynxpoint GPIO driver under Intel pin control umbrella for further transformation to a real pin control driver. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|