- 06 12月, 2020 9 次提交
-
-
由 Enrico Weigelt 提交于
When trying to export an nonexisting gpio ID, the kernel prints out a big warning w/ stacktrace, sounding like a huge problem. In fact it's a pretty normal situation, like file or device not found. So, just print a more relaxed warning instead. changes v2: drop defining pr_fmt() Signed-off-by: NEnrico Weigelt <info@metux.net> Link: https://lore.kernel.org/r/20201202133754.32045-1-info@metux.netSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Kent Gibson 提交于
Add support for selecting the realtime clock for events. Signed-off-by: NKent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20201014231158.34117-4-warthog618@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Kent Gibson 提交于
Add support for reporting if a line is configured to report realtime timestamps in events. Signed-off-by: NKent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20201014231158.34117-3-warthog618@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Kent Gibson 提交于
Using CLOCK_REALTIME as the source for event timestamps is crucial for some specific applications, particularly those requiring timetamps relative to a PTP clock, so provide an option to switch the event timestamp source from the default CLOCK_MONOTONIC to CLOCK_REALTIME. Note that CLOCK_REALTIME was the default source clock for GPIO until Linux 5.7 when it was changed to CLOCK_MONOTONIC due to issues with the shifting of the realtime clock. Providing this option maintains the CLOCK_MONOTONIC as the default, while also providing a path forward for those dependent on the pre-5.7 behaviour. Suggested-by: NJack Winch <sunt.un.morcov@gmail.com> Signed-off-by: NKent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20201014231158.34117-2-warthog618@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Daniel Palmer 提交于
This adds a driver that supports the GPIO block found in MStar/SigmaStar ARMv7 SoCs. The controller seems to have enough register for 128 lines but where they are wired up differs between chips and no currently known chip uses anywhere near 128 lines so there needs to be some per-chip data to collect together what lines actually have physical pins attached and map the right names to them. The core peripherals seem to use the same lines on the currently known chips but the lines used for the sensor interface, lcd controller etc pins seem to be totally different between the infinity and mercury chips The code tries to collect all of the re-usable names, offsets etc together so that it's easy to build the extra per-chip data for other chips in the future. So far this only supports the MSC313 and MSC313E chips. Support for the SSC8336N (mercury5) is trivial to add once all of the lines have been mapped out. Signed-off-by: NDaniel Palmer <daniel@0x0f.com> Link: https://lore.kernel.org/r/20201129110803.2461700-4-daniel@0x0f.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Daniel Palmer 提交于
Add a binding description for the MStar/SigmaStar GPIO controller found in the MSC313 and later ARMv7 SoCs. Signed-off-by: NDaniel Palmer <daniel@0x0f.com> Reviewed-by: NRob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201129110803.2461700-3-daniel@0x0f.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Daniel Palmer 提交于
Header adds defines for the gpio number of each pad from the driver view. The gpio block seems to have enough registers for 128 lines but what line is mapped to a physical pin depends on the chip. The gpio block also seems to contain some registers that are not related to gpio but needed somewhere to go. Because of the above the driver itself uses the index of a pin's offset in an array of the possible offsets for a chip as the gpio number. Signed-off-by: NDaniel Palmer <daniel@0x0f.com> Reviewed-by: NRob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201129110803.2461700-2-daniel@0x0f.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thierry Reding 提交于
Use a unique include guard for the Tegra186 GPIO DT bindings header to avoid clashes with the DT bindings header for earlier chips. Signed-off-by: NThierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20201127140852.123192-2-thierry.reding@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Alexandre Courbot 提交于
The "Interacting With the Legacy GPIO Subsystem" of the documentation was unclear at best, and even included a sentence that seems to say the opposite of what it should say about the lifetime of the return value of the conversion functions. Try to clarify things a bit and hopefully make that section more readable. Reported-by: NAndy Shevchenko <andy.shevchenko@gmail.com> BugLink: https://stackoverflow.com/q/64455505/2511795Signed-off-by: NAlexandre Courbot <gnurou@gmail.com> Link: https://lore.kernel.org/r/20201122092548.61979-1-gnurou@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 04 12月, 2020 4 次提交
-
-
由 Fabio Estevam 提交于
mxs is a devicetree-only platform and hence it does not make use of the id_table mechanism. Get rid of the .id_table as it is unused. Signed-off-by: NFabio Estevam <festevam@gmail.com> Link: https://lore.kernel.org/r/20201118191938.32693-1-festevam@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
This assigns the .irq_set_affinity to the parent callback. I assume the Tegra186 is an SMP system so this would be beneficial. I used the pattern making the hirerarchy tolerant for missing parent as in Marc's earlier patch. Suggested-by: NMarc Zyngier <maz@kernel.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Cc: Thierry Reding <treding@nvidia.com> Cc: Vidya Sagar <vidyas@nvidia.com> Link: https://lore.kernel.org/r/20201117213351.249668-2-linus.walleij@linaro.org
-
由 Linus Walleij 提交于
This assigns the .irq_set_affinity to the parent callback. I assume the sifive GPIO can be used in systems with SMP. I used the pattern making the hirerarchy tolerant for missing parent as in Marc's earlier patches. Suggested-by: NMarc Zyngier <maz@kernel.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Cc: Yash Shah <yash.shah@sifive.com> Cc: Wesley W. Terpstra <wesley@sifive.com> Link: https://lore.kernel.org/r/20201117213351.249668-1-linus.walleij@linaro.org
-
由 Linus Walleij 提交于
If users select sysfs support they get the character device as well so that end-users cannot complain that they "only have sysfs on my system". They should have the character device at all times. If someone is in so dire need of stripping out the character device while still enabling the sysfs ABI they can very well patch the kernel. Also only show this obsolete option to expert users. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20201110142724.14760-1-linus.walleij@linaro.org
-
- 18 11月, 2020 9 次提交
-
-
由 Fabio Estevam 提交于
Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code by removing the unused non-DT support. Signed-off-by: NFabio Estevam <festevam@gmail.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20201117105917.27591-1-festevam@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Srinivas Neeli 提交于
Added entry for xilinx GPIO drivers. Signed-off-by: NSrinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: NShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Acked-by: NMichal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-10-git-send-email-srinivas.neeli@xilinx.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Srinivas Neeli 提交于
In two different instances the return value of "of_property_read_u32" API was neither captured nor checked. Fixed it by capturing the return value and then checking for any error. Signed-off-by: NSrinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: NMichal Simek <michal.simek@xilinx.com> Addresses-Coverity: "check_return" Link: https://lore.kernel.org/r/1605201148-4508-9-git-send-email-srinivas.neeli@xilinx.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Srinivas Neeli 提交于
Added remove function support. Signed-off-by: NSrinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: NMichal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-7-git-send-email-srinivas.neeli@xilinx.com [dropped pm disable call] Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Srinivas Neeli 提交于
Adds clock support to the Xilinx GPIO driver. Signed-off-by: NSrinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: NMichal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-4-git-send-email-srinivas.neeli@xilinx.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Srinivas Neeli 提交于
Specify clock property in binding. Signed-off-by: NSrinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: NMichal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-3-git-send-email-srinivas.neeli@xilinx.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Srinivas Neeli 提交于
Arrange header files in sorted order. Signed-off-by: NSrinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: NMichal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-2-git-send-email-srinivas.neeli@xilinx.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
Merge tag 'intel-gpio-v5.11-1' of gitolite.kernel.org:pub/scm/linux/kernel/git/andy/linux-gpio-intel into devel intel-gpio for v5.11-1 * Refactor GPIO library to support bias and debounce ACPI settings The following is an automated git shortlog grouped by driver: gpiolib: - acpi: Make Intel GPIO tree official for GPIO ACPI work - acpi: Use BIT() macro to increase readability - acpi: Convert pin_index to be u16 - acpi: Extract acpi_request_own_gpiod() helper - acpi: Make acpi_gpio_to_gpiod_flags() usable for GpioInt() - acpi: Set initial value for output pin based on bias and polarity - acpi: Move acpi_gpio_to_gpiod_flags() upper in the code - acpi: Move non-critical code outside of critical section - acpi: Take into account debounce settings - acpi: Use named item for enum gpiod_flags variable - acpi: Respect bias settings for GpioInt() resource - Introduce gpio_set_debounce_timeout() for internal use - Extract gpio_set_config_with_argument_optional() helper - move bias related code from gpio_set_config() to gpio_set_bias() - Extract gpio_set_config_with_argument() for future use - use proper API to pack pin configuration parameters - add missed break statement - Replace unsigned by unsigned int Merge tag 'intel-pinctrl-v5.10-2' into HEAD: - Merge tag 'intel-pinctrl-v5.10-2' into HEAD pinctrl: - intel: Set default bias in case no particular value given - intel: Fix 2 kOhm bias which is 833 Ohm
-
由 Linus Walleij 提交于
Linux 5.10-rc4
-
- 16 11月, 2020 18 次提交
-
-
由 Andy Shevchenko 提交于
Make Intel GPIO tree official for GPIO ACPI work. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
We may use BIT() macro to increase readability in acpi_gpio_adr_space_handler(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
As specified by ACPI the pin index is 16-bit unsigned integer. Define the variable, which holds it, accordingly. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
It appears that we are using similar code excerpts for ACPI OpRegion and event handling. Deduplicate those excerpts by extracting a new acpi_request_own_gpiod() helper. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
GpioInt() implies input configuration of the pin. Add this to the acpi_gpio_to_gpiod_flags() and make usable for GpioInt(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
GpioIo() resources don't contain an initial value for the output pin. Therefore instead of deducting its value solely based on bias field we should deduce that value from the polarity and the bias fields. Typical scenario is, when pin is defined in the table and its polarity, specified in _DSD or via platform code, is defined as active low, in the following call chain: -> acpi_populate_gpio_lookup() -> acpi_gpio_to_gpiod_flags() it will return GPIOD_OUT_HIGH if bias is set no matter if polarity is GPIO_ACTIVE_LOW, so it will return the current level instead of the logical level. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: NVasile-Laurentiu Stanimir <vasile-laurentiu.stanimir@windriver.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Move acpi_gpio_to_gpiod_flags() upper in the code to allow further refactoring. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Mika noticed that some code is run under mutex when it doesn't require the lock, like an error code assignment. Move non-critical code outside of critical section. Suggested-by: NMika Westerberg <mika.westerberg@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
We didn't take into account the debounce settings supplied by ACPI. This change is targeting the mentioned gap. Reported-by: NCoiby Xu <coiby.xu@gmail.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Use named item instead of plain integer for enum gpiod_flags to make it clear that even 0 has its own meaning. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
In some cases the GpioInt() resource is coming with bias settings which may affect system functioning. Respect bias settings for GpioInt() resource by calling acpi_gpio_update_gpiod_*flags() API in acpi_dev_gpio_irq_get(). Reported-by: NJamie McClymont <jamie@kwiius.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
In some cases we would like to have debounce setter which doesn't fail when a feature is not supported by a controller. Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com>
-
由 Andy Shevchenko 提交于
This function is useful for internal use in the GPIO library. There will be new user coming, prepare a helper for the new comer and the existing ones. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Move bias related code from gpio_set_config() to gpio_set_bias(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
In the future we will need to have a separate function that takes an arbitrary argument value. Extract gpio_set_config_with_argument() for that purpose. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Instead of open coded macro use, call pinconf_to_config_packed(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
It's no difference in the functionality, but after the change the code is less error prone to various checkers. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Replace unsigned by unsigned int in GPIO library code. Note, legacy API left untouched. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-