1
0
Fork 0
Commit Graph

796708 Commits (f0df462f3ae1d10131f8ff7daa016ce1a8686727)

Author SHA1 Message Date
Uwe Kleine-König f0df462f3a gpio: mxs: read pin level directly instead of using .get
Calling readl directly instead of going through another function that
results in the same result to remove some overhead. I didn't try to
measure the performance gain, but IMHO there is little benefit from
abstracting a GPIO register access in the GPIO driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-21 11:29:57 +01:00
Tao Ren 533918b6f6 gpio: aspeed: remove duplicated statement
Remove duplicated assignment statement from aspeed_gpio_probe() function.

Signed-off-by: Tao Ren <taoren@fb.com>
Acked-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-21 11:14:11 +01:00
Andrei.Stefanescu@microchip.com fb0b35d307 gpio: add driver for SAMA5D2 PIOBU pins
PIOBU pins do not lose their voltage during Backup/Self-refresh.
This patch adds a simple GPIO controller for them and a
maintainer for the driver.

This driver adds support for using the pins as GPIO
offering the possibility to read/set the voltage.

Signed-off-by: Andrei Stefanescu <andrei.stefanescu@microchip.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-21 10:55:57 +01:00
Andrei.Stefanescu@microchip.com 6bd925a8b7 dt-bindings: arm: atmel: describe SECUMOD usage as a GPIO controller
This patch describes the Security Module's usage as a GPIO
controller for its PIOBU pins. These pins have the special
property of maintaining their voltage during suspend-to-mem.

Signed-off-by: Andrei Stefanescu <andrei.stefanescu@microchip.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-21 10:54:33 +01:00
Linus Walleij 89a5e15bcb gpio/mmc/of: Respect polarity in the device tree
The device tree bindings for the MMC card detect and
write protect lines specify that these should be active
low unless "cd-inverted" or "wp-inverted" has been
specified.

However that is not how the kernel code has worked. It
has always respected the flags passed to the phandle in
the device tree, but respected the "cd-inverted" and
"wp-inverted" flags such that if those are set, the
polarity will be the inverse of that specified in the
device tree.

Switch to behaving like the old code did and fix the
regression.

Fixes: 81c85ec15a ("gpio: OF: Parse MMC-specific CD and WP properties")
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-17 23:31:07 +01:00
Fabrizio Castro 12d6dd0698 dt-bindings: gpio: rcar: Add r8a774c0 (RZ/G2E) support
Document Renesas' RZ/G2E (R8A774C0) GPIO blocks compatibility within the
relevant dt-bindings.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-17 23:06:27 +01:00
Linus Walleij a0752e9c30 memory: omap-gpmc: Get the header of the enum
Commit 21abf10381
("gpio: Pass a flag to gpiochip_request_own_desc()")
started to pass an enum gpiod_flags but this file is
not including the header file that defines that enum
and the compiler spits:

drivers/memory/omap-gpmc.c: In function
			    'gpmc_probe_generic_child':
drivers/memory/omap-gpmc.c:2174:9: error: type of formal
				   parameter 4 is incomplete
         0);
         ^

Cc: Ladislav Michl <ladis@linux-mips.org>
Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 21abf10381 ("gpio: Pass a flag to gpiochip_request_own_desc()")
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-17 23:06:16 +01:00
Linus Walleij d6543c0f39 ARM: omap1: Fix new user of gpiochip_request_own_desc()
This fixes up a new user of gpiochip_request_own_desc() in
the AMS Delta board that appeared after the patch that was
applied recently.

Fixes: 21abf10381 ("gpio: Pass a flag to gpiochip_request_own_desc()")
Reviewed-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-17 23:05:41 +01:00
Marek Vasut 4bc16f9dd7 gpio: pca953x: Add regmap dependency for PCA953x driver
Select REGMAP_I2C in Kconfig, since the driver now depends on regmap
and this was missing, thus breaking build on various systems.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-17 15:28:37 +01:00
Nicolas Saenz Julienne 85af74c474 gpio: raspberrypi-exp: decrease refcount on firmware dt node
We're getting a reference RPi's firmware node in order to be able to
communicate with it's driver. We should decrease the reference count on
the dt node after being done with it.

