hwmon: qpnp-adc: Update regulator api
"This snapshot is taken as of msm-3.18 commit dbdb6776f (Merge "msm: camera: Add dummy sub module in sensor pipeline") Use regulator_set_load() to specify the load required while issuing VADC requests on the VADC LDO and fixup compilation for qpnp_vadc_read() from thermal sysfs. Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
This commit is contained in:
parent
e38a985cba
commit
99c91673ce
2 changed files with 2 additions and 6 deletions
|
@ -29,7 +29,6 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/qpnp/qpnp-adc.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#define KELVINMIL_DEGMIL 273160
|
||||
#define QPNP_VADC_LDO_VOLTAGE_MIN 1800000
|
||||
|
@ -1966,8 +1965,7 @@ int32_t qpnp_adc_get_devicetree_data(struct platform_device *pdev,
|
|||
return rc;
|
||||
}
|
||||
|
||||
rc = regulator_set_optimum_mode(adc_qpnp->hkadc_ldo,
|
||||
100000);
|
||||
rc = regulator_set_load(adc_qpnp->hkadc_ldo, 100000);
|
||||
if (rc < 0) {
|
||||
pr_err("hkadc_ldo optimum mode failed%d\n", rc);
|
||||
return rc;
|
||||
|
|
|
@ -227,7 +227,6 @@ static int32_t qpnp_vadc_read_reg(struct qpnp_vadc_chip *vadc, int16_t reg,
|
|||
u8 *data, int len)
|
||||
{
|
||||
int rc;
|
||||
uint val;
|
||||
|
||||
rc = regmap_bulk_read(vadc->adc->regmap,
|
||||
(vadc->adc->offset + reg), data, len);
|
||||
|
@ -235,7 +234,6 @@ static int32_t qpnp_vadc_read_reg(struct qpnp_vadc_chip *vadc, int16_t reg,
|
|||
pr_err("qpnp adc read reg %d failed with %d\n", reg, rc);
|
||||
return rc;
|
||||
}
|
||||
*data = (u8)val;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2470,7 +2468,7 @@ hwmon_err_sens:
|
|||
}
|
||||
|
||||
static int qpnp_vadc_get_temp(struct thermal_zone_device *thermal,
|
||||
unsigned long *temp)
|
||||
int *temp)
|
||||
{
|
||||
struct qpnp_vadc_thermal_data *vadc_therm = thermal->devdata;
|
||||
struct qpnp_vadc_chip *vadc = vadc_therm->vadc_dev;
|
||||
|
|
Loading…
Add table
Reference in a new issue