Commit graph

1106766 commits

Author SHA1 Message Date
William Breathitt Gray 3ce632fdd1 gpio: 104-idi-48: Implement and utilize register structures
Reduce magic numbers and improve code readability by implementing and
utilizing named register data structures. The 104-IDI-48 device features
an Intel 8255 compatible GPIO interface, so the i8255 GPIO module is
selected and utilized as well.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: John Hentges <jhentges@accesio.com>
Cc: Jay Dolan <jay.dolan@accesio.com>
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-20 17:44:44 +02:00
William Breathitt Gray 71b7b39725 gpio: 104-dio-48e: Implement and utilize register structures
Reduce magic numbers and improve code readability by implementing and
utilizing named register data structures. The 104-DIO-48E device
features an Intel 8255 compatible GPIO interface, so the i8255 GPIO
module is selected and utilized as well.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: John Hentges <jhentges@accesio.com>
Cc: Jay Dolan <jay.dolan@accesio.com>
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-20 17:44:40 +02:00
William Breathitt Gray fb38af4a3a gpio: i8255: Introduce the Intel 8255 interface library module
Exposes consumer library functions providing support for interfaces
compatible with the venerable Intel 8255 Programmable Peripheral
Interface (PPI).

The Intel 8255 PPI first appeared in the early 1970s, initially for the
Intel 8080 and later appearing in the original IBM-PC. The popularity of
the original Intel 8255 chip led to many subsequent variants and clones
of the interface in various chips and integrated circuits. Although
still popular, interfaces compatible with the Intel 8255 PPI are
nowdays typically found embedded in larger VLSI processing chips and
FPGA components rather than as discrete ICs.

A CONFIG_GPIO_I8255 Kconfig option is introduced by this patch. Modules
wanting access to these i8255 library functions should select this
Kconfig option, and import the I8255 symbol namespace.

Tested-by: Fred Eckert <Frede@cmslaser.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: John Hentges <jhentges@accesio.com>
Cc: Jay Dolan <jay.dolan@accesio.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-20 17:44:36 +02:00
William Breathitt Gray cc442e4db9 gpio: 104-idio-16: Implement and utilize register structures
Reduce magic numbers and improve code readability by implementing and
utilizing named register data structures.

Tested-by: Fred Eckert <Frede@cmslaser.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: John Hentges <jhentges@accesio.com>
Cc: Jay Dolan <jay.dolan@accesio.com>
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-20 17:44:32 +02:00
William Breathitt Gray 2c05a0f29f gpio: ws16c48: Implement and utilize register structures
Reduce magic numbers and improve code readability by implementing and
utilizing named register data structures.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Paul Demetrotion <pdemetrotion@winsystems.com>
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-20 17:44:04 +02:00
Thomas Bogendoerfer c4371c5639 gpio: remove VR41XX related gpio driver
Commit d3164e2f3b ("MIPS: Remove VR41xx support") removed support
for MIPS VR41xx platform, so remove exclusive drivers for this
platform, too.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 11:27:06 +02:00
Nuno Sá d042656a21 dt-bindings: gpio: add pull-disable flag
This extends the flags that can be used in GPIO specifiers to indicate
that no bias is intended in the pin.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:24:17 +02:00
Nuno Sá 6fd03f0248 gpiolib: acpi: support bias pull disable
On top of looking at PULL_UP and PULL_DOWN flags, also look at
PULL_DISABLE and set the appropriate GPIO flag. The GPIO core will then
pass down this to controllers that support it.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:24:10 +02:00
Nuno Sá 31bea23119 gpiolib: of: support bias pull disable
On top of looking at PULL_UP and PULL_DOWN flags, also look at
PULL_DISABLE and set the appropriate GPIO flag. The GPIO core will then
pass down this to controllers that support it.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:24:01 +02:00
Nuno Sá c269df8c5a gpiolib: add support for bias pull disable
This change prepares the gpio core to look at firmware flags and set
'FLAG_BIAS_DISABLE' if necessary. It works in similar way to
'GPIO_PULL_DOWN' and 'GPIO_PULL_UP'.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:23:54 +02:00
Andy Shevchenko 28ba057456 gpio: 74xx-mmio: use bits.h macros for all masks
Make use of the GENMASK() (far less error-prone, far more concise).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:14:49 +02:00
Andy Shevchenko d3054ba1db gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()
It's logically better to check the IN in ->direction_input() and
_OUT in ->direction_output().