Fixes: a98d90e7d5 ("gpio: raspberrypi-exp: Driver for RPi3 GPIO expander via mailbox service")
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-17 15:28:30 +01:00
Linus Walleij 3e42f200c1 Merge branch 'ib-pca953x' into devel 2018-12-14 22:51:05 +01:00
Krzysztof Kozlowski c5510b8daf gpiolib: Fix return value of gpio_to_desc() stub if !GPIOLIB
If CONFIG_GPOILIB is not set, the stub of gpio_to_desc() should return
the same type of error as regular version: NULL.  All the callers
compare the return value of gpio_to_desc() against NULL, so returned
ERR_PTR would be treated as non-error case leading to dereferencing of
error value.

Fixes: 79a9becda8 ("gpiolib: export descriptor-based GPIO interface")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 16:06:24 +01:00
Marek Vasut b765743005 gpio: pca953x: Restore registers after suspend/resume cycle
It is possible that the PCA953x is powered down during suspend.
Use regmap cache to assure the registers in the PCA953x are in
line with the driver state after resume.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:19:26 +01:00
Marek Vasut 87813cf30a gpio: pca953x: Zap single use of pca953x_read_single()
Drop pca953x_write_single() which is used in one place.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:19:23 +01:00
Marek Vasut ec82d1eba3 gpio: pca953x: Zap ad-hoc reg_output cache
Replace the ad-hoc reg_output output register caching with generic
regcache cache. Drop pca953x_write_single() which is no longer used.
This reduces code duplication.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:19:19 +01:00
Marek Vasut 0f25fda840 gpio: pca953x: Zap ad-hoc reg_direction cache
Replace the ad-hoc reg_direction direction register caching with generic
regcache cache. This reduces code duplication.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:19:15 +01:00
Marek Vasut 4942723276 gpio: pca953x: Perform basic regmap conversion
Convert the driver to use regmap to access the chips. Due to the convoluted
register mapping scheme, implement read/write/volatile check functions that
untangle the mess and perform check accordingly. This patch does not zap the
internal register cache of the PCA953x driver, nor does it push the regmap
access down into the gpiochip accessors to simplify the review. All that is
in subsequent patches.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:19:11 +01:00
Marek Vasut b32cecb46b gpio: pca953x: Extract the register address mangling to single function
Instead of having the I2C register calculation function spread across
multiple accessor functions, pull it out into a single function which
returns the adjusted register address.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:19:07 +01:00
Marek Vasut 25a1b7102f gpio: pca953x: Zap ad-hoc I2C block write in multi GPIO set
The ad-hoc i2c block write can be replaced by standard register accessor
function, which correctly handles all the chip details and differences.
Do so to simplify the code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:19:05 +01:00
Marek Vasut 7a04aaa32c gpio: pca953x: Factor out common code from device_pca95xx_init()
The PCA957x and PCA953x init functions are almost the same, except for
the different register mapping and one extra write to BKEN register in
case of PCA957x. Factor out the common code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:19:03 +01:00
Marek Vasut 90adb09799 gpio: pca953x: Unify pca953x_{read,write}_regs_{8,mul}()
At this point, the pca953x_{read,write}_regs_mul() can read single bank
PCA953x GPIO chips as well. Merge the _8 and _mul functions together to
simplify the code a bit.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:19:00 +01:00
Marek Vasut 49e713738f gpio: pca953x: Unify pca953x_{read,write}_regs_{16,24}()
At this point, these two functions only differ in whether they do or do not
set the address increment bit. The 16 GPIO case does not need to set the AI
bit, except for PCA9575 on write, while the 24 GPIO and more case does set
the AI bit always. Merge these two functions together to simplify the code
a bit.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:18:57 +01:00
Marek Vasut 028a219ae5 gpio: pca953x: Unify pca95{3,7}x_write_regs_16()
At this point, these two functions only differ in whether they do or do not
set the address increment bit on PCA9575. Merge these two functions together
to simplify the code a bit.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:18:53 +01:00
Marek Vasut 8958262af3 gpio: pca953x: Repair multi-byte IO address increment on PCA9575
The multi-byte IO on various pca953x chips requires the auto-increment bit,
while other chips toggle the LSbit automatically. Note that LSbit toggling
only alternates between two registers during the IO, it is not the same as
address auto-increment. The driver currently assumes that #gpios > 16 implies
auto-increment, while #gpios <= 16 implies LSbit toggling. This is incorrect
at there are chips with 16 GPIOs which require the auto-increment bit.

