aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Added Charger Type SupportRamakrishna Pallala2010-12-091-0/+10
| | | | | Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* Emergency Call Charging FixRamakrishna Pallala2010-12-091-11/+17
| | | | | Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* Added Support for SW Charge TerminationRamakrishna Pallala2010-12-091-36/+189
| | | | | | | | | | Check_charge_full function is added to determine the charge full condition. Added a function calculate the charge cycles. Temperature based charging worker is modified according to support SW charge termination and maintenance charging. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* Added Support for Fuel GaugingRamakrishna Pallala2010-12-091-6/+190
| | | | | | | | | | To support fuel gauging Energy now, Energy full, charge counter and capacity level Sysfs Interfaces are added to driver. A table is added to look up voltage against charge. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* Added Support for status monitoringRamakrishna Pallala2010-12-091-85/+163
| | | | | | | | | | | Added a worker function to monitor status if any fault conditions like Over Voltage, Over Temperature, etc.. happens. Removed most of the code from threaded IRQ function and improved exception handling code. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* Added support for Emergency call ChargingRamakrishna Pallala2010-12-091-0/+103
| | | | | | | | | | Added a sysfs interface for enabling/disabling Emergency call support. During the charge cycle depending on the temperature and emergency charge enablement parameters we set the current limit value accordingly. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* Register Initialization and conversion of coulombs to amphrsRamakrishna Pallala2010-12-091-20/+66
| | | | | | | | | | cc_to_coloumbs/ msic_get_charge_now functions are added to return charge in mAhrs. Init_msic_regs function modified to add two more registers initialization. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* intel_mid: Medfield battery driver tidy upAlan Cox2010-12-093-258/+218
| | | | | | | | | - Fix kfifo build problem - Clean up printing to debug level for the most part - Remove an impossible NULL check - Clean up all the ipc writing loops using a single helper Signed-off-by: Alan Cox <alan@linux.intel.com>
* intel_mid: Intel MSIC battery driverRamakrishna Pallala2010-12-093-0/+2166
| | | | | | | Battery driver for the Intel MID platform devices based on the Medfield chipset. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
* usb: penwell_otg: put back PHY to normal mode before charger detectionHao Wu2010-12-091-0/+2
| | | | | | | This patch puts PHY back to normal mode before access MSIC register for charger detection. This fixed issue, boot up with connected to PC case. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: add runtime pm support for otgJiebing Li2010-12-091-0/+77
| | | | | | | This patch enables runtime pm support for langwell_udc controller driver. Signed-off-by: Jiebing Li <jiebing.li@intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: add runtime pm support for otgHao Wu2010-12-091-18/+98
| | | | | | | This patch contains update on transceiver driver interfaces. Mainly to support runtime pm for OTG. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: core: add runtime pm support for Intel Medfield platformAndy Luo2010-12-091-7/+22
| | | | | | | This patch enables runtime pm support for usb host driver Signed-off-by: Andy Luo <yifei.luo@intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: ehci-langwell-pci: add transceiver driver interface for runtime pmHao Wu2010-12-091-1/+46
| | | | | | | This patch adds transceiver driver interface for runtime pm, in order to support OTG case. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: penwell_otg: add runtime pm supportHao Wu2010-12-091-21/+155
| | | | | | Add runtime pm support in penwell_otg transceiver driver. Signed-off-by: Hao Wu <hao.wu@intel.com>
* sst: Fix for dmic capture on v2 pmicHarsha Priya2010-12-091-1/+4
| | | | | | | | | Currently capture through dmic captures only silence This patch configurs the dmic registers to capture properly Signed-off-by: Harsha Priya <priya.harsha@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* langwell_gpio: modify EOI handling following change of kernel irq subsystemFeng Tang2010-12-091-1/+10
| | | | | | | | | Latest kernel has many changes in IRQ subsystem and its interfaces, like adding "irq_eoi" for struct irq_chip, this patch will make it support both the new and old interface. Cc: Alek Du <alek.du@intel.com> Signed-off-by: Feng Tang <feng.tang@intel.com>
* intel_pmic_gpio: modify EOI handling following change of kernel irq subsystemFeng Tang2010-12-091-1/+9
| | | | | | | | | Latest kernel has many changes in IRQ subsystem and its interfaces, like adding "irq_eoi" for struct irq_chip, this patch will make it support both the new and old interface. Cc: Alek Du <alek.du@intel.com> Signed-off-by: Feng Tang <feng.tang@intel.com>
* usb: fixup missing size field for non transceiver buildAlan Cox2010-12-091-0/+1
| | | | Signed-off-by: Alan Cox <alan@linux.intel.com>
* usb: langwell_udc: add HighSpeed/FullSpeed events notificationHao Wu2010-12-091-2/+14
| | | | | | | | | | It adds notification to Intel Penwell otg transceiver driver for HighSpeed/FullSpeed. This change mainly to support battery charging current negotiation for Charging Downstream Port(CDP) case. USB OTG Transceiver driver will notify battery driver about charging current limitation change according to different Speed Mode (HS/FS). Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: penwell_otg: add charging current negotiation and notification supportHao Wu2010-12-091-71/+405
| | | | | | | | | | | This patch adds charging current negotiation in Transceiver driver for SDP/CDP/DCP cases and it also provides notification/query interfaces to Battery driver for charging current information notification. *It requires device controller/gadget driver modification to fully support SDP/CDP cases. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: penwell_otg: add USB charger detectionHao Wu2010-12-091-17/+238
| | | | | | | | | | This patch enables penwell USB OTG Transceiver driver USB Charger Detection support. It can detect different types of USB charger based on MSIC. SDP (Standard Downstream Port - USB Host port charger), DCP (Dedicated Charging Port - USB Wall charger), CDP (Charging Downstream Port - Special USB Host port charger). Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: penwell_otg: Add Intel Penwell USB OTG Transceiver driverHao Wu2010-12-093-0/+2343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description This driver tries to implement host/device role switch according to OTG 2.0 spec on MFLD. The actual host and device functions are accomplished in modified EHCI driver and Intel Penwell USB OTG device controller driver. This is the first version and it only support Host Peripheral role switch per different USB cable. Development work is still on going, more features will be submitted soon after verified. Dependency CONFIG_INTEL_SCU_IPC - IPC driver. Enable driver in Kernel "Device Drivers" ---> "USB support" ---> "Intel Penwell USB OTG dual-role support" Kernel configs CONFIG_INTEL_SCU_IPC=y CONFIG_USB=y CONFIG_USB_OTG=y CONFIG_USB_OTG_UTILS=y CONFIG_PENWELL_OTG=y Todo List USB Charging Support Power management (runtime) MHL-USB coexistence HNP/HNP Polling/SRP ADP(Attach Detection Protocol) Support Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: ehci-pci: add Intel Penwell USB Host Power budget limitationHao Wu2010-12-091-0/+5
| | | | | | | Intel Penwell USB Host only can provide 200mA via its OTG port. so add power budget limitaition for power supply safety on OTG port. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: set vbus_active flag according to stateHao Wu2010-12-091-4/+20
| | | | | | | | This patch adds active bit setting in order to avoid issues with composite gadget on pullup functions which query on this bit. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: enable PHY Low Power Mode for PenwellJiebing Li2010-12-091-12/+6
| | | | | | | This patch enables PHY Low Power mode to save power for Penwell case. Signed-off-by: Jiebing Li <jiebing.li@intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: add Intel Penwell USB Device Controller supportJiebing Li2010-12-093-39/+17
| | | | | | | | | Add Intel Penwell USB Device Controller Support in langwell_udc driver. This driver will support both langwell/penwell USB Device controller with this patch. Signed-off-by: JiebingLi <jiebing.li@intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: ehci-pci: Support Intel Medfield Platform USB OTG HostHao Wu2010-12-092-3/+3
| | | | | | | This patch enables EHCI USB host function for Intel Medfield Platform USB OTG host function. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_otg: use simple IPC command to control VBus powerHao Wu2010-12-091-37/+11
| | | | | | | | | | | | | Direct access to PMIC register is not safe and will impact battery charging. New IPC command supported in SCU FW for VBus power control. USB OTG driver will switch to such commands instead of direct access to PMIC register for safety and SCU FW will handle the actual work after got the request(IPC command). Due to this change, usb driver should wait more time for sync OTGSC with USBCFG by SCU. Update wait time from 2ms to 5ms. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: ehci-langwell-pci: support common OTG data structure for Intel MID platformHao Wu2010-12-092-48/+119
| | | | | | | | | | | | | | | This patch modified ehci host pci controller driver for langwell, support common OTG data structure for Intel MID platform. Main changes: - Update OTG related data structure. - Provide start_host/stop_host function to transceiver. - Provide register/unregister function. modified: drivers/usb/host/ehci-hcd.c modified: drivers/usb/host/ehci-langwell-pci.c Signed-off-by: Hao Wu <hao.wu@intel.com>
* ehci: Support Intel Moorestown EHCI controller SRAM QH/QTD/ITD/SITD pool cachingJacob Pan2010-12-094-9/+62
| | | | | | | | | | | | The Intel Moorestown platform has MPH and OTG EHCI controllers that have internal SRAM that could be used as descriptors DMA pool caching. The SRAM is exposed via PCI BAR1. The limitation here is the SRAM access should be 32bit aligned. A separate patch "EHCI: Make ehci_qh structure items all 32bit aligned" has been submitted to linux-usb mailling list. Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com> Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* ehci: Support for Intel Moorestown MPH and OTG hostAlek Du2010-12-097-3/+256
| | | | | | | | | | | | The Intel Moorestown platform has EHCI MPH and EHCI OTG host. This patch adds PCI probe part for them. The HNP part and SRAM part will be added in another patch. This patch depends on the OTG transceive and OTG client patch from Hang Yuan that should be accepted already. Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com> Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: use common OTG data structure for Intel MID platformHao Wu2010-12-092-54/+132
| | | | | | | | | | | | | | | This patch provided the support to common OTG data structure. Main changes: - Notify otg related events using notifier and remove direct access to otg data structure(state machine). - Provide start_peripheral/stop_peripheral function to transceiver. - Provide client register/unregister function. modified: drivers/usb/gadget/langwell_udc.c modified: drivers/usb/gadget/langwell_udc.h Signed-off-by: Hao Wu <hao.wu@intel.com>
* i2c-intel-mid: I2C FIFO buffer size setting and fragmentationMajor Lee2010-12-091-49/+46
| | | | | | | | | | | | | The FIFO buffer size is different with different CPU stepping. Define it as 32-byte; it is safe for all CPU stepping. There is a problem when xfer size is greater then FIFO buffer size. Implement software fragmentation in host bus driver so that the I²C slave device drivers need not to be modified or to know about the limits. Signed-off-by: Major Lee <major_lee@wistron.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* spi/dw_spi: Don't quit when DMA initialisation failsFeng Tang2010-12-091-2/+4
| | | | | | | Even if the dma init failed, we can keep on going with Program IO mode. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* spi/dw_spi_mid: make dma filter check pass on Medfield platformFeng Tang2010-12-091-2/+7
| | | | | | | | | During requesting a dma channel, the filter function will do a sanity check, current driver only consider the Moorestown case, this add the Medfield case. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* Medfield_Current_Monitoring_DriverDurgadoss R2010-12-093-0/+657
| | | | | | | | | | | | | | This is the Intel Medfield Current Monitoring Driver patch. The platform specific data required by the driver are provided by adding necessary code in arch/x86/platform/mrst/mrst.c This driver monitors the platform current usage and handles interrupts when the configured current thresholds are crossed. A detailed documentation for this, has been added in Documentation/hwmon/current_monitor. Signed-off-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* mrst/vrtc: avoid using cmos rtc opsJacob Pan2010-12-091-1/+12
| | | | | | | | | | If we don't assign Moorestown specific wallclock init and ops function the rtc/persisent clock code will use cmos rtc for access, this will crash Moorestown in that the ioports are not present. Also in vrtc driver, should avoid using cmos access to check UIP status. Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* PTI driver cleanup path bug fixJ Freyensee2010-12-091-18/+19
| | | | | | | | | | | | | | | | | | This patch addresses some remove issues in the pti_pci_remove() and _exit() routines in the pti driver that were uncovered in module load and unload stress testing: 1. a double kfree() issue between the _remove() and _exit() routine 2. pci_release_region() in _remove() that was not really releasing the region from the _probe() call, thereby causing a BUSY error on the next load of the driver module. 3. 2. uncovered a corner-case issue in which misc_register() wasn't called in _probe() before an error-cleanup routine was called which was causing an issue in the _exit() routine. 4. A couple unregister_driver() calls added to exit(). Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* The MID I2C driver does not allow auto runtime pm by default. It goes intoAlan Cox2010-12-091-11/+23
| | | | | | | | | | | | | suspend after every access. This is not efficient for continual I2C access. This patch allows auto suspend by default. It add a delay to the suspend which keeps I2C active for at least 500ms after every access. If a device driver accesses I2C frequently, it will not go to suspend and will keep high performance. After a long time idle, it will go to suspend auto. Signed-off-by: Bin Yang <bin.yang@intel.com> [Ported to upstream driver version] Signed-off-by: Alan Cox <alan@linux.intel.com>
* The old solution for i2c xfer timeout was to set timeout value to one secondAlan Cox2010-12-091-4/+27
| | | | | | | | | | | | for all i2c xfers. That's not reasonable for all of the various speed modes and data lengths. This patch sets the xfer_read timeout value based on both bus speed and data length. Signed-off-by: Bin Yang <bin.yang@intel.com> [Ported to the upstream branch and extracted as a helper function] Signed-off-by: Alan Cox <alan@linux.intel.com>
* The error messages printed from mrst_i2c_abort() didn't give slave address info.Catalin Popescu2010-12-091-4/+12
| | | | | | | | | | | | But I2C device driver developers always need this to check which slave device has the problem. This patch enhances the error message format by adding slave address info to each error message. Signed-off-by: Bin Yang <bin.yang@intel.com> [Ported to upstream driver branch and tidied a spot] Signed-off-by: Alan Cox <alan@linux.intel.com>
* This patch removes all pr_debug's for n_tracerouter ldisc driver.J Freyensee2010-12-091-9/+0
| | | | | Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* n_tracerouter: checkpatch cleanupJ Freyensee2010-12-091-2/+3
| | | | | | | | this cleans up any coding style issues in n_tracerouter ldisc for future submission to the mainline kernel. Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* n_tracesink: pr_debug removal from tracesink_ldiscJ Freyensee2010-12-091-9/+0
| | | | | | This patch removes all pr_debug in the n_tracesink ldisc driver. Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
* n_tracesink: checkpatch clean of n_tracesinkJ Freyensee2010-12-091-3/+3
| | | | | | | | This patch cleans up style issues of the n_tracesink ldisc for future upstream submission to mainline kernel. Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* pti: module compile optionsJ Freyensee2010-12-091-1/+1
| | | | | | | | This allows the pti driver to be compiled in a module, which is acceptable. Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* pti: checkpatch cleanedJ Freyensee2010-12-091-29/+26
| | | | | | | This patch cleans up the code style-wise in preperation for mainline Linux kernel submission. Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
* pti: pr_debug removalJ Freyensee2010-12-091-25/+1
| | | | | | | This patch removes all debugging messages from the pti.c driver. Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* pti: channel ID management reworkJ Freyensee2010-12-091-12/+12
| | | | | | | | | | This patch fixes some issues with how channel ID was managed, like: 1. more efficiently utilize the array space keeping track of channel id's 2. simplify the getID() algorithm based on PTI simplification 3. re-manuver the mutex unlock where getID() is used Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>