While at it, replace ternary with plain if-conditional for the sake
of consistency with mmio_74xx_dir_out().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:14:37 +02:00
Andy Shevchenko 10fcd2f180 gpio: 74xx-mmio: Make use of device properties
Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.

Add mod_devicetable.h include.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:14:29 +02:00
Kent Gibson 272ddba004 gpiolib: cdev: compile out HTE unless CONFIG_HTE selected
The majority of builds do not include HTE, so compile out hte
functionality unless CONFIG_HTE is selected.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:02:46 +02:00
Kent Gibson b1a92e9456 gpiolib: cdev: consolidate edge detector configuration flags
Combine the polarity_change flag, struct line eflags, and hte enable
flag into a single flag variable.

The combination of these flags describes the configuration state
of the edge detector, so formalize and clarify that by combining
them into a single variable, edflags, in struct line.

The edflags is a subset of the GPIO_V2_LINE_FLAGsb relevant to
the edge detector, and is also a superset of the eflags it replaces.
The eflags name is still used to describe the subset of edflags
corresponding to the rising/falling edge flags where edflags is
masked down to that subset.

This consolidation reduces the number of variables being passed,
simplifies state comparisons, and provides a more extensible
foundation should additional edge sources be integrated in the
future.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:02:12 +02:00
Kent Gibson 242202329f gpiolib: cdev: simplify line event identification
Reorganise line event identification code to reduce code duplication,
and replace if-else initializers with a helper function to improve
readability.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2022-07-19 10:01:25 +02:00
Kent Gibson cfa53463ac gpiolib: cdev: replace if-else chains with switches
Improve readability by replacing if-else chains with switch
statements.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:01:25 +02:00
Kent Gibson 2487a81223 gpiolib: cdev: simplify parameter in call to hte_edge_setup
Improve readability by using the GPIO_V2_LINE_FLAG_EDGE_BOTH instead
of combining the rising and falling edge flags.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Dipen Patel <dipenp@nvidia.com>
Tested-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:01:25 +02:00
Kent Gibson 160d6e4029 gpiolib: cdev: simplify linereq_free
The edge detector is only ever started after the line desc has been
determined, so move edge_detector_stop() inside the line desc check,
and merge the two checked regions into one.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 10:01:22 +02:00
Aakash Sen Sharma 3e2d53b273 gpio: 104-idi-48: unsigned to unsigned int cleanup
Remove checkpatch warnings. No functional changes.

Signed-off-by: Aakash Sen Sharma <aakashsensharma@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:41 +02:00
Geert Uytterhoeven b06d7b458a gpio: GPIO_SAMA5D2_PIOBU should depend on ARCH_AT91
The SAMA5D2 PIOBU is only present on some AT91/Microchip SoCs.  Hence
add a dependency on ARCH_AT91, to prevent asking the user about this
driver when configuring a kernel without AT91/Microchip SoC support.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:41 +02:00
Liang He 5d07a692f9 gpio: gpiolib-of: Fix refcount bugs in of_mm_gpiochip_add_data()
We should use of_node_get() when a new reference of device_node
is created. It is noted that the old reference stored in
'mm_gc->gc.of_node' should also be decreased.

This patch is based on the fact that there is a call site in function
'qe_add_gpiochips()' of src file 'drivers\soc\fsl\qe\gpio.c'. In this
function, of_mm_gpiochip_add_data() is contained in an iteration of
for_each_compatible_node() which will automatically increase and
decrease the refcount. So we need additional of_node_get() for the
reference escape in of_mm_gpiochip_add_data().

