summaryrefslogtreecommitdiffstats
path: root/drivers/ssbi
AgeCommit message (Collapse)Author
2013-06-14Merge tag 'msm-cleanup-for-3.11' of ↵Olof Johansson
git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm into next/cleanup From David Brown: Cleanups for MSM for 3.11 These are a handful of cleanups to the MSM tree. The gpio cleanups get us closer to having proper pinmux and gpio support. * tag 'msm-cleanup-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm: mfd: ssbi: Use devm_* and simplify code gpio: msm: Add device tree and irqdomain support for gpio-msm-v2 ARM: msm: Remove gpiomux-v2 and re-organize MSM_GPIOMUX configs msm: iomap: Remove unused bases and mappings msm: Remove unused file core.h ARM: msm: Remove init_irq declaration in machine description Signed-off-by: Olof Johansson <olof@lixom.net> Conflicts: arch/arm/boot/dts/msm8660-surf.dts arch/arm/boot/dts/msm8960-cdp.dts
2013-06-12mfd: ssbi: Use devm_* and simplify codeStephen Boyd
Use devm_ioremap_resource and devm_kzalloc to simplify error paths and reduce lines of code. Also use dev_err() to keep consistency and drop the .remove function because the devm functions take care of what it's doing besides the now obsolete platform_set_drvdata() which we can just drop. Finally, use module_platform_driver() to save some more lines. Cc: David Brown <davidb@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David Brown <davidb@codeaurora.org>
2013-06-12mfd: ssbi: Add MODULE_DEVICE_TABLEStephen Boyd
This allows the ssbi module to be autoloaded on boot. Cc: David Brown <davidb@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David Brown <davidb@codeaurora.org>
2013-03-25SSBI: Remove MSM_ prefix from SSBI driversDavid Brown
Although the SSBI sub is currently only used on MSM SoCs, it is still a bus in its own right. Remove this msm_ prefix from the driver and it's symbols. Clients can now refer directly to ssbi_write() and ssbi_read(). Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25ssbi: Remove extraneous loggingDavid Brown
Remove some unhelpful error logs. This also removes the necessity of having a pointer back to the struct device within the ssbi-specific structure Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25ssbi: Use regular init levelDavid Brown
With device tree, and deferred probe, it is no longer necessary to make sure that the ssbi bus driver is initialized very early. Restore to a regular module_init(). Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25ssbi: Comment the use of udelay()David Brown
The ssbi driver uses a busywait loop to read its status register. Add a comment explaining the timing of the device itself so that future developers can better understand this delay, and possibly diagnose any problems. Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25SSBI: Convert SSBI to device treeDavid Brown
The SSBI bus is exclusive to the Qualcomm MSM targets, and all SoCs using it will be using device tree. Convert this driver to indentify with device tree. This makes the bus probing a good bit simpler, since the attaching of child nodes can be represented directly in the devicetree, rather than having to be inferred by name. Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25ssbi: Allow compilation as a moduleDavid Brown
The ssbi driver's read/write entry points are protected with wrappers in the case when the driver isn't enabled. These wrappers don't make any sense, since a client of the SSBI bus won't work without it. Make these just regular functions, so that the SSBI driver can be built as a module. Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25ssbi: Fix exit mismatch in remove functionDavid Brown
msm_ssbi_remove is referenced with __exit_p, but not declared with __exit. This causes a warning when the driver is not built as a module: drivers/ssbi/ssbi.c:341:23: warning: 'msm_ssbi_remove' defined but not used [-Wunused-function] The remove is needed for unbinding to work, even if not compiled as a module, so just remove it. Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25fix: Use EXPORT_SYMBOL_GPLDavid Brown
Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25add single-wire serial bus interface (SSBI) driverKenneth Heitke
SSBI is the Qualcomm single-wire serial bus interface used to connect the MSM devices to the PMIC and other devices. Since SSBI only supports a single slave, the driver gets the name of the slave device passed in from the board file through the master device's platform data. SSBI registers pretty early (postcore), so that the PMIC can come up before the board init. This is useful if the board init requires the use of gpios that are connected through the PMIC. Based on a patch by Dima Zavin <dima@android.com> that can be found at: http://android.git.kernel.org/?p=kernel/msm.git;a=commitdiff;h=eb060bac4 This patch adds PMIC Arbiter support for the MSM8660. The PMIC Arbiter is a hardware wrapper around the SSBI 2.0 controller that is designed to overcome concurrency issues and security limitations. A controller_type field is added to the platform data to specify the type of the SSBI controller (1.0, 2.0, or PMIC Arbiter). [davidb@codeaurora.org: I've moved this driver into drivers/ssbi/ and added an include for linux/module.h so that it will compile] Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org> Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>