This is a re-write of the Motorola mdm6600_modem driver.
The usb_serial_generic_* handlers actually cover the USB bulk to serial data
path. So that code disappears.
The USB interrupt data to TIOCMGET ioctl path does not appear to be used by
pppd in userspace, using a temporary BUG_ON() to confirm.
So we end up with very little but a hook to register generic usb-serial
handlers for the MDM6600 vendor id.
I have not spent time testing behavior in low-power-modes, it is likely I will
need to over-ride some of the generic handlers at that point.
Change-Id: I65fdd06c2764416f365995761aa653878c0e393b
Signed-off-by: Nick Pelly <npelly@google.com>
Instead just allow userspace to turn on and off the backlight when
entering suspend. Otherwise we get a race condition on some hardware
where the backlight does not go off.
Change-Id: I81303125ebc0cfa8ef1d135a3681d6dd4d4137d9
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Disable cpcap interrupts at suspend and re-enable at resume, to avoid
processing interrupts while the SPI controller is suspended.
Change-Id: I26676b8ce8983bf5477f169a15d811c474c6f5a4
Signed-off-by: Todd Poynor <toddpoynor@google.com>
moto_flashmdm_attach should also override bulk_out_buffers as
usb-serial expects they have the same size as bulk_out_buffer
Change-Id: I97487fa833ed3dee40a15c485ba8565944d0f9e4
Signed-off-by: Benoit Goby <benoit@android.com>
reset commented out in resume.
reset address pointer to message object.
adjusted wait time after reset upon recommendation from Atmel.
Change-Id: I0dd983ce0545c6ca2e48d4ed06b90d8c1ac1a390
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
This allow's Motorola's mdm6600_modem driver to work with suspend.
Patch provided by Motorola.
mdm6600_modem will shortly be replaced by a re-write, but its useful to commit
this update for easier A/B testing.
Change-Id: I0489f139e59e42ba1b6fb1979cf8b3ea8196a126
Signed-off-by: Nick Pelly <npelly@google.com>
If Stingray is powered up with a charger already attached, the battery
driver would not report charging to the system, even though the battery
was being charged. This charges the DS2781 battery driver to check
if a charger is already present when the driver is probed.
Change-Id: I786e34a4699a545f5a03995db5df457cd7f63773
Signed-off-by: Greg Meiste <w30289@motorola.com>
The device expects the irq to be disabled on resume, enable
it from suspend so enable/disables are balanced.
Change-Id: I62cf633819d8fdb3c5f7c6227f2625cfdecdc6a8
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
Stingray will initially ship with the DS2780 instead of the DS2781
gas gauge. The same DS2781 driver will work, but need to look for
the DS2780 family code.
Change-Id: I6b47f31d6362895839af4922210dba2aee41db42
Signed-off-by: Greg Meiste <w30289@motorola.com>
The current being reported by the DS2781 battery driver was off
due to the incorrect value being used for Rsnsp. The DS2781 has
a register with the correct value, so use it instead of a hard
coded value.
Change-Id: I6fbd32a2a890232a805a2d4f1e595b0b3daf30e8
Signed-off-by: Greg Meiste <w30289@motorola.com>
duplicate register input called, when boot work function is triggered
via firmware update process.
This broke reboot command.
Change-Id: I78547127bfbde39f1f971806156d332883b8bf43
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
Some sensor ioctls are called on every frame. Remove log messages
to prevent the kernel log from getting too spammy.
Change-Id: I0eb88eb7e7da7c5eb3e158c17ae68cca195147fc
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Added new objects grip, palm and Digitizer HID.
Ignoring info block checksum for now, issues seen
on some HW having incorrect info data.
Change-Id: I812d3099dd273e99a87ca3fe8dfce3bcdfbede7e
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
This change will add the file cpcap-irq to the debug fs directory. The file will
provide data for each of the cpcap interrupts. The data includes the interrupt
name, if the interrupt is enabled/disabled, if a handler has been registered
with the interrupt, and the number of times the interrupt has been generated.
Signed-off-by: Greg Meiste <w30289@motorola.com>
Update the CPCAP firmware to add support to control SW2. VDD_CORE is
connected to SW2, and therefore SW2 needs to be controlled by CORE_PWR_REQ.
Change-Id: I9526c7c14bd9c4d41d40800392ae814adae49c08
Signed-off-by: Greg Meiste <w30289@motorola.com>
This driver receives notifications from cpcap-whisper and emulates the same
behavior as when the VBUS and ID USB pins are connected to the app processor.
Change-Id: I671e64c58559a2a3036273ef1fe8acb6af516fac
Signed-off-by: Benoit Goby <benoit@android.com>
Stingray P1 adds a DETECT line that needs to be used for charger
detection.
Change-Id: If904f18e0618b7cf1673fd654cc73ed27ddd5672
Signed-off-by: Greg Meiste <w30289@motorola.com>
Taking out the powerconfig hack seems to break the current version
of the firmware. Put it back in for now.
Signed-off-by: Colin Cross <ccross@android.com>
Updated info block checksum calculation to use 24-bit crc
as per Atmel data sheet.
Updated eeprom field(nv_checksum) to accommodate 24-bits.
Removed HACK(powerconfig) code for low-power mode.
Change-Id: Ic38a695010fd519af5c87ac731e8582898058bbb
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
Add driver to communicate shutdown request to mdm6600
modem, through gpio triplets.
Change-Id: I00ab47e64e8f398caebac83f7c734f2f2c1a2aa3
Signed-off-by: James Wylder <james.wylder@motorola.com>
Because the battery is non-removable, the service centers would like
a way of knowing whether the battery actually needs replacing. The
driver will now report the age scalar to the system to indicate
battery age.
Change-Id: I4dcaf12d87fdf82563d5511702ee3c6b4dffeecb
Signed-off-by: Greg Meiste <w30289@motorola.com>
Previously, Message Processor always generated
CRC byte at end of message.
Now(version 8), this CRC byte is generated only upon request.
To request that a checksum is generated, the MSBit
of the address of the Message Processor object is set to 1.
By default the CRC byte is not generated, reading the CRC byte
will remove new messages from IC causing lost touches.
Added control flag and message size correction for this feature.
Change-Id: I7d1a75528a59afcc95688ae1b7d6704d29ffe443
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
On K35, the bin_attribute structure was changed, causing a build
warning in the DS2781 w1 slave driver. Thsi patch fixes the warning
and the likely runtime error that would occur if something was
to try to read from the property.
Change-Id: I3a6ea8190a9f7e8ae8b85b25f79faa0574acc474
Signed-off-by: Greg Meiste <w30289@motorola.com>
Initial submission of the LM3559 driver for Stingray
Change-Id: Id18092f7b23248ea8e2fcca1116ddba89a9af9dc
Signed-off-by: Dan Murphy <wldm10@motorola.com>
Initial implementation of the DS2781 one wire slave driver
Change-Id: Id7bb79fced794105d71e64ec9f5aa719f7da7797
Signed-off-by: Greg Meiste <w30289@motorola.com>
driver provides ioctls for broadcom gps guci library to set gps
reset and standby lines for brcm 4750 chip
Signed-off-by: prabhu.annabathula <prabhu.annabathula@motorola.com>
1) Added detection of Whisper Smart dock
2) Now enable VBUS for USB hosts
3) Added support for Whisper daemon to enable/disable UART
4) Fixed issue resulting in extra ID Float interrupt
Change-Id: I1531429bc90241de6139390eb7a2ac19f13ca78b
Signed-off-by: Greg Meiste <w30289@motorola.com>
Fix the EEPROM writing as there was a typo in the data sheet.
Fix the brightness set function to correctly change the brightness
of the LEDs. And turn the LEDS off appropriately
Change-Id: Ie0f07c7f8433014729d8108c4785e8dddf962859
Signed-off-by: Dan Murphy <wldm10@motorola.com>
Whisper detection driver will now report to the system when an audio cable
is attached to the Whisper accessory. The presence of the audio cable
can be found at /sys/class/switch/usb_audio/state. The audio status will
not be reported until the accessory is validated by the Whisper daemon.
Change-Id: I7883403abdc8e86096e241e5a7e656b233db5296
Signed-off-by: Greg Meiste <w30289@motorola.com>
Initial submission of the National LP8550 driver for p1
Change-Id: I2d2dc42a1c06fbc682fd8f556fa89c864c749db8
Signed-off-by: Dan Murphy <wldm10@motorola.com>
Added 12-bit support for x,y co-ordinates.
x,y > 1023, x,y is reported as 12-bit.
x,y < 1024, x,y is reported as 10-bit.
Add firmware for second touch panel type.
Change-Id: Icfd687a37f5b3fcbb784665bac7d270317421a9a
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
Commonized the CPCAP LED driver into a single driver for all LEDs
connected to the CPCAP.
Change-Id: Ic62356010f3e1b355f7da757c3f08608765a71da
Signed-off-by: Dan Murphy <wldm10@motorola.com>