linux-2.6-block.git
6 years agopinctrl: ti-iodelay: remove redundant unused variable dev
Colin Ian King [Tue, 31 Oct 2017 11:20:51 +0000 (11:20 +0000)]
pinctrl: ti-iodelay: remove redundant unused variable dev

The pointer dev is being assigned but is never used, hence it is
redundant and can be removed. Cleans up clang warnings:

drivers/pinctrl/ti/pinctrl-ti-iodelay.c:582:2: warning: Value stored
to 'dev' is never read
drivers/pinctrl/ti/pinctrl-ti-iodelay.c:701:2: warning: Value stored
to 'dev' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: max77620: Use common error handling code in max77620_pinconf_set()
Markus Elfring [Mon, 30 Oct 2017 13:55:52 +0000 (14:55 +0100)]
pinctrl: max77620: Use common error handling code in max77620_pinconf_set()

* Add a jump target so that a specific error message is stored only once
  at the end of this function implementation.

* Replace two calls of the function "dev_err" by goto statements.

* Adjust two condition checks.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: gemini: Implement clock skew/delay config
Linus Walleij [Sat, 28 Oct 2017 13:37:19 +0000 (15:37 +0200)]
pinctrl: gemini: Implement clock skew/delay config

This enabled pin config on the Gemini driver and implements
pin skew/delay so that the ethernet pins clocking can be
properly configured.

Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: gemini: Use generic DT parser
Linus Walleij [Sat, 28 Oct 2017 13:37:18 +0000 (15:37 +0200)]
pinctrl: gemini: Use generic DT parser

We can just use the generic Device Tree parser code
in this driver and save some code.

Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: Add skew-delay pin config and bindings
Linus Walleij [Sat, 28 Oct 2017 13:37:17 +0000 (15:37 +0200)]
pinctrl: Add skew-delay pin config and bindings

Some pin controllers (such as the Gemini) can control the
expected clock skew and output delay on certain pins with a
sub-nanosecond granularity. This is typically done by shunting
in a number of double inverters in front of or behind the pin.
Make it possible to configure this with a generic binding.

Cc: devicetree@vger.kernel.org
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: armada-37xx: Add edge both type gpio irq support
Ken Ma [Thu, 19 Oct 2017 13:10:03 +0000 (15:10 +0200)]
pinctrl: armada-37xx: Add edge both type gpio irq support

Current edge both type gpio irqs which need to swap polarity in each
interrupt are not supported, this patch adds edge both type gpio irq
support.

Signed-off-by: Ken Ma <make@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: uniphier: remove eMMC hardware reset pin-mux
Masahiro Yamada [Tue, 24 Oct 2017 04:11:11 +0000 (13:11 +0900)]
pinctrl: uniphier: remove eMMC hardware reset pin-mux

This is handled by the mmc-pwrseq-emmc driver, which controls
an eMMC hardware reset via a GPIO line.

Remove it from the function pin-mux settings.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: rockchip: Add iomux-route switching support for rk3288
Heiko Stuebner [Sat, 21 Oct 2017 08:53:10 +0000 (10:53 +0200)]
pinctrl: rockchip: Add iomux-route switching support for rk3288

The rk3288 also has one function that can be routed to one of two pins,
the hdmi cec functionality can use either gpio7c0 or gpio7c7.
So add the route switching support for it.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: intel: Add Intel Cedar Fork PCH pin controller support
Mika Westerberg [Mon, 23 Oct 2017 12:40:26 +0000 (15:40 +0300)]
pinctrl: intel: Add Intel Cedar Fork PCH pin controller support

Intel Cedar Fork PCH is the successor of Intel Denverton PCH but it is
based on the newer GPIO/pinctrl hardware block. Add a new pinctrl/GPIO
driver to support it.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: intel: Make offset to interrupt status register configurable
Mika Westerberg [Mon, 23 Oct 2017 12:40:25 +0000 (15:40 +0300)]
pinctrl: intel: Make offset to interrupt status register configurable

Some GPIO blocks have the interrupt status (GPI_IS) offset different
than it normally is, so make it configurable. If no offset is specified
we use the default.

While there remove two unused constants from the core driver.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: sunxi: Enforce the strict mode by default
Maxime Ripard [Mon, 9 Oct 2017 20:53:39 +0000 (22:53 +0200)]
pinctrl: sunxi: Enforce the strict mode by default

The strict mode should always have been enabled on our driver, and leaving
it unchecked just makes it harder to find a migration path as time passes.

Let's enable it by default now so that hopefully the new SoCs should be
safe.

Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: sunxi: Disable strict mode for old pinctrl drivers
Maxime Ripard [Mon, 9 Oct 2017 20:53:38 +0000 (22:53 +0200)]
pinctrl: sunxi: Disable strict mode for old pinctrl drivers

Old pinctrl drivers will need to disable strict mode for various reasons,
among which:
  - Some DT will still have a pinctrl group for each GPIO used, which will
    be rejected by pin_request. While we could remove those nodes, we still
    have to deal with old DTs.
  - Some GPIOs on these boards need to have their pin configuration changed
    (for bias or current), and there's no clear migration path

Let's disable the strict mode on those SoCs so that there's no breakage.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: sunxi: Introduce the strict flag
Maxime Ripard [Mon, 9 Oct 2017 20:53:37 +0000 (22:53 +0200)]
pinctrl: sunxi: Introduce the strict flag

Our pinctrl device should have had strict set all along. However, it wasn't
the case, and most of our old device trees also have a pinctrl group in
addition to the GPIOs properties, which mean that we can't really turn it
on now.

All our new SoCs don't have that group, so we should still enable that mode
on the newer one though.

In order to enable it by default, add a flag that will allow to disable
that mode that should be set by pinctrl drivers that cannot be migrated.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agoMerge tag 'sh-pfc-for-v4.15-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Walleij [Fri, 20 Oct 2017 13:20:18 +0000 (15:20 +0200)]
Merge tag 'sh-pfc-for-v4.15-tag2' of git://git./linux/kernel/git/geert/renesas-drivers into devel

pinctrl: sh-pfc: Updates for v4.15 (take two)

  - Add Audio, HSCIF, I2C, and INTC-EX pin groups on R-Car H3 ES2.0,
  - Add Audio and PWM pin groups on R-Car D3,
  - Add support for RZ/A1M and RZ/A1L,
  - Add INTC-EX pin groups on R-Car M3-W,
  - Add SDHI voltage switching on RZ/G1E,
  - Make bias control and IOCTRL support more generic,
  - Add suspend/resume support for R-Car Gen3,
  - Small fixes and cleanups.

6 years agopinctrl: sh-pfc: Save/restore registers for PSCI system suspend
Geert Uytterhoeven [Fri, 29 Sep 2017 12:17:18 +0000 (14:17 +0200)]
pinctrl: sh-pfc: Save/restore registers for PSCI system suspend

