Created
April 1, 2015 00:13
-
-
Save invisiblek/c73419b0cd77b0884e51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/drivers/thermal/qpnp-adc-tm.c b/drivers/thermal/qpnp-adc-tm.c | |
index eb647fa..8a3f6a3 100644 | |
--- a/drivers/thermal/qpnp-adc-tm.c | |
+++ b/drivers/thermal/qpnp-adc-tm.c | |
@@ -209,6 +209,7 @@ struct qpnp_adc_tm_chip { | |
struct work_struct trigger_high_thr_work; | |
struct work_struct trigger_low_thr_work; | |
struct qpnp_adc_tm_sensor sensor[0]; | |
+ bool usb_id_ext_pull_up; | |
}; | |
LIST_HEAD(qpnp_adc_tm_device_list); | |
@@ -1795,7 +1796,11 @@ EXPORT_SYMBOL(qpnp_adc_tm_disable_chan_meas); | |
int32_t qpnp_adc_tm_usbid_configure(struct qpnp_adc_tm_chip *chip, | |
struct qpnp_adc_tm_btm_param *param) | |
{ | |
- param->channel = LR_MUX10_PU2_AMUX_USB_ID_LV; | |
+ if (chip->usb_id_ext_pull_up) | |
+ param->channel = LR_MUX10_USB_ID_LV; | |
+ else | |
+ param->channel = LR_MUX10_PU2_AMUX_USB_ID_LV; | |
+ | |
return qpnp_adc_tm_channel_measure(chip, param); | |
} | |
EXPORT_SYMBOL(qpnp_adc_tm_usbid_configure); | |
@@ -1988,6 +1993,9 @@ static int __devinit qpnp_adc_tm_probe(struct spmi_device *spmi) | |
goto fail; | |
} | |
+ chip->usb_id_ext_pull_up = of_property_read_bool(node, | |
+ "usb-id-ext-pull-up"); | |
+ | |
rc = devm_request_irq(&spmi->dev, chip->adc->adc_high_thr_irq, | |
qpnp_adc_tm_high_thr_isr, | |
IRQF_TRIGGER_RISING, "qpnp_adc_tm_high_interrupt", chip); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment