- 05 Dec, 2020 5 commits
-
-
Daniel Palmer authored
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: Daniel Palmer <daniel@0x0f.com> Link: https://lore.kernel.org/r/20201129110803.2461700-4-daniel@0x0f.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Daniel Palmer authored
Add a binding description for the MStar/SigmaStar GPIO controller found in the MSC313 and later ARMv7 SoCs. Signed-off-by: Daniel Palmer <daniel@0x0f.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201129110803.2461700-3-daniel@0x0f.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Daniel Palmer authored
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: Daniel Palmer <daniel@0x0f.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201129110803.2461700-2-daniel@0x0f.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Thierry Reding authored
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: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20201127140852.123192-2-thierry.reding@gmail.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Alexandre Courbot authored
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: Andy Shevchenko <andy.shevchenko@gmail.com> BugLink: https://stackoverflow.com/q/64455505/2511795Signed-off-by: Alexandre Courbot <gnurou@gmail.com> Link: https://lore.kernel.org/r/20201122092548.61979-1-gnurou@gmail.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
- 04 Dec, 2020 4 commits
-
-
Fabio Estevam authored
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: Fabio Estevam <festevam@gmail.com> Link: https://lore.kernel.org/r/20201118191938.32693-1-festevam@gmail.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
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: Marc Zyngier <maz@kernel.org> Signed-off-by: Linus 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 authored
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: Marc Zyngier <maz@kernel.org> Signed-off-by: Linus 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 authored
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: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20201110142724.14760-1-linus.walleij@linaro.org
-
- 18 Nov, 2020 4 commits
-
-
Fabio Estevam authored
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: Fabio Estevam <festevam@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20201117105917.27591-1-festevam@gmail.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Srinivas Neeli authored
Added entry for xilinx GPIO drivers. Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-10-git-send-email-srinivas.neeli@xilinx.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Srinivas Neeli authored
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: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal 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: Linus Walleij <linus.walleij@linaro.org>
-
Srinivas Neeli authored
Added remove function support. Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal 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: Linus Walleij <linus.walleij@linaro.org>
-
- 17 Nov, 2020 5 commits
-
-
Srinivas Neeli authored
Adds clock support to the Xilinx GPIO driver. Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-4-git-send-email-srinivas.neeli@xilinx.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Srinivas Neeli authored
Specify clock property in binding. Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-3-git-send-email-srinivas.neeli@xilinx.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Srinivas Neeli authored
Arrange header files in sorted order. Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-2-git-send-email-srinivas.neeli@xilinx.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
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 authored
Linux 5.10-rc4
-
- 16 Nov, 2020 20 commits
-
-
Andy Shevchenko authored
Make Intel GPIO tree official for GPIO ACPI work. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
We may use BIT() macro to increase readability in acpi_gpio_adr_space_handler(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
As specified by ACPI the pin index is 16-bit unsigned integer. Define the variable, which holds it, accordingly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
GpioInt() implies input configuration of the pin. Add this to the acpi_gpio_to_gpiod_flags() and make usable for GpioInt(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Vasile-Laurentiu Stanimir authored
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: Vasile-Laurentiu Stanimir <vasile-laurentiu.stanimir@windriver.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
Move acpi_gpio_to_gpiod_flags() upper in the code to allow further refactoring. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
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: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
We didn't take into account the debounce settings supplied by ACPI. This change is targeting the mentioned gap. Reported-by: Coiby Xu <coiby.xu@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
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: Jamie McClymont <jamie@kwiius.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
-
Andy Shevchenko authored
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
Move bias related code from gpio_set_config() to gpio_set_bias(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
Instead of open coded macro use, call pinconf_to_config_packed(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
It's no difference in the functionality, but after the change the code is less error prone to various checkers. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
Replace unsigned by unsigned int in GPIO library code. Note, legacy API left untouched. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-
Andy Shevchenko authored
intel-pinctrl for v5.10-2 * Respect bias setting when comes from ACPI The following is an automated git shortlog grouped by driver: intel: - Set default bias in case no particular value given - Fix 2 kOhm bias which is 833 Ohm
-
Linus Torvalds authored
-
- 15 Nov, 2020 2 commits
-
-
git://anongit.freedesktop.org/drm/drmLinus Torvalds authored
Pull drm fixes from Dave Airlie: "Nouveau fixes: - atomic modesetting regression fix - ttm pre-nv50 fix - connector NULL ptr deref fix" * tag 'drm-fixes-2020-11-16' of git://anongit.freedesktop.org/drm/drm: drm/nouveau/kms/nv50-: Use atomic encoder callbacks everywhere drm/nouveau/ttm: avoid using nouveau_drm.ttm.type_vram prior to nv50 drm/nouveau/kms: Fix NULL pointer dereference in nouveau_connector_detect_depth
-
git://github.com/skeggsb/linuxDave Airlie authored
- atomic modesetting regression fix - ttm pre-nv50 fix - connector NULL ptr deref fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Ben Skeggs <skeggsb@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv5D9p78MNN0OxVeRZxN8LDqcadJEGUEFCgWJQ6+_rjPuw@mail.gmail.com
-