Fixes: a19e3da5bc ("of/gpio: Kill of_gpio_chip and add members directly to gpio_chip")
Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:41 +02:00
Aparna M 6b7e8c796d dt-bindings: gpio: Convert TI TPIC2810 GPIO Controller bindings to YAML
Convert gpio-tpic2810 bindings to yaml format and remove outdated
bindings in .txt format.

Signed-off-by: Aparna M <a-m1@ti.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:40 +02:00
Shinyzenith 13e024b66c gpio: lp3943: unsigned to unsigned int cleanup
Getting rid of checkpatch findings. No functional changes.

Signed-off-by: Shinyzenith <aakashsensharma@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:40 +02:00
Bartosz Golaszewski 90ce2f01e7 intel-gpio for v5.20-1
* Clean up the GPIO driver of Intel EG20 PCH
 
 The following is an automated git shortlog grouped by driver:
 
 pch:
  -  Change PCI device macros
  -  Use dev_err_probe()
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSu93Raj3rZDNXzGZv7cr9lmVa5zAUCYsiZVAAKCRD7cr9lmVa5
 zGNfAQDIAbAkO4eJKxX/dnWzA1v3I48hzWWU8Gs6wLQFCQ80GAEAtoGSpKMkhgCE
 SFYpnRicJHxOewjvCiL/61p8Vc38sgs=
 =skec
 -----END PGP SIGNATURE-----

Merge tag 'intel-gpio-v5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into TEST_MERGE

intel-gpio for v5.20-1

* Clean up the GPIO driver of Intel EG20 PCH

The following is an automated git shortlog grouped by driver:

pch:
 -  Change PCI device macros
 -  Use dev_err_probe()
2022-07-19 09:57:25 +02:00
Andy Shevchenko 597a8a888d gpiolib: of: Use device_match_of_node() helper
Instead of open coding, use device_match_of_node() helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:13 +02:00
Andy Shevchenko 6169d76c56 gpio: adp5588: sort header inclusion alphabetically
Sort header inclusion alphabetically.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:13 +02:00
Andy Shevchenko 669f5618fe gpio: adp5588: Do not use defined value for driver name and compatible
It's wrong to use defined string literal for three semantically different
cases, i.e.:
1) compatible string, which is part of ABI and has to have specific format;
2) I2C ID, which is user space visible and also ABI;
3) driver name, that can be changed.

Drop the define and use appropriate string literals in place.

While at it, drop comma at terminator entry of OF ID table.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:13 +02:00
Andy Shevchenko 4a40ccccb6 gpio: adp5588: Switch from of headers to mod_devicetable.h
There is nothing directly using of specific interfaces in this driver,
so lets not include the headers.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:13 +02:00
Jianqun Xu cc165ba48a gpio: rockchip: add support for rk3588
Add V2.1 rockchip gpio controller type, which is part of the
RK3588 SoC.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
2022-07-19 09:57:13 +02:00
Sebastian Reichel 036e9cf356 dt-bindings: gpio: rockchip: add gpio-ranges
Allow usage of gpio-ranges with the rockchip gpio controller. The driver
already had support for this since it has been added to the mainline kernel
in the first place.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:13 +02:00
Andy Shevchenko 8773bacefc gpio: adnp: Make use of device properties
Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:13 +02:00
Andy Shevchenko a2a15e1263 gpio: adnp: use simple i2c probe function
The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:13 +02:00
Lucas Stach d274f02eb9 gpio: pca9570: add pca9571 support
The PCA9571 very similar to the PCA9570, it only differs in the
number of GPIOs.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:13 +02:00
Lucas Stach 91e9111bdd gpio: pca9570: Add DT bindings for NXP PCA9571
This patch adds device tree bindings for the NXP PCA9571,
a 8-bit I2C GPIO expander.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:13 +02:00
Uwe Kleine-König 3d57fa2a22 gpio: xgs-iproc: Drop if with an always false condition
The remove callback is only called after probe completed successfully.
In this case platform_set_drvdata() was called with a non-NULL argument
and so chip is never NULL.