During PSCI system suspend, R-Car Gen3 SoCs are powered down, and their
pinctrl register state is lost.  Note that as the boot loader skips most
initialization after system resume, pinctrl register state differs from
the state encountered during normal system boot, too.

To fix this, save all GPIO and peripheral function select, module
select, drive strength control, bias, and other I/O control registers
during system suspend, and restore them during system resume.

Note that to avoid overhead on platforms not needing it, the
suspend/resume code has a build time dependency on sleep and PSCI
support, and a runtime dependency on PSCI.

Inspired by a patch in the BSP by Hien Dang.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7796: Use generic IOCTRL register description
Geert Uytterhoeven [Fri, 29 Sep 2017 12:15:17 +0000 (14:15 +0200)]
pinctrl: sh-pfc: r8a7796: Use generic IOCTRL register description

Move R-Car M3-W I/O voltage support over to the generic way to describe
IOCTRL registers, which will be needed for suspend/resume support.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795: Use generic IOCTRL register description
Geert Uytterhoeven [Fri, 29 Sep 2017 12:15:06 +0000 (14:15 +0200)]
pinctrl: sh-pfc: r8a7795: Use generic IOCTRL register description

Move R-Car H3 ES2.0 I/O voltage support over to the generic way to
describe IOCTRL registers, which will be needed for suspend/resume
support.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795-es1: Use generic IOCTRL register description
Geert Uytterhoeven [Fri, 29 Sep 2017 12:14:56 +0000 (14:14 +0200)]
pinctrl: sh-pfc: r8a7795-es1: Use generic IOCTRL register description

Move R-Car H3 ES1.x I/O voltage support over to the generic way to
describe IOCTRL registers, which will be needed for suspend/resume
support.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: Add generic IOCTRL register description
Geert Uytterhoeven [Fri, 29 Sep 2017 12:16:31 +0000 (14:16 +0200)]
pinctrl: sh-pfc: Add generic IOCTRL register description

Add a generic way to describe IOCTRL registers (for e.g. SD I/O voltage
and time delay control), like is already done for config, drive, and
bias registers.

This makes the sh-pfc core code aware of these registers, which will
ease introducing suspend/resume support later.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: Remove obsolete sh_pfc_pin_to_bias_info()
Geert Uytterhoeven [Fri, 29 Sep 2017 15:12:39 +0000 (17:12 +0200)]
pinctrl: sh-pfc: Remove obsolete sh_pfc_pin_to_bias_info()

All users of sh_pfc_pin_to_bias_info() and the related data structures
have been converted to sh_pfc_pin_to_bias_reg(), so those can be
removed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agopinctrl: sh-pfc: r8a7778: Use generic bias register description
Geert Uytterhoeven [Fri, 29 Sep 2017 14:57:20 +0000 (16:57 +0200)]
pinctrl: sh-pfc: r8a7778: Use generic bias register description

Move R-Car M1A bias support over to the generic way to describe bias
registers.

As the new description is more compact, this decreases kernel size by
ca. 148 bytes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7796: Use generic bias register description
Geert Uytterhoeven [Fri, 29 Sep 2017 12:14:29 +0000 (14:14 +0200)]
pinctrl: sh-pfc: r8a7796: Use generic bias register description

Move R-Car M3-W bias support over to the generic way to describe bias
registers, which will be needed for suspend/resume support.

As the new description is more compact, this decreases kernel size by
ca. 304 bytes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795: Use generic bias register description
Geert Uytterhoeven [Fri, 29 Sep 2017 12:13:35 +0000 (14:13 +0200)]
pinctrl: sh-pfc: r8a7795: Use generic bias register description

Move R-Car H3 ES2.0 bias support over to the generic way to describe
bias registers, which will be needed for suspend/resume support.

As the new description is more compact, this decreases kernel size by
ca. 308 bytes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795-es1: Use generic bias register description
Geert Uytterhoeven [Fri, 29 Sep 2017 12:12:32 +0000 (14:12 +0200)]
pinctrl: sh-pfc: r8a7795-es1: Use generic bias register description

Move R-Car H3 ES1.x bias support over to the generic way to describe
bias registers, which will be needed for suspend/resume support.

As the new description is more compact, this decreases kernel size by
ca. 304 bytes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agopinctrl: sh-pfc: Add sh_pfc_pin_to_bias_reg() helper
Geert Uytterhoeven [Fri, 29 Sep 2017 13:44:38 +0000 (15:44 +0200)]
pinctrl: sh-pfc: Add sh_pfc_pin_to_bias_reg() helper

Add a helper to look up bias registers and bit number for a specific
pin, using the generic bias register description.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: Add generic bias register description
Geert Uytterhoeven [Fri, 29 Sep 2017 12:16:14 +0000 (14:16 +0200)]
pinctrl: sh-pfc: Add generic bias register description

Add a generic way to describe bias registers (for pull-up/down control),
like is already done for config and drive registers.

This makes the sh-pfc core code aware of these registers, which will
ease introducing suspend/resume support later.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agopinctrl: sh-pfc: Drop width parameter of sh_pfc_{read,write}_reg()
Geert Uytterhoeven [Fri, 29 Sep 2017 09:03:11 +0000 (11:03 +0200)]
pinctrl: sh-pfc: Drop width parameter of sh_pfc_{read,write}_reg()

On modern Renesas SoCs, all PFC registers are 32-bit, and all callers of
sh_pfc_{read,write}_reg() already operate on 32-bit registers only.
Hence make the 32-bit width implicit, and rename the functions to
sh_pfc_{read,write}() to shorten lines.

All accesses to 8-bit or 16-bit registers are still done using
sh_pfc_{read,write}_raw_reg().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agopinctrl: sh-pfc: Remove matching on plain sh-pfc platform device
Geert Uytterhoeven [Fri, 29 Sep 2017 08:08:56 +0000 (10:08 +0200)]
pinctrl: sh-pfc: Remove matching on plain sh-pfc platform device