The PCA9575, according to NXP datasheet rev. 4.2 from 16 April 2015, section
7.3 Command Register, the bit 7 in command register is the auto-increment
bit, which allows programming multiple registers sequentially.

Set this bit both in pca953x_gpio_set_multiple(), where it fixes the multi
register programming, and in pca957x_write_regs_16(), where is simplifies
the function. In fact, the pca957x_write_regs_16() now looks rather similar
to pca953x_write_regs_24() and pca953x_write_regs_16(), which is intended
for subsequent patches.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:18:50 +01:00
Marek Vasut 92f45ebe68 gpio: pca953x: Fix AI overflow on PCAL6524
The PCAL_PINCTRL_MASK is too large. The extended register block on
PCAL6524, which is the largest chip with this block, has the block
limited to address range 0x40..0x7f. This is because the bit 7 in
the command register is used for the Address Increment functionality.

Trim the mask to 0x60 to match the datasheet and to prevent accidental
overwrite of the AI bit.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:18:47 +01:00
Marek Vasut 873d1e8e6f gpio: pca953x: Deduplicate the bank_shift
The bank_shift = fls(...) code was duplicated in the driver 5 times,
pull it into separate function.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 15:18:42 +01:00
Thierry Reding 3a2fa906c0 gpio: tegra186: Rename flow variable to type
The IRQ core code refers to the interrupt type by that name, whereas the
term flow is almost never used. Some GPIO controllers use the term
flow_type, but it is most consistent to just go with the IRQ core
terminology.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 14:34:10 +01:00
Linus Walleij 493872e074 intel-gpio for v4.21-1
Use managed resource allocation in pch and sodaville drivers.
 Switch to use for_each_set_bit() in IRQ handlers.
 Headers clean up.
 Sort headers in inclusion block alphabetically for better maintenance.
 Convert to SPDX identifier and fixing MODULE_LICENSE() when appropriate.
 Additional format fixes to rectify debug and message printing.
 
 There is a commit which had been applied to v4.20-rc4, that's why dup.
 
 - c3bc3ff9e8 MAINTAINERS: Do maintain Intel GPIO drivers via separate tree
 
 The following is an automated git shortlog grouped by driver:
 
 ich:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
  -  Join string literals back
  -  Convert pr_<level> to dev_<level>
  -  Switch to use struct device instead of platform_device
  -  Simplify error handling in ichx_write_bit()
 
 intel-mid:
  -  Convert to use SPDX identifier
  -  Remove linux/module.h and sort headers
 
 lynxpoint:
  -  Convert to use SPDX identifier
  -  Remove linux/init.h and sort headers
  -  Use for_each_set_bit() in IRQ handler
 
 MAINTAINERS:
  -  Do maintain Intel GPIO drivers via separate tree
 
 merrifield:
  -  Convert to use SPDX identifier
  -  Remove linux/init.h
 
 pch:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
  -  Remove duplicate assignments
  -  Remove redundant __func__ from debug print
  -  Use for_each_set_bit() in IRQ handler
  -  Convert to dev_pm_ops
  -  Convert to use managed functions pcim_* and devm_*
 
 sch:
  -  Convert to use SPDX identifier
  -  Remove linux/init.h and sort headers
 
 sodaville:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
  -  Use for_each_set_bit() in IRQ handler
  -  Convert to use managed functions pcim_* and devm_*
 -----BEGIN PGP SIGNATURE-----
 
 iQIyBAABCgAdFiEEqaflIX74DDDzMJJtb7wzTHR8rCgFAlwOvD0ACgkQb7wzTHR8
 rCjRPA/4pVGrJEdp6+C8/0l0BvQPOR41AAKPGvJ8SBhUklOhbBAnME5E/auK/iKs
 TR9NGAWQnqSh8rTIY3RJueiiEs1VZkwRqwi9gFyllhn+/yWCpdU513NU8id1Oh60
 5P43jD9QzMLoi5yT832GlojNmqeUkzBP+sS4n/AVAWX5Y0zlOXpjQ/uyBXMoYwAw
 jGGo1MC8qCzSPdanumc3WZ7Kp5xUtDWgP3NrxgkO3DPFQjeQdXMsm6jEJtonxoYh
 B5Fd7GoJGMW998M3UZFaEXIUn9rYOkxyHE2dPp8xV4YCxLYm5zaPuTGJVRU98kN7
 w0BowGNZ2t1oDbdVX88ubzoJzS4+j00e6vqet2118fpYK30hlYzjFxaldF6k8ZDp
 z+DSRVo5VdLnsd9STLasi9255t+o4gQJUVLU3G3MbCDeLQYxe/CRNXP8WfuHkIMP
 /LOIOUKk5nW0kxHWK7i9VJY/YX4vQJpEfnJKVYAbqKqnJ2loOIlfIrQxaPMIj2Tj
 5+FXtOB14A/INwSRxrzjTbjODDyDGzHw2qgGGhAP2MRv6AQtaLeLt/pEhbbykgDm
 /Grj+DY5Hsu57fhlBHQMxBCrex1gFMyRSObFmvA0+dRXNHHPDHRwEyNWJpzPDmaa
 2j2TDxgNJuXOr9Zva1ReeGYjdSo7S4YHUh11v6FpMuYvFQojHA==
 =5W0M
 -----END PGP SIGNATURE-----