Also note that returning an error code from a remove callback doesn't
result in the device staying bound. It's still removed and devm
callbacks are called.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:57:13 +02:00
Uwe Kleine-König 1923433cd6 gpio: brcmstb: Make .remove() obviously always return 0
priv cannot be NULL because brcmstb_gpio_probe() calls
platform_set_drvdata() with a non-NULL argument, so the check for !priv can
be dropped.

Also remove the variable ret that is only used to hide a bit that in the
end zero is returned.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:56:51 +02:00
Uwe Kleine-König 7e55b33d3f gpio: ucb1400: Remove platform setup and teardown support
There is no user of these callbacks. The motivation for this change is
to stop returning an error code from the remove callback.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:56:51 +02:00
Uwe Kleine-König 421e3c16c3 gpio: twl4030: Don't return an error after WARN in .remove
Returning a non-zero value in a platform driver's remove callback only
results in an error message ("remove callback returned a non-zero value.
This will be ignored.", see platform_remove()), and then the device is
removed anyhow.

As there was just a WARN_ON triggered, return 0 to drop the follow up
warning. The latter output is hardly relevant after the big WARN splat.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:56:51 +02:00
Uwe Kleine-König 2a1192ff08 gpio: twl4030: Drop platform teardown callback
There is no machine providing a teardown callback, so drop the unused
code.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:56:51 +02:00
Geert Uytterhoeven 31212be403 dt-bindings: gpio: renesas,rcar-gpio: R-Car V3U is R-Car Gen4
Despite the name, R-Car V3U is the first member of the R-Car Gen4
family.  Hence move its compatible value to the R-Car Gen4 section.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:56:51 +02:00
Devarsh Thakkar 0651a73092 gpio: davinci: Add support for system suspend/resume PM
Add support for system suspend/resume PM hooks, save the
register context of all the required gpio registers on suspend
and restore context on the resume.

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:56:51 +02:00
Chris Packham df08a6fc0d dt-bindings: gpio: gpio-mvebu: document offset and marvell,pwm-offset
The offset and marvell,pwm-offset properties weren't in the old binding.
Add them based on the existing usage in the driver and board DTS when
the marvell,armada-8k-gpio compatible is used.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:56:34 +02:00
Chris Packham 988c8c0cd0 dt-bindings: gpio: gpio-mvebu: deprecate armadaxp-gpio
Commit 5f79c651e8 ("arm: mvebu: use global interrupts for GPIOs on
Armada XP") the marvell,armadaxp-gpio compatible obsolete.

The driver code still exists to handle the armadaxp behaviour but all
the in-tree boards use the marvell,armada-370-gpio.  Document the
marvell,armadaxp-gpio compatible as deprecated.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:56:34 +02:00
Chris Packham 1282157a6c dt-bindings: gpio: gpio-mvebu: convert txt binding to DT schema format
Convert the existing device tree binding to DT schema format.

The old binding listed the interrupt-controller and related properties
as required but there are sufficiently many existing usages without it
that the YAML binding does not make the interrupt properties required.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:56:34 +02:00
Andy Shevchenko 2b038e786f gpiolib: devres: Get rid of unused devm_gpio_free()
The last user, which in fact was a dead code, has gone a year ago,
previous one 3 years ago. On top of that we want to drop away the
legacy GPIO APIs in the kernel, so take a chance to get rid of
unused devm_gpio_free() and accompanying stuff.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:56:34 +02:00
Linus Torvalds ff6992735a Linux 5.19-rc7 2022-07-17 13:30:22 -07:00
Linus Torvalds 55ea9bd666 - Fix 32b build
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEbSBwaO7dZQkcLOKj+mJfZA7rE8oFAmLUW6QACgkQ+mJfZA7r
 E8pH9AgAkHYOvKyFkKYp1lQhMJogJY6iHF4hsUgkv2/8u/s3hM7pFiAGd44f3JbZ
 Tp/zxi6Tha78KBPbtgE3J+Jc6/UN08Qpc6kpv3nNMzYm6v/ZlBEQgHJzwPqfxHQn
 LzCPsYNXnEWpSfeXnTXlNdyfcrVR27lhuBjhvCE3v6WrTmhHeEjratCzEyZNBfv7
 goT0TWMHN10HoYTkC60y4fPbcqrv406ASIT5x5N1Kwfe5v4bHMBRlGDfEhPiU2Wm
 92eimXsHyyvAlXXyeyyIjX7rG09LTBkex7Vdt6IZbCeENSe2Ob6q/mmouIuGcd1T
 WABxaEs8bgys87lgESr8BcZaJyGKPQ==
 =kdxv
 -----END PGP SIGNATURE-----

Merge tag 'drm-intel-fixes-2022-07-17' of git://anongit.freedesktop.org/drm/drm-intel

Pull intel drm build fix from Rodrigo Vivi:
 "Our 'dim' flow has a problem with fixes of fixes getting missed. We
  need to take a look on that later.

  Meanwhile, please allow me to quickly propagate this fix for the
  32-bit build issue here upstream"

* tag 'drm-intel-fixes-2022-07-17' of git://anongit.freedesktop.org/drm/drm-intel:
  drm/i915/ttm: fix 32b build
2022-07-17 13:08:03 -07:00
Linus Torvalds f7f4da303d perf tools fixes for v5.19: 4th batch
- Fix SIGSEGV when processing syscall args in perf.data files in 'perf trace'.
 
 - Sync kvm, msr-index and cpufeatures headers with the kernel sources.
 
 - Fix 'convert perf time to TSC' 'perf test':
 
    - No need to open events twice.
    - Fix finding correct event on hybrid systems.
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHQEABYKAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCYtQvSAAKCRCyPKLppCJ+
 J1RLAQCX7wriY00kluSNoeCxk1I9r9F64AJXPsRV/vE/j+Xc1gD4rA+l5QYG6Ja/
 ICUXmTbaOjsUhAMNY+aw+1bwuRUxAA==
 =El3Z
 -----END PGP SIGNATURE-----

Merge tag 'perf-tools-fixes-for-v5.19-2022-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fix SIGSEGV when processing syscall args in perf.data files in 'perf
   trace'

 - Sync kvm, msr-index and cpufeatures headers with the kernel sources

 - Fix 'convert perf time to TSC' 'perf test':
     - No need to open events twice
     - Fix finding correct event on hybrid systems

* tag 'perf-tools-fixes-for-v5.19-2022-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
  perf trace: Fix SIGSEGV when processing syscall args
  perf tests: Fix Convert perf time to TSC test for hybrid
  perf tests: Stop Convert perf time to TSC test opening events twice
  tools arch x86: Sync the msr-index.h copy with the kernel sources
  tools headers cpufeatures: Sync with the kernel sources
  tools headers UAPI: Sync linux/kvm.h with the kernel sources
2022-07-17 12:42:57 -07:00
Matthew Auld ced7866db3 drm/i915/ttm: fix 32b build
Since segment_pages is no longer a compile time constant, it looks the
DIV_ROUND_UP(node->size, segment_pages) breaks the 32b build. Simplest
is just to use the ULL variant, but really we should need not need more
than u32 for the page alignment (also we are limited by that due to the
sg->length type), so also make it all u32.

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fixes: aff1e0b09b ("drm/i915/ttm: fix sg_table construction")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Nirmoy Das <nirmoy.das@linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220712174050.592550-1-matthew.auld@intel.com
(cherry picked from commit 9306b2b2df)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2022-07-17 14:53:47 -04:00