summaryrefslogtreecommitdiff
path: root/drivers/sh
AgeCommit message (Collapse)AuthorFilesLines
2013-06-28Merge branch 'pm-assorted'Rafael J. Wysocki1-1/+1
* pm-assorted: PM / QoS: Add pm_qos and dev_pm_qos to events-power.txt PM / QoS: Add dev_pm_qos_request tracepoints PM / QoS: Add pm_qos_request tracepoints PM / QoS: Add pm_qos_update_target/flags tracepoints PM / QoS: Update Documentation/power/pm_qos_interface.txt PM / Sleep: Print last wakeup source on failed wakeup_count write PM / QoS: correct the valid range of pm_qos_class PM / wakeup: Adjust messaging for wake events during suspend PM / Runtime: Update .runtime_idle() callback documentation PM / Runtime: Rework the "runtime idle" helper routine PM / Hibernate: print physical addresses consistently with other parts of kernel
2013-06-04cpufreq: rename index as driver_data in cpufreq_frequency_tableViresh Kumar1-2/+2
The "index" field of struct cpufreq_frequency_table was never an index and isn't used at all by the cpufreq core. It only is useful for cpufreq drivers for their internal purposes. Many people nowadays blindly set it in ascending order with the assumption that the core will use it, which is a mistake. Rename it to "driver_data" as that's what its purpose is. All of its users are updated accordingly. [rjw: Changelog] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-06-03PM / Runtime: Rework the "runtime idle" helper routineRafael J. Wysocki1-1/+1
The "runtime idle" helper routine, rpm_idle(), currently ignores return values from .runtime_idle() callbacks executed by it. However, it turns out that many subsystems use pm_generic_runtime_idle() which checks the return value of the driver's callback and executes pm_runtime_suspend() for the device unless that value is not 0. If that logic is moved to rpm_idle() instead, pm_generic_runtime_idle() can be dropped and its users will not need any .runtime_idle() callbacks any more. Moreover, the PCI, SCSI, and SATA subsystems' .runtime_idle() routines, pci_pm_runtime_idle(), scsi_runtime_idle(), and ata_port_runtime_idle(), respectively, as well as a few drivers' ones may be simplified if rpm_idle() calls rpm_suspend() after 0 has been returned by the .runtime_idle() callback executed by it. To reduce overall code bloat, make the changes described above. Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Tested-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Kevin Hilman <khilman@linaro.org> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Alan Stern <stern@rowland.harvard.edu>
2013-01-29Merge branch 'pfc' of ↵Olof Johansson7-1370/+0
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/sh-pinmux From Simon Horman. Based on agreement between me, Paul Mundt, Linus Walleij and Simon, we're mergning this large branch of pinctrl conversion through arm-soc, even though it contains the corresponding conversions for arch/sh. Main reason for this is tight dependencies (that will now mostly be broken) between the arch/sh and mach-shmobile implementations. There will be more of this in 3.10 to do device-tree bindings, but this is the initial conversion. * 'pfc' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (80 commits) sh-pfc: Move sh_pfc.h from include/linux/ to driver directory sh-pfc: Remove pinmux_info definition sh: Remove unused sh_pfc_register_info() function sh: shx3: pinmux: Use driver-provided pinmux info sh: sh7786: pinmux: Use driver-provided pinmux info sh: sh7785: pinmux: Use driver-provided pinmux info sh: sh7757: pinmux: Use driver-provided pinmux info sh: sh7734: pinmux: Use driver-provided pinmux info sh: sh7724: pinmux: Use driver-provided pinmux info sh: sh7723: pinmux: Use driver-provided pinmux info sh: sh7722: pinmux: Use driver-provided pinmux info sh: sh7720: pinmux: Use driver-provided pinmux info sh: sh7269: pinmux: Use driver-provided pinmux info sh: sh7264: pinmux: Use driver-provided pinmux info sh: sh7203: pinmux: Use driver-provided pinmux info ARM: shmobile: sh73a0: Use driver-provided pinmux info ARM: shmobile: sh7372: Use driver-provided pinmux info ARM: shmobile: r8a7779: Use driver-provided pinmux info ARM: shmobile: r8a7740: Use driver-provided pinmux info sh-pfc: Add shx3 pinmux support ... Signed-off-by: Olof Johansson <olof@lixom.net>
2013-01-25sh-pfc: Move driver from drivers/sh/ to drivers/pinctrl/Laurent Pinchart8-1308/+0
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-25sh-pfc: Remove unused resource and num_resources platform data fieldsLaurent Pinchart1-13/+4
The fields are now unused, remove them. 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-25sh-pfc: Remove platform device registrationLaurent Pinchart1-12/+0
The PFC platform device is now registered by arch code, remove the legacy registration mechanism. 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-25sh-pfc: Support passing resources through platform deviceLaurent Pinchart2-7/+21
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-25sh-pfc: Split platform device and platform driver registrationLaurent Pinchart1-9/+6
Move platform driver registration to a static postcore initcall. This prepares the move of platform device registration 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-25sh-pfc: Use sh_pfc_ namespace prefix through the whole driverLaurent Pinchart2-56/+55
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-25sh-pfc: Sort headers alphabeticallyLaurent Pinchart3-15/+15
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-25sh-pfc: Remove check for impossible error conditionLaurent Pinchart1-2/+2
The pfc pointer can't be NULL in the get and set value functions, remove the error check. 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-25sh-pfc: Let the compiler decide whether to inline functionsLaurent Pinchart1-5/+3
The compiler should be smart enough to automatically inline static functions that are called from a single location. 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-25sh-pfc: Use devm_ioremap_nocache()Laurent Pinchart1-21/+4
Replace probe-time ioremap_nocache() call with devm_ioremap_nocache() and get rid of the corresponding iounmap() call. 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-25sh-pfc: Use devm_kzalloc()Laurent Pinchart3-40/+19
Replace probe-time kmalloc()/kzalloc() calls with devm_kzalloc() and get rid of the corresponding kfree() calls. 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-25sh-pfc: Move platform device and driver to the coreLaurent Pinchart4-94/+114
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-25sh-pfc: Merge PFC core and gpioLaurent Pinchart5-87/+25
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-25sh-pfc: Merge PFC core and pinctrlLaurent Pinchart4-25/+7
The PFC core is only used by the pinctrl and gpio modules. As the gpio module depends on the pinctrl module, the pinctrl module will always be present if the core gets used. There is thus no point in keeping core and pinctrl in two seperate modules. Merge them. 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-25sh-pfc: Move private definitions and declarations to private headerLaurent Pinchart4-0/+50
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-25sh-pfc: Split platform data from the sh_pfc structureLaurent Pinchart3-68/+67
Create a sh_pfc_platform_data structure to store platform data and reference it from the core sh_pfc structure. 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-11sh: clkfwk: bugfix: sh_clk_div_enable() care sh_clk_div_set_rate() if div6Kuninori Morimoto1-0/+6
764f4e4e33d18cde4dcaf8a0d860b749c6d6d08b (sh: clkfwk: Use shared sh_clk_div_enable/disable()) shared enable/disable funcions for div4/div6. But new sh_clk_div_enable() didn't care sh_clk_div_set_rate() which is required on div6 clock. This patch fixes it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2013-01-04Drivers: misc: remove __dev* attributes.Greg Kroah-Hartman2-14/+12
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13Merge branch 'soc4' of ↵Arnd Bergmann1-1/+0
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc2 Its a little embarrassing, but they all fix problems introduced in previous pull-requests for 3.8 that have been merged. * The three Revert patches back-out secondary CPU initialisation changes from Bastian Hecht which he as advised me are incorrect and break secondary CPU initialisation. * The clkfwk patch from Morimoto-san resolves a build warning. * 'soc4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: sh: clkfwk: fixup unsed variable warning Revert "ARM: shmobile: r8a7779: Replace modify_scu_cpu_psr with scu_power_mode" Revert "ARM: shmobile: sh73a0: Replace modify_scu_cpu_psr with scu_power_mode" Revert "ARM: shmobile: emev2: Replace modify_scu_cpu_psr with scu_power_mode" Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-11-13sh: clkfwk: fixup unsed variable warningKuninori Morimoto1-1/+0
This patch solves above warning ${LINUX}/drivers/sh/clk/cpg.c:404:6: warning: \ unused variable 'val' [-Wunused-variable] Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2012-11-13Merge branches 'depends/asoc', 'renesas/boards', 'renesas/soc' and ↵Arnd Bergmann1-0/+86
'renesas/soc2' into next/boards2 These are all dependencies for the next set of renesas shmobile board changes. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-11-08sh: clkfwk: add sh_clk_fsidiv_register()Kuninori Morimoto1-0/+86
This patch adds sh_clk_fsidiv_register() to share FSI-DIV clock code Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2012-10-15sh: Fix up more fallout from pointless ARM __iomem churn.Paul Mundt2-20/+29
It was already pointed out how to fix these cases before the offending patches were merged, but unsurprisingly, that didn't happen. As this change is entirely superfluous to begin with, simply shut things up by casting everything away. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-10-02Merge tag 'multiplatform' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM soc multiplatform enablement from Olof Johansson: "This is a pretty significant branch. It's the introduction of the first multiplatform support on ARM, and with this (and the later branch) merged, it is now possible to build one kernel that contains support for highbank, vexpress, mvebu, socfpga, and picoxcell. More platforms will be convered over in the next few releases. Two critical last things had to be done for this to be practical and possible: * Today each platform has its own include directory under mach-<mach>/include/mach/*, and traditionally that is where a lot of driver/platform shared definitions have gone, such as platform data structures. They now need to move out to a common location instead, and this branch moves a large number of those out to include/linux/platform_data. * Each platform used to list the device trees to compile for its boards in mach-<mach>/Makefile.boot. Both of the above changes will mean that there are some merge conflicts to come (and some to resolve here). It's a one-time move and once it settles in, we should be good for quite a while. Sorry for the overhead." Fix conflicts as per Olof. * tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (51 commits) ARM: add v7 multi-platform defconfig ARM: msm: Move core.h contents into common.h ARM: highbank: call highbank_pm_init from .init_machine ARM: dtb: move all dtb targets to common Makefile ARM: spear: move platform_data definitions ARM: samsung: move platform_data definitions ARM: orion: move platform_data definitions ARM: vexpress: convert to multi-platform ARM: initial multiplatform support ARM: mvebu: move armada-370-xp.h in mach dir ARM: vexpress: remove dependency on mach/* headers ARM: picoxcell: remove dependency on mach/* headers ARM: move all dtb targets out of Makefile.boot ARM: picoxcell: move debug macros to include/debug ARM: socfpga: move debug macros to include/debug ARM: mvebu: move debug macros to include/debug ARM: vexpress: move debug macros to include/debug ARM: highbank: move debug macros to include/debug ARM: move debug macros to common location ARM: make mach/gpio.h headers optional ...
2012-09-25sh: pfc: Fix up GPIO mux type reconfig case.Paul Mundt1-0/+2
Some drivers need to switch pin states between GPIO and pin function at runtime, which was inadvertently broken in the pinctrl driver for GPIOs being bound to a specific direction. This fixes up the request path to ensure that previously configured GPIOs don't cause us to inadvertently error out with an unsupported mux on reconfig, which in practice is primarily aimed at trapping pull-up/down users that have yet to be implemented under the new API. Fixes up regressions in the TPU PWM driver, amongst others. Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-09-18sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error pathLaurent Pinchart1-1/+2
The sh_pfc_gpio_request_enable() function acquires a spinlock but fails to release it before returning if the requested mux type is not supported. Fix this. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-09-14ARM: shmobile: move custom gpio functions to sh-gpio.hRob Herring1-0/+1
Move custom shmobile gpio code to a sh-gpio.h to remove the dependency on mach/gpio.h. shmobile always uses gpiolib, so we can remove __GPIOLIB_COMPLEX define from mach/gpio.h. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Magnus Damm <magnus.damm@gmail.com>
2012-08-20sh: intc: Fix up multi-evt irq association.Paul Mundt1-1/+1
In the multi-evt case we were accidentally associating the parent IRQ, fix this up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-08-09sh: intc: Handle domain association for sparseirq pre-allocated vectors.Paul Mundt1-4/+23
Presently it's assumed that the irqdomain code handles the irq_desc allocation for us, but this isn't necessarily the case when we've pre-allocated IRQs via sparseirq. Previously we had a -EEXIST check in the code that attempted to trap these cases and simply update them in-place, but this behaviour was inadvertently lost in the transition to irqdomains. This simply restores the previous behaviour, first attempting to let the irqdomain core fetch the allocation for us, and falling back to an in-place domain association in the extant IRQ case. Fixes up regressions on platforms that pre-allocate legacy IRQs (specifically ARM-based SH-Mobile platforms, as SH stopped pre-allocating vectors some time ago). Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-08-01Merge branch 'common/irqdomain' into sh-latestPaul Mundt5-5/+85
2012-08-01sh: intc: initial irqdomain support.Paul Mundt5-5/+85
Trivial support for irq domains, using either a linear map or radix tree depending on the vector layout. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-08-01sh: pfc: Fix up init ordering mess.Paul Mundt1-17/+15
Commit ca5481c68e9fbcea62bb3c78ae6cccf99ca8fb73 ("sh: pfc: Rudimentary pinctrl-backed GPIO support.") introduced a regression for platforms that were doing early GPIO API calls (from arch_initcall() or earlier), leading to a situation where our two-stage registration logic would trip itself up and we'd -ENODEV out of the pinctrl registration path, resulting in endless -EPROBE_DEFER errors. Further lack of checking any sort of errors from gpio_request() resulted in boot time warnings, tripping on the FLAG_REQUESTED test-and-set in gpio_ensure_requested(). As it turns out there's no particular need to bother with the two-stage registration, as the platform bus is already available at the point that we have to start caring. As such, it's easiest to simply fold these together in to a single init path, the ordering of which is ensured through the platform's mux registration, as usual. Reported-by: Rafael J. Wysocki <rjw@sisk.pl> Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-07-25sh: pfc: Build fix for pinctrl_remove_gpio_range() changes.Paul Mundt1-2/+0
pinctrl_remove_gpio_range() is now handled by the pinctrl core in the unreg path for some reason, so use that instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-07-20Merge branch 'common/pinctrl' into sh-latestPaul Mundt7-150/+619
2012-07-20sh: pfc: pin config get/set support.Paul Mundt2-51/+97
This implements simple support for adjusting the pin config value via the pinctrl API. The pinconf-generic code is abandoned for now until we've got a chance to revamp the pinmux_type state tracking that's needed by legacy code. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-07-20sh: pfc: Prefer DRV_NAME over KBUILD_MODNAME.Paul Mundt1-5/+7
While this code is still being shuffled around the KBUILD_MODNAME value isn't particularly useful, switch to something a bit more useful. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-07-17sh: pfc: pinctrl legacy group support.Paul Mundt1-10/+16
This follows the function support by simply doing 1 pin per group encapsulation in order to keep with legacy behaviour. This will be built on incrementally as SoCs define their own pin groups. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-07-17sh: pfc: Ignore pinmux GPIOs with invalid enum IDs.Paul Mundt1-0/+4
If we encounter invalid entries in the pinmux GPIO range, make sure we've still got a dummy pin definition but don't otherwise map it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-07-17sh: pfc: Export pinctrl binding init symbol.Paul Mundt1-0/+1
symbol_request() requires the registration symbol to be exported, make sure it is. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-07-17sh: pfc: Error out on pinctrl init resolution failure.Paul Mundt1-0/+3
pinctrl support is required for correct operation, failure to locate the init routine is fatal. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-07-11sh: pfc: Make pr_fmt consistent across pfc drivers.Paul Mundt3-3/+3
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-07-11sh: pfc: pinctrl legacy function support.Paul Mundt1-33/+132
This maps out all of the function types to pinctrl function groups. Presently this is restricted to one pin per function to maintain compatability with legacy behaviour. This will be extended as groups are introduced and exiting users migrated. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-07-10sh: pfc: Rudimentary pinctrl-backed GPIO support.Paul Mundt5-131/+437
This begins the migration of the PFC core to the pinctrl subsystem. Initial support is very basic, with the bulk of the implementation simply being nopped out in such a way to allow registration with the pinctrl core to succeed. The gpio chip driver is stripped down considerably now relying purely on pinctrl API calls to manage the bulk of its operations. This provides a basis for further PFC refactoring, including decoupling pin functions from the GPIO API, establishing pin groups, and so forth. These will all be dealt with incrementally so as to introduce as few growing and migratory pains to tree-wide PFC pinmux users today. When the interfaces have been well established and in-tree users have been migrated off of the legacy interfaces it will be possible to strip down the core considerably, leading to eventual drivers/pinctrl rehoming. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-07-10sh: pfc: Shuffle PFC support core.Paul Mundt6-17/+19
This follows the intc/clk changes and shuffles the PFC support code under its own directory. This will facilitate better code sharing, and allow us to trim down the exported interface by quite a margin. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-06-21Merge branch 'common/pfc' into sh-latestPaul Mundt4-271/+435
2012-06-20sh: pfc: Verify pin type encoding size at build time.Paul Mundt1-0/+5
The encoding is tightly packed, and future changes (such as pinconf-generic support) can easily lead to a situation where we violate the encoding constraints and trample data bit/reg bits. This plugs in some sanity checks by way of a BUILD_BUG_ON() to blow up if we fail to fit. Signed-off-by: Paul Mundt <lethal@linux-sh.org>