mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
sx933x: Add usb detect cal to odin
Add re-calibration on usb attach/remove feature to odin and fix it for the 4.14 kernel. Change-Id: Ib5afce222155e268bd9cf58026effca9dae8cd07 Signed-off-by: Ryan Lattrel <ryanl@motorola.com> Reviewed-on: https://gerrit.mot.com/1267723 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Kenneth Kessler <kennykessler@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
a71ae53ea8
commit
8ff2762f44
2 changed files with 8 additions and 0 deletions
|
|
@ -6,6 +6,10 @@ ifneq (,$(filter river%,$(TARGET_PRODUCT)))
|
|||
EXTRA_CFLAGS += -DCONFIG_CAPSENSE_USB_CAL
|
||||
endif
|
||||
|
||||
ifneq (,$(filter odin%,$(TARGET_PRODUCT)))
|
||||
EXTRA_CFLAGS += -DCONFIG_CAPSENSE_USB_CAL
|
||||
endif
|
||||
|
||||
KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../sensors/Module.symvers
|
||||
|
||||
sx932x_sar-y := sx933x_sar.o
|
||||
|
|
|
|||
|
|
@ -817,7 +817,11 @@ static int ps_notify_callback(struct notifier_block *self,
|
|||
bool present;
|
||||
int retval;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
|
||||
if (event == PSY_EVENT_PROP_CHANGED
|
||||
#else
|
||||
if ((event == PSY_EVENT_PROP_ADDED || event == PSY_EVENT_PROP_CHANGED)
|
||||
#endif
|
||||
&& psy && psy->desc->get_property && psy->desc->name &&
|
||||
!strncmp(psy->desc->name, "usb", sizeof("usb")) && data) {
|
||||
LOG_INFO("ps notification: event = %lu\n", event);
|
||||
|
|
|
|||
Loading…
Reference in a new issue