As of commit 8682b3c522c639f3 ("sh-pfc: Remove platform device
registration"), plain "sh-pfc" platform devices are no longer created.
Hence remove their match entry, and the now obsolete checks for missing
device IDs and driver data.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6 years agogpio: mcp23s08: add support for mcp23018
Phil Reid [Fri, 6 Oct 2017 05:08:07 +0000 (13:08 +0800)]
gpio: mcp23s08: add support for mcp23018

This adds the required definitions for the mcp23018 which is the i2c
variant of the mcp23s18.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agoblackfin: Fix local <asm/gpio.h> includes
Linus Walleij [Tue, 17 Oct 2017 09:46:09 +0000 (11:46 +0200)]
blackfin: Fix local <asm/gpio.h> includes

When making the pin control submenu globally visible, all kinds
of oddities appear, in blackfin a few files were #including
<linux/gpio.h> and relying on that to pull in <asm/gpio.h>.

This was not working when pin control but not GPIOLIB was
selected resulting in a breakage in allmodconfig. The code these
files were using was still there and defined in <asm/gpio.h>
just not pulle in from just including <linux/gpio.h>

Simply add the required includes explicitly in the blackfin
kernel core and everything compiles fine.

Delete the use of the incorrect <linux/gpio.h> where possible.

Add stubs to <asm/gpio.h> for the functions called from PM:
these should probably also depend on !PINCTRL but since the
global CONFIG_PM symbol is used to compile PM support,
we need some more intrusive thing here, to be tested by
Blackfin maintainers.

Cc: Steven Miao <realmz6@gmail.com>
Cc: Huanhuan Feng <huanhuan.feng@analog.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: adi2: Fix Kconfig build problem
Linus Walleij [Wed, 11 Oct 2017 09:57:15 +0000 (11:57 +0200)]
pinctrl: adi2: Fix Kconfig build problem

The build robot is complaining on Blackfin:

drivers/pinctrl/pinctrl-adi2.c: In function 'port_setup':
>> drivers/pinctrl/pinctrl-adi2.c:221:21: error: dereferencing
   pointer to incomplete type 'struct gpio_port_t'
      writew(readw(&regs->port_fer) & ~BIT(offset),
                        ^~
drivers/pinctrl/pinctrl-adi2.c: In function 'adi_gpio_ack_irq':
>> drivers/pinctrl/pinctrl-adi2.c:266:18: error: dereferencing
pointer to incomplete type 'struct bfin_pint_regs'
      if (readl(&regs->invert_set) & pintbit)
                     ^~
It seems the driver need to include <asm/gpio.h> and <asm/irq.h>
to compile.

The Blackfin architecture was re-defining the Kconfig
PINCTRL symbol which is not OK, so replaced this with
PINCTRL_BLACKFIN_ADI2 which selects PINCTRL and PINCTRL_ADI2
just like most arches do.

Further, the old GPIO driver symbol GPIO_ADI was possible to
select at the same time as selecting PINCTRL. This was not
working because the arch-local <asm/gpio.h> header contains
an explicit #ifndef PINCTRL clause making compilation break
if you combine them. The same is true for DEBUG_MMRS.

Make sure the ADI2 pinctrl driver is not selected at the same
time as the old GPIO implementation. (This should be converted
to use gpiolib or pincontrol and move to drivers/...) Also make
sure the old GPIO_ADI driver or DEBUG_MMRS is not selected at
the same time as the new PINCTRL implementation, and only make
PINCTRL_ADI2 selectable for the Blackfin families that actually
have it.

This way it is still possible to add e.g. I2C-based pin
control expanders on the Blackfin.

Cc: Steven Miao <realmz6@gmail.com>
Cc: Huanhuan Feng <huanhuan.feng@analog.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agogpio: Cut old SX150X Kconfig option
Linus Walleij [Tue, 17 Oct 2017 09:25:44 +0000 (11:25 +0200)]
gpio: Cut old SX150X Kconfig option

The SX150X driver was moved over to pin control a while back.
The GPIO Kconfig symbol creates a circular dependency since
it requires GPIOLIB and the pin control driver selects GPIOLIB
so get rid of the old annoying Kconfig option.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: meson: rework pinmux ops
Jerome Brunet [Thu, 12 Oct 2017 12:40:26 +0000 (14:40 +0200)]
pinctrl: meson: rework pinmux ops

This change prepare the introduction of new meson SoC. This new SoC will
share the same gpio/pinconf registers but the pinmux part will be
different. While the format of the data associated with each pinmux group
will change, the way to handle pinmuxing will be similar.

To deal with this new situation, the meson_pmx_struture is kept but the
data associated to it is now generic. This allows to reuse the basic
functions which would otherwise be copy/pasted in each pinmux driver
(such as getting the name a count of groups and functions) Only the
functions actually using this specific data is taken out of the common
code and is handling the SoC pinmuxing

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: meson: separate soc drivers
Jerome Brunet [Thu, 12 Oct 2017 12:40:25 +0000 (14:40 +0200)]
pinctrl: meson: separate soc drivers

When meson pinctrl is enabled, all meson platforms pinctrl drivers are
built in the kernel, with a significant amount of data.

This leads to situation where pinctrl drivers targeting an architecture
are also compiled and shipped on another one (ex: meson8 - ARM - compiled
and shipped on ARM64 builds). This is a waste of memory we can easily
avoid.

This change makes 4 pinctrl drivers (1 per SoC) out the original single
driver, allowing to compile and ship only the ones required.

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: dt-bindings: Fix A37xx uart2 group name
Miquel Raynal [Fri, 13 Oct 2017 09:01:46 +0000 (11:01 +0200)]
pinctrl: dt-bindings: Fix A37xx uart2 group name

Fix a typo in A37xx pin controllers documentation about uart2 pin group.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: sh-pfc: r8a7745: Implement voltage switching for SDHI
Biju Das [Fri, 13 Oct 2017 14:49:15 +0000 (15:49 +0100)]
pinctrl: sh-pfc: r8a7745: Implement voltage switching for SDHI

Voltage switching is the same as on the r8a7794.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a77995: Remove USB0_IDIN and USB0_IDPU pins
Geert Uytterhoeven [Tue, 10 Oct 2017 11:09:37 +0000 (13:09 +0200)]
pinctrl: sh-pfc: r8a77995: Remove USB0_IDIN and USB0_IDPU pins

R-Car Gen3 Hardware Manual Errata for Rev 0.55 of September 8, 2017
removed the USB0_IDIN and USB0_IDPU pins on R-Car D3.

This change has no functional impact, as these definitions were unused.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: gemini: Add missing functions
Linus Walleij [Sat, 14 Oct 2017 15:13:03 +0000 (17:13 +0200)]
pinctrl: gemini: Add missing functions

Some two functions were missing from the Gemini pin control
driver. Noticed when trying to use ethernet. Fix it up by
adding them.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: Do not depend in GPIOLIB, select it
Linus Walleij [Wed, 11 Oct 2017 10:04:35 +0000 (12:04 +0200)]
pinctrl: Do not depend in GPIOLIB, select it

Instead of depends on GPIOLIB and having to run around in
Kconfig menus looking for why your device is not available,
simply select it from the pin control drivers that need it.

The Kconfig for GPIOLIB is improved, selectable and this
should "just work".

Cc: Phil Reid <preid@electromag.com.au>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Cc: Peter Rosin <peda@axentia.se>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: sh-pfc: r8a77995: Add Audio SSI pin support
Kuninori Morimoto [Tue, 10 Oct 2017 07:57:40 +0000 (07:57 +0000)]
pinctrl: sh-pfc: r8a77995: Add Audio SSI pin support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a77995: Add Audio clock pin support
Kuninori Morimoto [Tue, 10 Oct 2017 07:57:17 +0000 (07:57 +0000)]
pinctrl: sh-pfc: r8a77995: Add Audio clock pin support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7796: Fix trivial typo in comment
Wolfram Sang [Mon, 9 Oct 2017 08:37:25 +0000 (10:37 +0200)]
pinctrl: sh-pfc: r8a7796: Fix trivial typo in comment

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795-es1: Fix trivial typo in comment
Wolfram Sang [Mon, 9 Oct 2017 08:37:24 +0000 (10:37 +0200)]
pinctrl: sh-pfc: r8a7795-es1: Fix trivial typo in comment

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795: Fix trivial typo in comment
Wolfram Sang [Mon, 9 Oct 2017 08:37:24 +0000 (10:37 +0200)]
pinctrl: sh-pfc: r8a7795: Fix trivial typo in comment

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795: Add HSCIF pins, groups, and functions
Wolfram Sang [Mon, 9 Oct 2017 08:20:53 +0000 (10:20 +0200)]
pinctrl: sh-pfc: r8a7795: Add HSCIF pins, groups, and functions

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7796: Add support for INTC-EX IRQ pins
Takeshi Kihara [Mon, 24 Oct 2016 11:40:09 +0000 (20:40 +0900)]
pinctrl: sh-pfc: r8a7796: Add support for INTC-EX IRQ pins

Most pins on the r8a7796 SoC can be configured in GPIO mode for
interrupt and GPIO functionality, while a couple of them can also
be routed to the INTC-EX hardware block (formerly known as IRQC).

On r8a7795 the INTC-EX hardware handles pins IRQ0 -> IRQ5 and
this patch adds support for them to the PFC driver as "intc_ex_irqN".

[takeshi.kihara.df: Ported from commit bb46f6f3f3bf ("pinctrl: sh-pfc:
 r8a7795: Add support for INTC-EX IRQ pins")
 to drivers/pinctrl/sh-pfc/pfc-r8a7796.c]
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795: Add INTC-EX pins, groups and function
Geert Uytterhoeven [Mon, 13 Mar 2017 10:59:42 +0000 (11:59 +0100)]
pinctrl: sh-pfc: r8a7795: Add INTC-EX pins, groups and function

Add pins, groups, and a function for the INTC-EX interrupt controller on
R-Car H3 ES2.0.

Extracted from a big patch in the BSP by Takeshi Kihara.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: qcom: spmi-gpio: Update GPIO EN_CTL when setting pin config
Fenglin Wu [Tue, 12 Sep 2017 00:32:46 +0000 (08:32 +0800)]
pinctrl: qcom: spmi-gpio: Update GPIO EN_CTL when setting pin config

GPIO is expected to be disabled iff PIN_CONFIG_BIAS_HIGH_IMPEDANCE is
configured. Update is_enabled flag in config_set() so that it can
reflect GPIO status correctly. Also modify EN_CTL register based on
is_enabled flag in config_set() to configure the GPIO properly.

Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: mcp23s08: remove unused variables from pinconf_set
Phil Reid [Fri, 6 Oct 2017 05:08:11 +0000 (13:08 +0800)]
pinctrl: mcp23s08: remove unused variables from pinconf_set

Variable mask and val are not used in the mcp_pinconf_set().

Signed-off-by: Phil Reid <preid@electromag.com.au>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agodt-bindings: pinctrl: add mcp23018 to mcp23s08 documentation
Phil Reid [Fri, 6 Oct 2017 05:08:06 +0000 (13:08 +0800)]
dt-bindings: pinctrl: add mcp23018 to mcp23s08 documentation

This adds the compatible string for the mcp23018, which is the i2c variant
of the mcp23s18.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agodt-bindings: pinctrl: mcp23s08 update binding doc
Lars Poeschel [Mon, 9 Oct 2017 12:03:00 +0000 (14:03 +0200)]
dt-bindings: pinctrl: mcp23s08 update binding doc

The mcp23s08 driver moved to pinctrl recently. It accepts the
bias-pull-up pinctrl property since then. This updates the binding
doc to reflect that.

Thanks to Sebastian Reichel for the working example.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agodt-bindings: pinctrl: Move mcp23s08 from gpio
Lars Poeschel [Thu, 5 Oct 2017 07:50:02 +0000 (09:50 +0200)]
dt-bindings: pinctrl: Move mcp23s08 from gpio

The mcp23s08 driver was moved from gpio to pinctrl. This moves it's
devicetree binding doc as well. So driver and binding doc are in sync
again.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: change Kconfig PINCTRL variable to a menuconfig
Phil Reid [Fri, 6 Oct 2017 05:08:05 +0000 (13:08 +0800)]
pinctrl: change Kconfig PINCTRL variable to a menuconfig

This allows PINCTRL to be selected manually to allow enabling of the
mcp23s08 i2c/spi gpio driver. Which is not platform specific.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: meson: remove unused pin_base
Jerome Brunet [Fri, 6 Oct 2017 08:54:07 +0000 (10:54 +0200)]
pinctrl: meson: remove unused pin_base

While removing the need to have pin_base defined in meson pinctrl
drivers, I forgot to remove the corresponding field from the
pinctrl_data structure.

Fixing this now.

Fixes: 70e5ecb1b994 ("pinctrl: meson: get rid of pin_base")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: meson-gx: add TEST_N i2s pinmux
Jerome Brunet [Fri, 6 Oct 2017 08:31:42 +0000 (10:31 +0200)]
pinctrl: meson-gx: add TEST_N i2s pinmux

Add TEST_N pinmux for channel 6 and 7 of the i2s output

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: sx150x: make struct sx150x_regmap_config static
Colin Ian King [Thu, 5 Oct 2017 10:23:56 +0000 (11:23 +0100)]
pinctrl: sx150x: make struct sx150x_regmap_config static

The structure sx150x_regmap_config is local to the source and does not
need to be in global scope, so make it static.

Cleans up sparse warning:
symbol 'sx150x_regmap_config' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: ingenic: make function ingenic_pinctrl_probe static
Colin Ian King [Thu, 5 Oct 2017 10:11:37 +0000 (11:11 +0100)]
pinctrl: ingenic: make function ingenic_pinctrl_probe static

The function ingenic_pinctrl_probe is local to the source and does
not need to be in global scope, so make it static.

Cleans up sparse warnings
symbol 'ingenic_pinctrl_probe' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agodt-bindings: pinctrl: Add support for RZ/A1M and RZ/A1L
Chris Brandt [Wed, 4 Oct 2017 21:07:24 +0000 (16:07 -0500)]
dt-bindings: pinctrl: Add support for RZ/A1M and RZ/A1L

Describe how to specify RZ/A1M and RZ/A1L devices.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: rza1: Add support for RZ/A1L
Chris Brandt [Wed, 4 Oct 2017 21:07:23 +0000 (16:07 -0500)]
pinctrl: rza1: Add support for RZ/A1L

Aspects like the number of ports and the location where peripherals are
brought out differ between the RZ/A1H and RZ/A1L.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agoMAINTAINERS: Add git repository to Renesas pinctrl driver section
Geert Uytterhoeven [Wed, 4 Oct 2017 11:35:12 +0000 (13:35 +0200)]
MAINTAINERS: Add git repository to Renesas pinctrl driver section

Signed-off-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>
6 years agoMerge tag 'sh-pfc-for-v4.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Walleij [Sat, 7 Oct 2017 11:12:50 +0000 (13:12 +0200)]
Merge tag 'sh-pfc-for-v4.15-tag1' of git://git./linux/kernel/git/geert/renesas-drivers into devel

pinctrl: sh-pfc: Updates for v4.15

  - Add SDHI and DRIF pin groups on R-Car H3 ES2.0,
  - Add USB3.0 host pin groups on R-Car H3 (ES1.x and ES2.0),
  - Add EthernetAVB and USB2.0 host pin groups on R-Car D3.

6 years agopinctrl: rockchip: rk3328: Fix the correct routing config
David Wu [Sat, 30 Sep 2017 12:13:21 +0000 (20:13 +0800)]
pinctrl: rockchip: rk3328: Fix the correct routing config

If the gmac-m1 optimization(bit10) is selected, the gpio function
of gmac pins is not valid. We may use the rmii mode for gmac interface,
the pins such as rx_d2, rx_d3, which the rgmii mode used, but rmii not
used could be taken as gpio function. So gmac_rxd0m1 selects the bit2,
and gmac_rxd0m3 select bit10 is more correct.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: rockchip: Fix the rk3399 gpio0 and gpio1 banks' drv_offset at pmu grf
David Wu [Sat, 30 Sep 2017 12:13:20 +0000 (20:13 +0800)]
pinctrl: rockchip: Fix the rk3399 gpio0 and gpio1 banks' drv_offset at pmu grf

The offset of gpio0 and gpio1 bank drive strength is 0x8, not 0x4.
But the mux is 0x4, we couldn't use the IOMUX_WIDTH_4BIT flag, so
we give them actual offset.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agoMerge branch 'pinconf-rename' into devel
Linus Walleij [Sat, 7 Oct 2017 10:29:14 +0000 (12:29 +0200)]
Merge branch 'pinconf-rename' into devel

6 years agogpio: pxa: Use library functions
Linus Walleij [Fri, 22 Sep 2017 09:19:26 +0000 (11:19 +0200)]
gpio: pxa: Use library functions

These request/free functions are just reimplementations of the
standard helpers in gpiolib. Delete them and replace with the
helpers.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: meson: Use library functions
Linus Walleij [Fri, 22 Sep 2017 09:16:40 +0000 (11:16 +0200)]
pinctrl: meson: Use library functions

These request/free functions are just reimplementations of the
standard helpers in gpiolib. Delete them and replace with the
helpers.

Cc: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: bcm: nsp: Use library functions
Linus Walleij [Fri, 22 Sep 2017 09:06:00 +0000 (11:06 +0200)]
pinctrl: bcm: nsp: Use library functions

These request/free functions are just reimplementations of the
standard helpers in gpiolib. Delete them and replace with the
helpers.

Acked-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: meson-gxbb: add missing GPIOX_22 pin
Jerome Brunet [Wed, 20 Sep 2017 13:39:27 +0000 (15:39 +0200)]
pinctrl: meson-gxbb: add missing GPIOX_22 pin

GPIOX_22 is declared as a gpio but the id is no present in the pin
table. This hole trigger an error while reading the pingroup debugfs entry

GPIOX_22 is no routed externally. For all we know, it could an internal
pin of SoC

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: meson-gx: TEST_N belongs to the AO controller
Jerome Brunet [Wed, 20 Sep 2017 13:39:26 +0000 (15:39 +0200)]
pinctrl: meson-gx: TEST_N belongs to the AO controller

On meson-gx platforms, TEST_N has been incorrectly declared in the EE
controller while it belongs to AO controller.

Move the pin to the appropriate controller

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: meson: get rid of pin_base
Jerome Brunet [Wed, 20 Sep 2017 13:39:25 +0000 (15:39 +0200)]
pinctrl: meson: get rid of pin_base

pin_base was used with the manually set pin offset in meson pinctrl. This
is no longer the case, pin_base is 0 on every meson pinctrl controllers
and should go away.

Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: meson: remove offset from pinctrl
Jerome Brunet [Wed, 20 Sep 2017 13:39:20 +0000 (15:39 +0200)]
pinctrl: meson: remove offset from pinctrl

Offset on meson pinctrl and gpios is something that was carried from the
vendor driver, where there is a weird link between the 2
controllers. Since these 2 controllers are independent, this offset adds
an unnecessary complexity.

This patch remove this manually set offset and rely on pinctrl to figure
out the gpio base offset

Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: sh-pfc: r8a7795: Restore sort order
Geert Uytterhoeven [Thu, 5 Oct 2017 10:14:00 +0000 (12:14 +0200)]
pinctrl: sh-pfc: r8a7795: Restore sort order

Move the SCIF_CLK pins where they belong.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795-es1: Restore sort order
Geert Uytterhoeven [Thu, 5 Oct 2017 10:12:51 +0000 (12:12 +0200)]
pinctrl: sh-pfc: r8a7795-es1: Restore sort order

Move the USB30 pins where they belong.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795: Add I2C pin support
Wolfram Sang [Wed, 4 Oct 2017 15:52:52 +0000 (17:52 +0200)]
pinctrl: sh-pfc: r8a7795: Add I2C pin support

Since pinmuxing for I2C is equal on H3 ES1.0 and later versions, copy
the I2C settings from ES1.0. Fixes this error in upstream for
Salvator-XS:

sh-pfc e6060000.pin-controller: function 'i2c2' not supported
sh-pfc e6060000.pin-controller: invalid function i2c2 in map table
i2c-rcar: probe of e6510000.i2c failed with error -22

Now, the bus works the same as with other Salvator boards.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a77995: Add PWM pins, groups and functions
Takeshi Kihara [Wed, 4 Oct 2017 10:22:39 +0000 (19:22 +0900)]
pinctrl: sh-pfc: r8a77995: Add PWM pins, groups and functions

This patch adds support for PWM on r8a77995.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795: Add Audio SSI pin support
Kuninori Morimoto [Tue, 3 Oct 2017 02:23:11 +0000 (02:23 +0000)]
pinctrl: sh-pfc: r8a7795: Add Audio SSI pin support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795: Add Audio clock pin support
Kuninori Morimoto [Tue, 3 Oct 2017 02:22:51 +0000 (02:22 +0000)]
pinctrl: sh-pfc: r8a7795: Add Audio clock pin support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795: Add USB3.0 host support
Takeshi Kihara [Mon, 2 Oct 2017 09:45:25 +0000 (18:45 +0900)]
pinctrl: sh-pfc: r8a7795: Add USB3.0 host support

This patch adds USB3.0 ch0 pinmux support to R8A7795 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795-es1: Add USB3.0 host support
Takeshi Kihara [Mon, 2 Oct 2017 09:45:24 +0000 (18:45 +0900)]
pinctrl: sh-pfc: r8a7795-es1: Add USB3.0 host support

This patch adds USB3{0,1} (USB3.0 host) pinmux support to R8A7795 ES1.x
SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: cherryview fixed typo in comment
Chris Gorman [Tue, 26 Sep 2017 16:27:40 +0000 (12:27 -0400)]
pinctrl: cherryview fixed typo in comment

Fixed typo on comment for north_community.

Signed-off-by: Chris Gorman <chrisjohgorman@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl/gpio: Unify namespace for cross-calls
Linus Walleij [Fri, 22 Sep 2017 09:02:10 +0000 (11:02 +0200)]
pinctrl/gpio: Unify namespace for cross-calls

The pinctrl_request_gpio() and pinctrl_free_gpio() break the nice
namespacing in the other cross-calls like pinctrl_gpio_foo().
Just rename them and all references so we have one namespace
with all cross-calls under pinctrl_gpio_*().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: meson: fix incorrect usage of ENOSYS
Jerome Brunet [Wed, 20 Sep 2017 14:08:15 +0000 (16:08 +0200)]
pinctrl: meson: fix incorrect usage of ENOSYS

ENOSYS is special and should only be used for incorrect syscall number.
It is not the case here. let's use ENOTSUPP instead.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: single: make two arrays static const, reduces object code size
Colin Ian King [Tue, 19 Sep 2017 14:42:18 +0000 (15:42 +0100)]
pinctrl: single: make two arrays static const, reduces object code size

Don't populate the read-only arrays prop2 and prop4 on the stack, instead
make them static const.  Makes the object code smaller by over 230 bytes:

Before:
   text    data     bss     dec     hex filename
  28235    5820     192   34247    85c7 drivers/pinctrl/pinctrl-single.o

After:
   text    data     bss     dec     hex filename
  27839    5980     192   34011    84db drivers/pinctrl/pinctrl-single.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl/amd: make functions amd_gpio_suspend and amd_gpio_resume static
Colin Ian King [Wed, 13 Sep 2017 16:15:01 +0000 (17:15 +0100)]
pinctrl/amd: make functions amd_gpio_suspend and amd_gpio_resume static

The functions amd_gpio_suspend and amd_gpio_resume are local to the
source and do not need to be in global scope, so make them static.

Cleans up sparse warnings:
symbol 'amd_gpio_suspend' was not declared. Should it be static?
symbol 'amd_gpio_resume' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agopinctrl: sh-pfc: r8a77995: Add USB2.0 host support
Takeshi Kihara [Thu, 14 Sep 2017 10:29:21 +0000 (19:29 +0900)]
pinctrl: sh-pfc: r8a77995: Add USB2.0 host support

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a77995: Add EthernetAVB pins, groups and functions
Yoshihiro Shimoda [Wed, 13 Sep 2017 23:52:42 +0000 (08:52 +0900)]
pinctrl: sh-pfc: r8a77995: Add EthernetAVB pins, groups and functions

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795: Re-add DRIF support
Dirk Behme [Wed, 30 Aug 2017 08:05:48 +0000 (10:05 +0200)]
pinctrl: sh-pfc: r8a7795: Re-add DRIF support

DRIF support for r8a7795 was initially added with commit 2d775831988
("pinctrl: sh-pfc: r8a7795: Add DRIF support") and later dropped from
the new pfc-r8a7795.c while re-naming the initial pfc-r8a7795.c to
pfc-r8a7795-es1.c in commit b205914c8f8 ("pinctrl: sh-pfc: r8a7795:
Add support for R-Car H3 ES2.0"). As the DRIF doesn't differ, re-add
it here.

Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: sh-pfc: r8a7795: Add SDHI0-3 support
Takeshi Kihara [Tue, 29 Aug 2017 15:51:57 +0000 (17:51 +0200)]
pinctrl: sh-pfc: r8a7795: Add SDHI0-3 support

Add SDHI0-3 support for R-Car H3 ES2.0 based on a patch from the Renesas
BSP. SDHI pin config is identical to H3 ES1.*.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
6 years agopinctrl: uniphier: make arrays static, reduces object code size
Colin Ian King [Tue, 12 Sep 2017 11:21:24 +0000 (12:21 +0100)]
pinctrl: uniphier: make arrays static, reduces object code size

Don't populate const arrays on the stack, instead make them
static.  Makes the object code smaller nearly 1000 bytes. Also
line break wide lines to avoid checkpatch warnings.

Before:
   text    data     bss     dec     hex filename
  13112    1996       0   15108    3b04 pinctrl-uniphier-core.o

After:
   text    data     bss     dec     hex filename
  11642    2476       0   14118    3726 pinctrl-uniphier-core.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agoLinux 4.14-rc1 v4.14-rc1
Linus Torvalds [Sat, 16 Sep 2017 22:47:51 +0000 (15:47 -0700)]
Linux 4.14-rc1

6 years agoMerge tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs
Linus Torvalds [Sat, 16 Sep 2017 19:08:10 +0000 (12:08 -0700)]
Merge tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs

Pull UBI updates from Richard Weinberger:
 "Minor improvements"

* tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs:
  UBI: Fix two typos in comments
  ubi: fastmap: fix spelling mistake: "invalidiate" -> "invalidate"
  ubi: pr_err() strings should end with newlines
  ubi: pr_err() strings should end with newlines
  ubi: pr_err() strings should end with newlines

6 years agoMerge branch 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 16 Sep 2017 19:03:25 +0000 (12:03 -0700)]
Merge branch 'for-linus-4.14-rc1' of git://git./linux/kernel/git/rw/uml

Pull UML updates from Richard Weinberger:

 - minor improvements

 - fixes for Debian's new gcc defaults (pie enabled by default)

 - fixes for XSTATE/XSAVE to make UML work again on modern systems

* 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: return negative in tuntap_open_tramp()
  um: remove a stray tab
  um: Use relative modversions with LD_SCRIPT_DYN
  um: link vmlinux with -no-pie
  um: Fix CONFIG_GCOV for modules.
  Fix minor typos and grammar in UML start_up help
  um: defconfig: Cleanup from old Kconfig options
  um: Fix FP register size for XSTATE/XSAVE

6 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Sat, 16 Sep 2017 18:28:59 +0000 (11:28 -0700)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix hotplug deadlock in hv_netvsc, from Stephen Hemminger.

 2) Fix double-free in rmnet driver, from Dan Carpenter.

 3) INET connection socket layer can double put request sockets, fix
    from Eric Dumazet.

 4) Don't match collect metadata-mode tunnels if the device is down,
    from Haishuang Yan.

 5) Do not perform TSO6/GSO on ipv6 packets with extensions headers in
    be2net driver, from Suresh Reddy.

 6) Fix scaling error in gen_estimator, from Eric Dumazet.

 7) Fix 64-bit statistics deadlock in systemport driver, from Florian
    Fainelli.

 8) Fix use-after-free in sctp_sock_dump, from Xin Long.

 9) Reject invalid BPF_END instructions in verifier, from Edward Cree.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
  mlxsw: spectrum_router: Only handle IPv4 and IPv6 events
  Documentation: link in networking docs
  tcp: fix data delivery rate
  bpf/verifier: reject BPF_ALU64|BPF_END
  sctp: do not mark sk dumped when inet_sctp_diag_fill returns err
  sctp: fix an use-after-free issue in sctp_sock_dump
  netvsc: increase default receive buffer size
  tcp: update skb->skb_mstamp more carefully
  net: ipv4: fix l3slave check for index returned in IP_PKTINFO
  net: smsc911x: Quieten netif during suspend
  net: systemport: Fix 64-bit stats deadlock
  net: vrf: avoid gcc-4.6 warning
  qed: remove unnecessary call to memset
  tg3: clean up redundant initialization of tnapi
  tls: make tls_sw_free_resources static
  sctp: potential read out of bounds in sctp_ulpevent_type_enabled()
  MAINTAINERS: review Renesas DT bindings as well
  net_sched: gen_estimator: fix scaling error in bytes/packets samples
  nfp: wait for the NSP resource to appear on boot
  nfp: wait for board state before talking to the NSP
  ...

