pwm: Refactor Qualcomm pwm driver to support upstream pwm framework
Linux 3.10 version includes generic PWM framework support, therefore update the existing Qualcomm PWM drivers to use the framework. Rename the qpnp-pwm driver to align with upstream pwm file nomenclature. Also, revert the pwm header back to linux 3.10. The changes to the pwm drivers are backward compatible so that they do not break existing clients. Subsequent patches should include changes to both PWM drivers and their clients so that usage of deprecated APIs (i.e. pwm_request) can be removed. Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
This commit is contained in:
parent
2f2e2da130
commit
5f8d9ac84f
|
@ -437,13 +437,14 @@ CONFIG_SPS=y
|
|||
CONFIG_USB_BAM=y
|
||||
CONFIG_SPS_SUPPORT_BAMDMA=y
|
||||
CONFIG_SPS_SUPPORT_NDP_BAM=y
|
||||
CONFIG_QPNP_PWM=y
|
||||
CONFIG_QPNP_POWER_ON=y
|
||||
CONFIG_QPNP_CLKDIV=y
|
||||
CONFIG_QPNP_REVID=y
|
||||
CONFIG_QPNP_COINCELL=y
|
||||
CONFIG_MSM_IOMMU_V1=y
|
||||
CONFIG_IOMMU_PGTABLES_L2=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_QPNP=y
|
||||
CONFIG_MOBICORE_SUPPORT=m
|
||||
CONFIG_MOBICORE_API=m
|
||||
CONFIG_BIF=y
|
||||
|
|
|
@ -443,7 +443,6 @@ CONFIG_SPS=y
|
|||
CONFIG_USB_BAM=y
|
||||
CONFIG_SPS_SUPPORT_BAMDMA=y
|
||||
CONFIG_SPS_SUPPORT_NDP_BAM=y
|
||||
CONFIG_QPNP_PWM=y
|
||||
CONFIG_QPNP_POWER_ON=y
|
||||
CONFIG_QPNP_CLKDIV=y
|
||||
CONFIG_QPNP_REVID=y
|
||||
|
@ -451,6 +450,8 @@ CONFIG_QPNP_COINCELL=y
|
|||
CONFIG_MSM_IOMMU_V1=y
|
||||
CONFIG_MSM_IOMMU_PMON=y
|
||||
CONFIG_IOMMU_PGTABLES_L2=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_QPNP=y
|
||||
CONFIG_MOBICORE_SUPPORT=m
|
||||
CONFIG_MOBICORE_API=m
|
||||
CONFIG_CORESIGHT=y
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -46,16 +46,6 @@ config SPS_SUPPORT_NDP_BAM
|
|||
help
|
||||
No-Data-Path BAM is used to improve BAM performance.
|
||||
|
||||
config QPNP_PWM
|
||||
depends on SPMI
|
||||
depends on OF_SPMI
|
||||
tristate "Qualcomm QPNP LPG/PWM support"
|
||||
help
|
||||
This driver supports PWM/LPG devices in Qualcomm PMIC chips which
|
||||
comply with QPNP. QPNP is a SPMI based PMIC implementation. These
|
||||
devices support Pulse Width Modulation output with user generated
|
||||
patterns. They share a lookup table with size of 64 entries.
|
||||
|
||||
config QPNP_POWER_ON
|
||||
tristate "QPNP PMIC POWER-ON Driver"
|
||||
depends on OF_SPMI && SPMI && MSM_QPNP_INT
|
||||
|
|
|
@ -9,7 +9,6 @@ obj-$(CONFIG_MSM_SSBI) += ssbi.o
|
|||
obj-$(CONFIG_USB_BAM) += usb_bam.o
|
||||
obj-$(CONFIG_IPA) += ipa/
|
||||
obj-$(CONFIG_SPS) += sps/
|
||||
obj-$(CONFIG_QPNP_PWM) += qpnp-pwm.o
|
||||
obj-$(CONFIG_QPNP_POWER_ON) += qpnp-power-on.o
|
||||
obj-$(CONFIG_QPNP_VIBRATOR) += qpnp-vibrator.o
|
||||
obj-$(CONFIG_QPNP_CLKDIV) += qpnp-clkdiv.o
|
||||
|
|
|
@ -201,4 +201,13 @@ config PWM_VT8500
|
|||
To compile this driver as a module, choose M here: the module
|
||||
will be called pwm-vt8500.
|
||||
|
||||
config PWM_QPNP
|
||||
depends on SPMI
|
||||
depends on OF_SPMI
|
||||
tristate "Qualcomm QPNP LPG/PWM support"
|
||||
help
|
||||
This driver supports PWM/LPG devices in Qualcomm PMIC chips which
|
||||
comply with QPNP. QPNP is a SPMI based PMIC implementation. These
|
||||
devices support Pulse Width Modulation output with user generated
|
||||
patterns. They share a lookup table with size of 64 entries.
|
||||
endif
|
||||
|
|
|
@ -17,3 +17,4 @@ obj-$(CONFIG_PWM_TIPWMSS) += pwm-tipwmss.o
|
|||
obj-$(CONFIG_PWM_TWL) += pwm-twl.o
|
||||
obj-$(CONFIG_PWM_TWL_LED) += pwm-twl-led.o
|
||||
obj-$(CONFIG_PWM_VT8500) += pwm-vt8500.o
|
||||
obj-$(CONFIG_PWM_QPNP) += pwm-qpnp.o
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -177,16 +177,17 @@ struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
|
|||
struct pwm_device *of_pwm_xlate_with_flags(struct pwm_chip *pc,
|
||||
const struct of_phandle_args *args);
|
||||
|
||||
struct pwm_device *pwm_get(struct device *dev, const char *con_id);
|
||||
struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id);
|
||||
void pwm_put(struct pwm_device *pwm);
|
||||
|
||||
struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id);
|
||||
struct pwm_device *devm_pwm_get(struct device *dev, const char *consumer);
|
||||
struct pwm_device *devm_of_pwm_get(struct device *dev, struct device_node *np,
|
||||
const char *con_id);
|
||||
void devm_pwm_put(struct device *dev, struct pwm_device *pwm);
|
||||
|
||||
bool pwm_can_sleep(struct pwm_device *pwm);
|
||||
struct pwm_device *pwm_get(struct device *dev, const char *consumer);
|
||||
|
||||
#else
|
||||
static inline int pwm_set_chip_data(struct pwm_device *pwm, void *data)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue