Qualcomm family A RPM driver and example client
Subsystems (3)
cover Qualcomm family A RPM driver and example client
To be used for reference in the design discussion related to RPM driver implementation for family A.
Regulator driver is a not even close to the shape it should be, but shows a user of the api. Instead of having every regulator exposed as it's own compatible, I would now have it take a resource id as reg and just be compatible with the specific resource consumer.
The difference with Josh's proposal is the mapping table in msm_rpm.c, that makes the rpm driver expose logical resources and therefor hides the details of the rpm communication from its clients. This gives, in my mind, a cleaner abstraction and api.
Bjorn Andersson (2):
mfd: msm_rpm: Initial driver for the Qualcomm RPM
regulator: msm_rpm: Initial regulator driver for Qualcomm RPM
drivers/mfd/Kconfig | 7 + drivers/mfd/Makefile | 1 + drivers/mfd/msm_rpm-8064.h | 420 +++++++++++++++++++++++++++ drivers/mfd/msm_rpm-8960.h | 400 ++++++++++++++++++++++++++ drivers/mfd/msm_rpm.c | 525 ++++++++++++++++++++++++++++++++++ drivers/regulator/Kconfig | 7 + drivers/regulator/Makefile | 1 + drivers/regulator/msm_rpm-regulator.c | 467 ++++++++++++++++++++++++++++++ include/linux/mfd/msm_rpm.h | 87 ++++++ 9 files changed, 1915 insertions(+) create mode 100644 drivers/mfd/msm_rpm-8064.h create mode 100644 drivers/mfd/msm_rpm-8960.h create mode 100644 drivers/mfd/msm_rpm.c create mode 100644 drivers/regulator/msm_rpm-regulator.c create mode 100644 include/linux/mfd/msm_rpm.h
Signature · 1 line
1.8.2.2
RFC 1/2 mfd: msm_rpm: Initial driver for the Qualcomm RPM
--- drivers/mfd/Kconfig | 7 + drivers/mfd/Makefile | 1 + drivers/mfd/msm_rpm-8064.h | 420 +++++++++++++++++++++++++++++++++++ drivers/mfd/msm_rpm-8960.h | 400 +++++++++++++++++++++++++++++++++ drivers/mfd/msm_rpm.c | 525 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/msm_rpm.h | 87 ++++++++ 6 files changed, 1440 insertions(+) create mode 100644 drivers/mfd/msm_rpm-8064.h create mode 100644 drivers/mfd/msm_rpm-8960.h create mode 100644 drivers/mfd/msm_rpm.c create mode 100644 include/linux/mfd/msm_rpm.h
drivers/mfd/Kconfig +7 -0
@@ -468,6 +468,13 @@ config UCB1400_CORE To compile this driver as a module, choose M here: the module will be called ucb1400_core. +config MFD_MSM_RPM + tristate "Qualcomm RPM" + depends on ARCH_MSM + select MFD_CORE + help + Select this option to enable the Qualcomm RPM driver. + config MFD_PM8XXX tristate
drivers/mfd/Makefile +1 -0
@@ -149,6 +149,7 @@ obj-$(CONFIG_MFD_SI476X_CORE) += si476x-core.o obj-$(CONFIG_MFD_CS5535) += cs5535-mfd.o obj-$(CONFIG_MFD_OMAP_USB_HOST) += omap-usb-host.o omap-usb-tll.o +obj-$(CONFIG_MFD_MSM_RPM) += msm_rpm.o obj-$(CONFIG_MFD_PM8921_CORE) += pm8921-core.o ssbi.o obj-$(CONFIG_MFD_PM8XXX_IRQ) += pm8xxx-irq.o obj-$(CONFIG_TPS65911_COMPARATOR) += tps65911-comparator.o
drivers/mfd/msm_rpm-8064.h new file +420 -0
420 lines not on this page · raw message
drivers/mfd/msm_rpm-8960.h new file +400 -0
400 lines not on this page · raw message
drivers/mfd/msm_rpm.c new file +525 -0
525 lines not on this page · raw message
include/linux/mfd/msm_rpm.h new file +87 -0
87 lines not on this page · raw message
Signature · 1 line
1.8.2.2
RFC 2/2 regulator: msm_rpm: Initial regulator driver for Qualcomm RPM
In reply to Bjorn AnderssonInitial regulator driver for ldos on the pm8921 controlled by RPM.
--- drivers/regulator/Kconfig | 7 + drivers/regulator/Makefile | 1 + drivers/regulator/msm_rpm-regulator.c | 467 ++++++++++++++++++++++++++++++++++ 3 files changed, 475 insertions(+) create mode 100644 drivers/regulator/msm_rpm-regulator.c
drivers/regulator/Kconfig +7 -0
@@ -372,6 +372,13 @@ config REGULATOR_MC13892 Say y here to support the regulators found on the Freescale MC13892 PMIC. +config REGULATOR_MSM_RPM + tristate "Qualcomm RPM regulator driver" + depends on MFD_MSM_RPM + help + This driver provides support for regulators controlled by the + Qualcomm RPM. + config REGULATOR_PALMAS tristate "TI Palmas PMIC Regulators" depends on MFD_PALMAS
drivers/regulator/Makefile +1 -0
@@ -51,6 +51,7 @@ obj-$(CONFIG_REGULATOR_MAX77693) += max77693.o obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o +obj-$(CONFIG_REGULATOR_MSM_RPM) += msm_rpm-regulator.o obj-$(CONFIG_REGULATOR_PALMAS) += palmas-regulator.o obj-$(CONFIG_REGULATOR_PFUZE100) += pfuze100-regulator.o obj-$(CONFIG_REGULATOR_TPS51632) += tps51632-regulator.o
drivers/regulator/msm_rpm-regulator.c new file +467 -0
467 lines not on this page · raw message
Signature · 1 line
1.8.2.2