summaryrefslogtreecommitdiff
path: root/drivers/mfd/pm8921-core.c
AgeCommit message (Collapse)Author
2014-06-03mfd: pm8921: Remove pm8xxx API now that sub-devices use regmapStephen Boyd
The pm8xxx read/write wrappers are no longer necessary now that all the sub-device drivers are using the regmap API. Remove it. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19mfd: pm8921: Fixup probe() error path when irq invalidJosh Cartwright
platform_get_irq() returns a negative error code when an IRQ is invalid or unspecified. Make 'irq' signed to properly handle this. Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Josh Cartwright <joshc@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19mfd: pm8921: Use IRQCHIP_SKIP_SET_WAKEStephen Boyd
We don't need to implement a dummy irq_set_wake op if we just set IRQCHIP_SKIP_SET_WAKE. Suggested-by: Josh Cartwright <joshc@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19mfd: pm8921: Drop irq_set_lockdep_class() codeStephen Boyd
This isn't necessary as we aren't setting the summary interrupt to wake up the system in the irq_wake() callback. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19mfd: pm8921: Add DT match tableStephen Boyd
Allow this driver to probe based on devicetree. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19mfd: pm8921: Use ssbi regmapStephen Boyd
Use a regmap so that the pm8xxx read/write APIs can be removed once all consumer drivers are converted. Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19mfd: pm8921: Migrate to irqdomainsStephen Boyd
Convert this driver to use irqdomains so that the PMIC's child devices can be converted to devicetree. Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2014-03-19mfd: pm8921: Update for genirq changesStephen Boyd
Since this code has been marked broken for some time a few genirq tree wide changes weren't made. set_irq_wake() was renamed to irq_set_irq_wake() in commit a0cd9ca2b (genirq: Namespace cleanup, 2011-02-10) and commit 10a8c383 (irq: introduce entry and exit functions for chained handlers) introduced the chained irq functions but this driver wasn't updated to use them. Fix these problems and remove the BROKEN marking on this driver. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19mfd: pm8xxx: Move pm8xxx-irq.c contents into only driver that uses itStephen Boyd
The pm8xxx-irq.c code is practically mandatory given that the pm8921-core driver will WARN about it missing and the Kconfig marks it as default y when a PM8xxx chips is enabled. The only reason the file was split out was because we planned to support other pm8xxx chips with different pm8xxx-core.c files. Now that we have DT on ARM this isn't necessary because we should be able to support all the ssbi based PM8xxx chips in one driver and one file with no data bloat. Let's move this code into the only driver that uses it right now (pm8921) so that it's always compiled when needed. In the future we can rename pm8921-core.c to something more generic. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-11-11mfd: pm8921: Potential NULL dereference in pm8921_remove()Dan Carpenter
We assume that "pmic" could be NULL and then dereference it two lines later. I fix this by moving the dereference inside the NULL check. Fixes: c013f0a56c56 ('mfd: Add pm8xxx irq support') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20mfd: pm8921: Use devm_*() functionsJingoo Han
Use devm_*() functions to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20mfd: pm8921: Remove unnecessary platform_set_drvdata()Jingoo Han
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20mfd: pm8921: Include missing linux/module.hJingoo Han
Include <linux/module.h> in order to fix the following errors. drivers/mfd/pm8921-core.c:209:16: error: expected declaration specifiers or '...' before string constant drivers/mfd/pm8921-core.c:210:20: error: expected declaration specifiers or '...' before string constant drivers/mfd/pm8921-core.c:211:16: error: expected declaration specifiers or '...' before string constant drivers/mfd/pm8921-core.c:212:14: error: expected declaration specifiers or '...' before string constant Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-07-31mfd: Use dev_get_platdata()Jingoo Han
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.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>
2012-11-28mfd: remove use of __devexitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28mfd: remove use of __devinitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28mfd: remove use of __devexit_pBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-05-26mfd: Add pm8xxx irq supportAbhijeet Dharmapurikar
Add support for the irq controller in Qualcomm 8xxx pmic. The 8xxx interrupt controller provides control for gpio and mpp configured as interrupts in addition to other subdevice interrupts. The interrupt controller also provides a way to read the real time status of an interrupt. This real time status is the only way one can get the input values of gpio and mpp lines. Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26mfd: Add Qualcomm PMIC 8921 core driverAbhijeet Dharmapurikar
Add support for the Qualcomm PM8921 PMIC chip. The core driver will communicate with the PMIC chip via the MSM SSBI bus. Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>