6 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sat, 16 Sep 2017 18:24:26 +0000 (11:24 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

Pull more input updates from Dmitry Torokhov:
 "A second round of updates for the input subsystem:

   - a new driver for PWM-controlled vibrators

   - ucb1400 touchscreen driver had completely busted suspend/resume
     handling

   - we now handle "home" button found on some devices with Goodix
     touchscreens

   - assorted other fixups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: i8042 - add Gigabyte P57 to the keyboard reset table
  Input: xpad - validate USB endpoint type during probe
  Input: ucb1400_ts - fix suspend and resume handling
  Input: edt-ft5x06 - fix access to non-existing register
  Input: elantech - make arrays debounce_packet static, reduces object code size
  Input: surface3_spi - make const array header static, reduces object code size
  Input: goodix - add support for capacitive home button
  Input: add a driver for PWM controllable vibrators
  Input: adi - make array seq static, reduces object code size

6 years agofirmware: Restore support for built-in firmware
Markus Trippelsdorf [Sat, 16 Sep 2017 09:01:16 +0000 (11:01 +0200)]
firmware: Restore support for built-in firmware

Commit 5620a0d1aac ("firmware: delete in-kernel firmware") removed the
entire firmware directory.  Unfortunately it thereby also removed the
support for built-in firmware.

This restores the ability to build firmware directly into the kernel by
pruning the original Makefile to the necessary minimum.  The default for
EXTRA_FIRMWARE_DIR is now the standard directory /lib/firmware/.

Fixes: 5620a0d1aac ("firmware: delete in-kernel firmware")
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Acked-by: Greg K-H <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
6 years agomlxsw: spectrum_router: Only handle IPv4 and IPv6 events
Ido Schimmel [Fri, 15 Sep 2017 13:31:07 +0000 (15:31 +0200)]
mlxsw: spectrum_router: Only handle IPv4 and IPv6 events

The driver doesn't support events from address families other than IPv4
and IPv6, so ignore them. Otherwise, we risk queueing a work item before
it's initialized.

This can happen in case a VRF is configured when MROUTE_MULTIPLE_TABLES
is enabled, as the VRF driver will try to add an l3mdev rule for the
IPMR family.

Fixes: 65e65ec137f4 ("mlxsw: spectrum_router: Don't ignore IPv6 notifications")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Andreas Rammhold <andreas@rammhold.de>
Reported-by: Florian Klink <flokli@flokli.de>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agoDocumentation: link in networking docs
Pavel Machek [Sat, 16 Sep 2017 14:28:02 +0000 (16:28 +0200)]
Documentation: link in networking docs

Fix link in filter.txt.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agotcp: fix data delivery rate
Eric Dumazet [Fri, 15 Sep 2017 23:47:42 +0000 (16:47 -0700)]
tcp: fix data delivery rate

Now skb->mstamp_skb is updated later, we also need to call
tcp_rate_skb_sent() after the update is done.

Fixes: 8c72c65b426b ("tcp: update skb->skb_mstamp more carefully")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6 years agoMerge branch '4.14-features' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sat, 16 Sep 2017 03:43:33 +0000 (20:43 -0700)]
Merge branch '4.14-features' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS updates from Ralf Baechle:
 "This is the main pull request for 4.14 for MIPS; below a summary of
  the non-merge commits:

  CM:
   - Rename mips_cm_base to mips_gcr_base
   - Specify register size when generating accessors
   - Use BIT/GENMASK for register fields, order & drop shifts
   - Add cluster & block args to mips_cm_lock_other()

  CPC:
   - Use common CPS accessor generation macros
   - Use BIT/GENMASK for register fields, order & drop shifts
   - Introduce register modify (set/clear/change) accessors
   - Use change_*, set_* & clear_* where appropriate
   - Add CM/CPC 3.5 register definitions
   - Use GlobalNumber macros rather than magic numbers
   - Have asm/mips-cps.h include CM & CPC headers
   - Cluster support for topology functions
   - Detect CPUs in secondary clusters

  CPS:
   - Read GIC_VL_IDENT directly, not via irqchip driver

  DMA:
   - Consolidate coherent and non-coherent dma_alloc code
   - Don't use dma_cache_sync to implement fd_cacheflush

  FPU emulation / FP assist code:
   - Another series of 14 commits fixing corner cases such as NaN
     propgagation and other special input values.
   - Zero bits 32-63 of the result for a CLASS.D instruction.
   - Enhanced statics via debugfs
   - Do not use bools for arithmetic. GCC 7.1 moans about this.
   - Correct user fault_addr type

  Generic MIPS:
   - Enhancement of stack backtraces
   - Cleanup from non-existing options
   - Handle non word sized instructions when examining frame
   - Fix detection and decoding of ADDIUSP instruction
   - Fix decoding of SWSP16 instruction
   - Refactor handling of stack pointer in get_frame_info
   - Remove unreachable code from force_fcr31_sig()
   - Convert to using %pOF instead of full_name
   - Remove the R6000 support.
   - Move FP code from *_switch.S to *_fpu.S
   - Remove unused ST_OFF from r2300_switch.S
   - Allow platform to specify multiple its.S files
   - Add #includes to various files to ensure code builds reliable and
     without warning..
   - Remove __invalidate_kernel_vmap_range
   - Remove plat_timer_setup
   - Declare various variables & functions static
   - Abstract CPU core & VP(E) ID access through accessor functions
   - Store core & VP IDs in GlobalNumber-style variable
   - Unify checks for sibling CPUs
   - Add CPU cluster number accessors
   - Prevent direct use of generic_defconfig
   - Make CONFIG_MIPS_MT_SMP default y
   - Add __ioread64_copy
   - Remove unnecessary inclusions of linux/irqchip/mips-gic.h

  GIC:
   - Introduce asm/mips-gic.h with accessor functions
   - Use new GIC accessor functions in mips-gic-timer
   - Remove counter access functions from irq-mips-gic.c
   - Remove gic_read_local_vp_id() from irq-mips-gic.c
   - Simplify shared interrupt pending/mask reads in irq-mips-gic.c
   - Simplify gic_local_irq_domain_map() in irq-mips-gic.c
   - Drop gic_(re)set_mask() functions in irq-mips-gic.c
   - Remove gic_set_polarity(), gic_set_trigger(), gic_set_dual_edge(),
     gic_map_to_pin() and gic_map_to_vpe() from irq-mips-gic.c.
   - Convert remaining shared reg access, local int mask access and
     remaining local reg access to new accessors
   - Move GIC_LOCAL_INT_* to asm/mips-gic.h
   - Remove GIC_CPU_INT* macros from irq-mips-gic.c
   - Move various definitions to the driver
   - Remove gic_get_usm_range()
   - Remove __gic_irq_dispatch() forward declaration
   - Remove gic_init()
   - Use mips_gic_present() in place of gic_present and remove
     gic_present
   - Move gic_get_c0_*_int() to asm/mips-gic.h
   - Remove linux/irqchip/mips-gic.h
   - Inline __gic_init()
   - Inline gic_basic_init()
   - Make pcpu_masks a per-cpu variable
   - Use pcpu_masks to avoid reading GIC_SH_MASK*
   - Clean up mti, reserved-cpu-vectors handling
   - Use cpumask_first_and() in gic_set_affinity()
   - Let the core set struct irq_common_data affinity

  microMIPS:
   - Fix microMIPS stack unwinding on big endian systems

  MIPS-GIC:
   - SYNC after enabling GIC region

  NUMA:
   - Remove the unused parent_node() macro

  R6:
   - Constify r2_decoder_tables
   - Add accessor & bit definitions for GlobalNumber

  SMP:
   - Constify smp ops
   - Allow boot_secondary SMP op to return errors

  VDSO:
   - Drop gic_get_usm_range() usage
   - Avoid use of linux/irqchip/mips-gic.h

  Platform changes:

  Alchemy:
   - Add devboard machine type to cpuinfo
   - update cpu feature overrides
   - Threaded carddetect irqs for devboards

  AR7:
   - allow NULL clock for clk_get_rate

  BCM63xx:
   - Fix ENETDMA_6345_MAXBURST_REG offset
   - Allow NULL clock for clk_get_rate

  CI20:
   - Enable GPIO and RTC drivers in defconfig
   - Add ethernet and fixed-regulator nodes to DTS

  Generic platform:
   - Move Boston and NI 169445 FIT image source to their own files
   - Include asm/bootinfo.h for plat_fdt_relocated()
   - Include asm/time.h for get_c0_*_int()
   - Include asm/bootinfo.h for plat_fdt_relocated()
   - Include asm/time.h for get_c0_*_int()
   - Allow filtering enabled boards by requirements
   - Don't explicitly disable CONFIG_USB_SUPPORT
   - Bump default NR_CPUS to 16

  JZ4700:
   - Probe the jz4740-rtc driver from devicetree

  Lantiq:
   - Drop check of boot select from the spi-falcon driver.
   - Drop check of boot select from the lantiq-flash MTD driver.
   - Access boot cause register in the watchdog driver through regmap
   - Add device tree binding documentation for the watchdog driver
   - Add docs for the RCU DT bindings.
   - Convert the fpi bus driver to a platform_driver
   - Remove ltq_reset_cause() and ltq_boot_select(
   - Switch to a proper reset driver
   - Switch to a new drivers/soc GPHY driver
   - Add an USB PHY driver for the Lantiq SoCs using the RCU module
   - Use of_platform_default_populate instead of __dt_register_buses
   - Enable MFD_SYSCON to be able to use it for the RCU MFD
   - Replace ltq_boot_select() with dummy implementation.

  Loongson 2F:
   - Allow NULL clock for clk_get_rate

  Malta:
   - Use new GIC accessor functions

  NI 169445:
   - Add support for NI 169445 board.
   - Only include in 32r2el kernels

  Octeon:
   - Add support for watchdog of 78XX SOCs.
   - Add support for watchdog of CN68XX SOCs.
   - Expose support for mips32r1, mips32r2 and mips64r1
   - Enable more drivers in config file
   - Add support for accessing the boot vector.
   - Remove old boot vector code from watchdog driver
   - Define watchdog registers for 70xx, 73xx, 78xx, F75xx.
   - Make CSR functions node aware.
   - Allow access to CIU3 IRQ domains.
   - Misc cleanups in the watchdog driver

  Omega2+:
   - New board, add support and defconfig

  Pistachio:
   - Enable Root FS on NFS in defconfig

  Ralink:
   - Add Mediatek MT7628A SoC
   - Allow NULL clock for clk_get_rate
   - Explicitly request exclusive reset control in the pci-mt7620 PCI driver.

  SEAD3:
   - Only include in 32 bit kernels by default

  VoCore:
   - Add VoCore as a vendor t0 dt-bindings
   - Add defconfig file"

* '4.14-features' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (167 commits)
  MIPS: Refactor handling of stack pointer in get_frame_info
  MIPS: Stacktrace: Fix microMIPS stack unwinding on big endian systems
  MIPS: microMIPS: Fix decoding of swsp16 instruction
  MIPS: microMIPS: Fix decoding of addiusp instruction
  MIPS: microMIPS: Fix detection of addiusp instruction
  MIPS: Handle non word sized instructions when examining frame
  MIPS: ralink: allow NULL clock for clk_get_rate
  MIPS: Loongson 2F: allow NULL clock for clk_get_rate
  MIPS: BCM63XX: allow NULL clock for clk_get_rate
  MIPS: AR7: allow NULL clock for clk_get_rate
  MIPS: BCM63XX: fix ENETDMA_6345_MAXBURST_REG offset
  mips: Save all registers when saving the frame
  MIPS: Add DWARF unwinding to assembly
  MIPS: Make SAVE_SOME more standard
  MIPS: Fix issues in backtraces
  MIPS: jz4780: DTS: Probe the jz4740-rtc driver from devicetree
  MIPS: Ci20: Enable RTC driver
  watchdog: octeon-wdt: Add support for 78XX SOCs.
  watchdog: octeon-wdt: Add support for cn68XX SOCs.
  watchdog: octeon-wdt: File cleaning.
  ...

6 years agoMerge tag 'pci-v4.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Sat, 16 Sep 2017 03:25:06 +0000 (20:25 -0700)]
Merge tag 'pci-v4.14-fixes-1' of git://git./linux/kernel/git/helgaas/pci

Pull PCI fix from Bjorn Helgaas:
 "Revert an attempt to fix a race while enabling upstream bridges
  because it broke iwlwifi firmware loading"

* tag 'pci-v4.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  Revert "PCI: Avoid race while enabling upstream bridges"