summaryrefslogtreecommitdiff
path: root/include/linux/qpnp
diff options
context:
space:
mode:
authorAbhijeet Dharmapurikar <adharmap@codeaurora.org>2016-01-22 15:30:57 -0800
committerRohit Vaswani <rvaswani@codeaurora.org>2016-03-01 12:22:33 -0800
commit0c98f90e2e5d7abd362645ffc07b106731609969 (patch)
tree556e2e5c1524f71df3d1d97d7bdb8d19a7c6bea2 /include/linux/qpnp
parent065fd87ad33b0b00dcbce1ce8880590492aec658 (diff)
spmi_devices: change to platform_devices
Change to using upstream spmi bus architecture. All the spmi devices, marked by spmi-dev-container, become platform devices. spmi-slave-container devices become spmi_devices each representing a slave. The read/write functions use regmap api's instead of calls to spmi_ext_register_read/write() implemented by the spmi bus. This regmap is instantiated per slave. The spmi bus helper functions like spmi_get_irq get changed to their platform bus equivalents. Change Kconfig files include * Remove dependence on OF_SPMI, MSM_QPNP_INT * There were few places where an earlier commit dcc2aedc80746acee589e4b47d3e6adf5d3ec253 missed adding dependence on SPMI along with MSM_SPMI. Fix them. * Add depends on ARCH_MSM. ARCH_MSM is used for internal builds. Change the nodes in DTSI files to confirm to the modified drivers. Update their binding docs to drop spmi-dev-container and spmi-slave-container; Finally update defconfig to use upstream SPMI. Change-Id: Ic85bff27c09c84b152cb38acbc3cadd05c0ec57a Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Diffstat (limited to 'include/linux/qpnp')
-rw-r--r--include/linux/qpnp/qpnp-adc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/qpnp/qpnp-adc.h b/include/linux/qpnp/qpnp-adc.h
index 63bbbd69a94a..d7bdb2cce396 100644
--- a/include/linux/qpnp/qpnp-adc.h
+++ b/include/linux/qpnp/qpnp-adc.h
@@ -1213,7 +1213,8 @@ struct qpnp_iadc_result {
* @calib - Internal rsens calibration values for gain and offset.
*/
struct qpnp_adc_drv {
- struct spmi_device *spmi;
+ struct platform_device *pdev;
+ struct regmap *regmap;
uint8_t slave;
uint16_t offset;
struct qpnp_adc_properties *adc_prop;
@@ -1315,7 +1316,7 @@ int32_t qpnp_vadc_conv_seq_request(struct qpnp_vadc_chip *dev,
* @spmi: spmi ADC device.
* @adc_qpnp: spmi device tree node structure
*/
-int32_t qpnp_adc_get_devicetree_data(struct spmi_device *spmi,
+int32_t qpnp_adc_get_devicetree_data(struct platform_device *pdev,
struct qpnp_adc_drv *adc_qpnp);
/**