Commit Graph

5 Commits

Author SHA1 Message Date
Laurent Pinchart 973931ae0a sh-pfc: Support passing resources through platform device
Resources should be passed through the platform device, not through
platform data. Default to platform device resources and fall back to
platform data resources if not available.

Support for platform data resources will be removed when arch code will
be converted.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-01-25 09:24:22 +09:00
Laurent Pinchart 4aeacd5bd5 sh-pfc: Use sh_pfc_ namespace prefix through the whole driver
Most of the function and structure names are prefixed by sh_pfc_. Fix
the ones that are not to avoid namespace clashes (especially for
functions that start with gpio_).

Not included in this patch are the platform data structures, those will
be reworked later.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-01-25 09:24:22 +09:00
Laurent Pinchart c6193eacda sh-pfc: Move platform device and driver to the core
The pinctrl module registers both a platform device and a platform
driver. The only purpose of this awkward construction is to have a
device to pass to the pinctrl registration function.

As a first step to get rid of this hack, move the platform device and
driver from the pinctrl module to the core. The platform device will
then be moved to arch code.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-01-25 09:24:21 +09:00
Laurent Pinchart 6f6a4a683b sh-pfc: Merge PFC core and gpio
The PFC core calls the gpio module gpiochip registration in its
register_sh_pfc() function, itself called at arch initialization time.
If the gpio module isn't present then the gpiochip will never be
registered.

As the gpio module can only be present at arch initialization time if
it's builtin, there's no point in allowing to build it as a module. Make
it a boolean option, and initialize it synchronously with the core if
selected.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-01-25 09:24:21 +09:00
Laurent Pinchart f9165132c5 sh-pfc: Move private definitions and declarations to private header
Move all private structure definitions and function declarations from
include/linux/sh_pfc.h to drivers/sh/pfc/core.h.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-01-25 09:24:20 +09:00