Merge tag 'intel-gpio-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into devel

intel-gpio for v4.21-1

Use managed resource allocation in pch and sodaville drivers.
Switch to use for_each_set_bit() in IRQ handlers.
Headers clean up.
Sort headers in inclusion block alphabetically for better maintenance.
Convert to SPDX identifier and fixing MODULE_LICENSE() when appropriate.
Additional format fixes to rectify debug and message printing.

There is a commit which had been applied to v4.20-rc4, that's why dup.

- c3bc3ff9e8 MAINTAINERS: Do maintain Intel GPIO drivers via separate tree

The following is an automated git shortlog grouped by driver:

ich:
 -  Convert to use SPDX identifier
 -  Sort headers alphabetically
 -  Join string literals back
 -  Convert pr_<level> to dev_<level>
 -  Switch to use struct device instead of platform_device
 -  Simplify error handling in ichx_write_bit()

intel-mid:
 -  Convert to use SPDX identifier
 -  Remove linux/module.h and sort headers

lynxpoint:
 -  Convert to use SPDX identifier
 -  Remove linux/init.h and sort headers
 -  Use for_each_set_bit() in IRQ handler

MAINTAINERS:
 -  Do maintain Intel GPIO drivers via separate tree

merrifield:
 -  Convert to use SPDX identifier
 -  Remove linux/init.h

pch:
 -  Convert to use SPDX identifier
 -  Sort headers alphabetically
 -  Remove duplicate assignments
 -  Remove redundant __func__ from debug print
 -  Use for_each_set_bit() in IRQ handler
 -  Convert to dev_pm_ops
 -  Convert to use managed functions pcim_* and devm_*

sch:
 -  Convert to use SPDX identifier
 -  Remove linux/init.h and sort headers

sodaville:
 -  Convert to use SPDX identifier
 -  Sort headers alphabetically
 -  Use for_each_set_bit() in IRQ handler
 -  Convert to use managed functions pcim_* and devm_*
2018-12-14 14:27:41 +01:00
Linus Walleij 21abf10381 gpio: Pass a flag to gpiochip_request_own_desc()
Before things go out of hand, make it possible to pass
flags when requesting "own" descriptors from a gpio_chip.
This is necessary if the chip wants to request a GPIO with
active low semantics, for example.

Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Roger Quadros <rogerq@ti.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-14 14:24:33 +01:00
Vladimir Zapolskiy 67566ae474 gpio: lpc18xx: fix GPIO controller driver build as a module
The problem is reported for allmodconfig build setup:

  ERROR: "irq_chip_retrigger_hierarchy" [drivers/gpio/gpio-lpc18xx.ko] undefined!
  make[2]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
  make[1]: *** [Makefile:1271: modules] Error 2

My testing in runtime shows that it is sufficient to remove .irq_retrigger
callback, which is assigned to unexported irq_chip_retrigger_hierarchy()
function, I did't observe any regressions, and thus apparently it is a
better fix rather than exporting the function defined in kernel/irq/chip.c
(see commit 52b2a05fa7 ("genirq: Export IRQ functions for module use"))
or sticking the GPIO controller driver build to built-in option only.

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 5ddabfe8d3 ("gpio: lpc18xx: add GPIO pin interrupt controller support")
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-10 09:10:46 +01:00
Andy Shevchenko aaa2123169 gpio: sodaville: Convert to use SPDX identifier
Reduce size of duplicated comments by switching to use SPDX identifier.

No functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:08 +02:00
Andy Shevchenko cb0e9a7bda gpio: sch: Convert to use SPDX identifier
Reduce size of duplicated comments by switching to use SPDX identifier.

No functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:08 +02:00
Andy Shevchenko 9b8bf5bfb6 gpio: pch: Convert to use SPDX identifier
Reduce size of duplicated comments by switching to use SPDX identifier.

No functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:08 +02:00
Andy Shevchenko 93374b76a9 gpio: merrifield: Convert to use SPDX identifier
Reduce size of duplicated comments by switching to use SPDX identifier.

No functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:08 +02:00
Andy Shevchenko 7fa07b6f4e gpio: lynxpoint: Convert to use SPDX identifier
Reduce size of duplicated comments by switching to use SPDX identifier.

No functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:08 +02:00
Andy Shevchenko 917842f676 gpio: intel-mid: Convert to use SPDX identifier
Reduce size of duplicated comments by switching to use SPDX identifier.

No functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:07 +02:00
Andy Shevchenko 7ed0cf0afd gpio: ich: Convert to use SPDX identifier
Reduce size of duplicated comments by switching to use SPDX identifier.

No functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:07 +02:00
Andy Shevchenko 8700998ff6 gpio: sodaville: Sort headers alphabetically
Sort header block alphabetically for easy maintenance.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:07 +02:00
Andy Shevchenko 3e1884f8c3 gpio: pch: Sort headers alphabetically
Sort header block alphabetically for easy maintenance.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:07 +02:00
Andy Shevchenko 488f270cad gpio: ich: Sort headers alphabetically
Sort header block alphabetically for easy maintenance.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:07 +02:00
Andy Shevchenko 47091b0594 gpio: sch: Remove linux/init.h and sort headers
There is no need to include linux/init.h when at the same time
we include linux/module.h.

Remove redundant inclusion.

While here, sort header block alphabetically for easy maintenance.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:06 +02:00
Andy Shevchenko 7629771f5e gpio: merrifield: Remove linux/init.h
There is no need to include linux/init.h when at the same time
we include linux/module.h.

Remove redundant inclusion.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:06 +02:00
Andy Shevchenko 92c286267d gpio: lynxpoint: Remove linux/init.h and sort headers
There is no need to include linux/init.h when at the same time
we include linux/module.h.

Remove redundant inclusion.

While here, sort header block alphabetically for easy maintenance.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:06 +02:00
Andy Shevchenko ddc53c40cb gpio: intel-mid: Remove linux/module.h and sort headers
There is no need to include linux/module.h when at the same time
we include linux/init.h.

Remove redundant inclusion.

While here, remove no-op macro and sort header block alphabetically
for easy maintenance.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:06 +02:00
Andy Shevchenko a3bb44bcb3 gpio: pch: Remove duplicate assignments
There is no need to assign the same values which core does for us anyway.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:34:06 +02:00
Andy Shevchenko 0511e116b8 gpio: pch: Remove redundant __func__ from debug print
dev_dbg includes the function name & line number by default when dynamic
debugging is enabled. Hence __func__ is redundant here and removed.

Do the same for any messages in ->probe() since it doesn't make sense.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 17:33:24 +02:00
Andy Shevchenko 5f6f2b9f6d gpio: ich: Join string literals back
For easy grepping on debug purposes join string literals back in the
messages.

While here, fix spelling typo.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 16:54:16 +02:00
Andy Shevchenko c086bea543 gpio: ich: Convert pr_<level> to dev_<level>
Instead of customized pr_<level> format use unified dev_<level> output.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 16:54:16 +02:00
Andy Shevchenko ff4709b44c gpio: ich: Switch to use struct device instead of platform_device
There is no need to have a pointer to struct platform_device.
Instead, switch to use struct device one.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 16:54:16 +02:00
Andy Shevchenko c5aaa31681 gpio: ich: Simplify error handling in ichx_write_bit()
Simplify error handling in ichx_write_bit() and propagate its error code
to the caller.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07 16:54:16 +02:00