aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio
AgeCommit message (Collapse)AuthorFilesLines
2020-12-08drivers: gpio: bt8xx: prefer dev_err()/dev_warn() over of raw printkEnrico Weigelt, metux IT consult1-4/+4
For logging in device contexts, dev_*() functions are preferred over raw printk(), which also print out device name. Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2020-12-06gpio: Add TODO item for debugfs interfaceLinus Walleij1-0/+36
The idea to create a debugfs to replace the aging and dangerous sysfs ABI for hacking and tinkering came up on the list. Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-12-05gpio: just plain warning when nonexisting gpio requestedEnrico Weigelt1-1/+2
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: Enrico Weigelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2020-12-05gpiolib: cdev: allow edge event timestamps to be configured as REALTIMEKent Gibson2-3/+19
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: Jack Winch <[email protected]> Signed-off-by: Kent Gibson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2020-12-05gpio: msc313: MStar MSC313 GPIO driverDaniel Palmer3-0/+472
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2020-12-04gpio: mxs: Remove unused .id_table supportFabio Estevam1-14/+0
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2020-12-04gpio: tegra186: Set affinity callback to parentLinus Walleij1-0/+11
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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Vidya Sagar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-12-04gpio: sifive: Set affinity callback to parentLinus Walleij1-0/+11
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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Cc: Yash Shah <[email protected]> Cc: Wesley W. Terpstra <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-12-04gpio: sysfs: Enforce character deviceLinus Walleij1-1/+2
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-12-02gpio: mvebu: switch pwm duration registers to regmapBaruch Siach1-32/+36
Commit 2233bf7a92e ("gpio: mvebu: switch to regmap for register access") changed most readl/writel registers access calls to the regmap API in preparation for Armada 7K/8K support. PWM duration registers were left using readl/writel, as the driver does not support PWM for Armada 7K/8K. Switch PWM duration registers to regmap as first step in adding Armada 7K/8K PWM functionality support. Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Baruch Siach <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-12-02gpio: mvebu: update Armada XP per-CPU commentBaruch Siach1-2/+1
Commit 2233bf7a92e ("gpio: mvebu: switch to regmap for register access") introduced percpu_regs to replace percpu_membase. Update the comment to match. Cc: Thomas Petazzoni <[email protected]> Fixes: 2233bf7a92e7 ("gpio: mvebu: switch to regmap for register access") Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Baruch Siach <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-12-02gpio: mvebu: fix potential user-after-free on probeBaruch Siach1-5/+11
When mvebu_pwm_probe() fails IRQ domain is not released. Move pwm probe before IRQ domain allocation. Add pwm cleanup code to the failure path. Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support") Reported-by: Andrew Lunn <[email protected]> Signed-off-by: Baruch Siach <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-12-02gpio: zynq: fix reference leak in zynq_gpio functionsQinglang Miao1-2/+2
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in a reference leak here. A new function pm_runtime_resume_and_get is introduced in [0] to keep usage counter balanced. So We fix the reference leak by replacing it with new funtion. [0] dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") Fixes: c2df3de0d07e ("gpio: zynq: properly support runtime PM for GPIO used as interrupts") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-12-02gpiolib: Don't free if pin ranges are not definedEdmond Chung1-0/+5
A similar check was added in gpiochip_generic_request, but not in free. This has caused an imbalance count of request vs. free calls to the pinctrl driver. This patch is targeted to fix that issue. Fixes: 2ab73c6d8323 ("gpio: Support GPIO controllers without pin-ranges") Signed-off-by: Edmond Chung <[email protected]> Signed-off-by: Andrew Chant <[email protected]> Signed-off-by: Will McVicker <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-12-02gpio: dwapb: fix NULL pointer dereference at dwapb_gpio_suspend()Luo Jiaxing1-0/+2
Following Calltrace is found when running echo freeze > /sys/power/state. [ 272.755506] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 [ 272.755585] Call trace: [ 272.755587] dwapb_gpio_suspend+0x18/0x318 [ 272.755588] pm_generic_suspend+0x2c/0x48 [ 272.755595] acpi_subsys_suspend+0x60/0x70 [ 272.755599] dpm_run_callback.isra.18+0x40/0xe0 [ 272.755601] __device_suspend+0xf4/0x360 The reason is platform_set_drvdata() is deleted, and dwapb_gpio_suspend() get *gpio by dev_get_drvdata(). Fixes: feeaefd378ca ("gpio: dwapb: Use resource managed GPIO-chip add data method") Signed-off-by: Luo Jiaxing <[email protected]> Acked-by: Serge Semin <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-12-02gpio: arizona: disable pm_runtime in case of failureZheng Liang1-0/+1
pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced. Fixes:27a49ed17e224(gpio: arizona: Add support for GPIOs that) Reported-by: Hulk Robot <[email protected]> Signed-off-by: Zheng Liang <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-12-01gpiolib: do not print err message for EPROBE_DEFERGrygorii Strashko1-3/+5
The gpiochip may have dependencies from pinmux and so got deferred. Now it will print error message every time -EPROBE_DEFER is returned which is unnecessary: "gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517" Hence, do suppress error message for -EPROBE_DEFER case. Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-12-01gpio: ath79: Fix fall-through warning for ClangGustavo A. R. Silva1-0/+1
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough pseudo-keyword to indicate that the code is intended to fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-12-01gpiolib: acpi: Fix fall-through warnings for ClangGustavo A. R. Silva1-0/+1
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-11-30gpio: omap: handle deferred probe with dev_err_probe() for gpiochip_add_data()Grygorii Strashko1-5/+2
The gpiochip_add_data() may return -EPROBE_DEFER which is not handled properly by TI GPIO driver and causes unnecessary boot log messages. Hence, add proper deferred probe handling with new dev_err_probe() API. Signed-off-by: Grygorii Strashko <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-11-30gpio: xra1403: remove unneeded spi_set_drvdata()Alexandru Ardelean1-9/+1
There is no matching spi_get_drvdata() call in the driver, so there is no need to do spi_set_drvdata(). This looks like it probably was copied from a driver that used both spi_set_drvdata() & spi_get_drvdata(). Signed-off-by: Alexandru Ardelean <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-11-30gpio: dwapb: Remove unnecessary error messageDamien Le Moal1-4/+3
In dwapb_get_reset(), if devm_reset_control_get_optional_shared() fails, an error message is printed even if the failure is the benign EPROBE_DEFER error due to the reset controller not yet being initialized. Use dev_err_probe() to handle devm_reset_control_get_optional_shared() errors to avoid unnecessarilly printing an error message for the deferred probe error. Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-11-25gpio: exar: use devm action for freeing the IDA and drop remove()Bartosz Golaszewski1-15/+12
We can simplify the error path in probe() and drop remove() entirely if we provide a devm action for freeing the device ID. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
2020-11-25gpio: exar: switch to using regmapBartosz Golaszewski2-54/+38
We can simplify the code in gpio-exar by using regmap. This allows us to drop the mutex (regmap provides its own locking) and we can also reuse regmap's bit operations instead of implementing our own update function. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
2020-11-25gpio: exar: unduplicate address and offset computationBartosz Golaszewski1-12/+28
Provide and use helpers for calculating the register address and bit offset instead of hand coding it in every function. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
2020-11-25gpio: exar: use a helper variable for &pdev->devBartosz Golaszewski1-8/+7
It's more elegant to use a helper local variable to store the address of the underlying struct device than to dereference pdev everywhere. It also has the benefit of avoiding unnecessary line breaks. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
2020-11-25gpio: exar: switch to a simpler IDA interfaceBartosz Golaszewski1-3/+3
We don't need to specify any ranges when allocating IDs so we can switch to ida_alloc() and ida_free() instead of the ida_simple_ counterparts. ida_simple_get(ida, 0, 0, gfp) is equivalent to ida_alloc_range(ida, 0, UINT_MAX, gfp) which is equivalent to ida_alloc(ida, gfp). Note: IDR will never actually allocate an ID larger than INT_MAX. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
2020-11-25gpio: exar: include idr.hBartosz Golaszewski1-0/+1
This driver uses IDA APIs but doesn't include the relevant header. This fixes it. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
2020-11-25gpio: exar: add a newline after the copyright noticeBartosz Golaszewski1-0/+1
It's customary to have a newline between the copyright header and the includes. Add one to gpio-exar. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
2020-11-19gpio: tps65910: use regmap accessorsMichał Mirosław1-6/+6
Use regmap accessors directly for register manipulation - removing one layer of abstraction. Signed-off-by: Michał Mirosław <[email protected]> Acked-by: Bartosz Golaszewski <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2020-11-18gpio: sifive: To get gpio irq offset from device tree dataGreentime Hu1-4/+10
We can get hwirq number of the gpio by its irq_data->hwirq so that we don't need to add more macros for different platforms. This patch is tested in SiFive Unleashed board and SiFive Unmatched board. Signed-off-by: Greentime Hu <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-11-18gpio: mxc: Convert the driver to DT-onlyFabio Estevam1-80/+22
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 <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2020-11-18gpio: gpio-xilinx: Check return value of of_property_read_u32Srinivas Neeli1-3/+5
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 <[email protected]> Acked-by: Michal Simek <[email protected]> Addresses-Coverity: "check_return" Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2020-11-18gpio: gpio-xilinx: Add remove functionSrinivas Neeli1-0/+18
Added remove function support. Signed-off-by: Srinivas Neeli <[email protected]> Acked-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected] [dropped pm disable call] Signed-off-by: Linus Walleij <[email protected]>
2020-11-18gpio: gpio-xilinx: Add clock supportSrinivas Neeli1-0/+17
Adds clock support to the Xilinx GPIO driver. Signed-off-by: Srinivas Neeli <[email protected]> Acked-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2020-11-18gpio: gpio-xilinx: Arrange headers in sorting orderSrinivas Neeli1-3/+3
Arrange header files in sorted order. Signed-off-by: Srinivas Neeli <[email protected]> Acked-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2020-11-16gpiolib: acpi: Use BIT() macro to increase readabilityAndy Shevchenko1-2/+1
We may use BIT() macro to increase readability in acpi_gpio_adr_space_handler(). Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: acpi: Convert pin_index to be u16Andy Shevchenko1-5/+5
As specified by ACPI the pin index is 16-bit unsigned integer. Define the variable, which holds it, accordingly. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: acpi: Extract acpi_request_own_gpiod() helperAndy Shevchenko1-22/+24
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 <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: acpi: Make acpi_gpio_to_gpiod_flags() usable for GpioInt()Andy Shevchenko1-2/+6
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 <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: acpi: Set initial value for output pin based on bias and polarityVasile-Laurentiu Stanimir1-9/+12
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 <[email protected]> Signed-off-by: Vasile-Laurentiu Stanimir <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: acpi: Move acpi_gpio_to_gpiod_flags() upper in the codeAndy Shevchenko1-33/+33
Move acpi_gpio_to_gpiod_flags() upper in the code to allow further refactoring. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: acpi: Move non-critical code outside of critical sectionAndy Shevchenko1-2/+2
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 <[email protected]> Cc: Hans de Goede <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: acpi: Take into account debounce settingsAndy Shevchenko2-0/+20
We didn't take into account the debounce settings supplied by ACPI. This change is targeting the mentioned gap. Reported-by: Coiby Xu <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: acpi: Use named item for enum gpiod_flags variableAndy Shevchenko1-1/+1
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 <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: acpi: Respect bias settings for GpioInt() resourceAndy Shevchenko1-1/+5
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 <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: Introduce gpio_set_debounce_timeout() for internal useAndy Shevchenko2-0/+8
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 <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]>
2020-11-16gpiolib: Extract gpio_set_config_with_argument_optional() helperAndy Shevchenko1-26/+27
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 <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: move bias related code from gpio_set_config() to gpio_set_bias()Andy Shevchenko1-15/+14
Move bias related code from gpio_set_config() to gpio_set_bias(). Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
2020-11-16gpiolib: Extract gpio_set_config_with_argument() for future useAndy Shevchenko1-3/+11
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 <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>