aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* intel_mid: Keypad DriverHEADmasterZheng Ba2010-12-143-0/+789
| | | | | | | | | | | | | This patch adds the keypad support for the MID platform keypad interfaces. Changes from Alpha2: solved "CRITICAL" issues marked by Klocwork HSD sighting 3469242 (some tidying Alan Cox) Signed-off-by: Zheng Ba <zheng.ba@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* i2c_intel_mid: Fix slash in sysfs nameAlan Cox2010-12-141-1/+1
| | | | | | | | | | | | This gets caught by the new sanity check code. Instead of the slash use a different symbol. This was originally found by Major Lee who proposed a rather more complex patch which changed the name according to the chip type. On the basis that we are in a late -rc and making Linus grumpy isn't always a good idea (however fun) this is a simple alternative. Signed-off-by: Alan Cox <alan@linux.intel.com>
* x86,mrst: Intel Medfield over-current detection patchDurgadoss R2010-12-133-0/+648
| | | | | | | | | | | | This patch enables over current detection on the Intel Medfield Platform. This driver provides sysfs interfaces to configure current thresholds. When the current being drawn on the platform exceeds the configured threshold, an interrupt is generated. This interrupt can be used to bring the current consumption down by taking necessary hardware or software actions. Signed-off-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* Return-Path: <meego-kernel-bounces@lists.meego.com>Alan Cox2010-12-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | X-Original-To: alan@linux.intel.com Delivered-To: alan@linux.intel.com Received: from orsmga001.jf.intel.com (orsmga001.jf.intel.com [10.7.209.18]) by linux.intel.com (Postfix) with ESMTP id E8FCC6A447F; Mon, 6 Dec 2010 16:31:39 -0800 (PST) Received: from orsmga102-1.jf.intel.com (HELO mga09.intel.com) ([10.7.208.27]) by orsmga001-1.jf.intel.com with ESMTP; 06 Dec 2010 16:31:39 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtMAAKQO/UzQKylBmWdsb2JhbACVJo4SFQEBAQEBCAsKBxEivyGFSQSEX4UehAoJBQ X-IronPort-AV: E=Sophos;i="4.59,308,1288594800"; d="scan'208";a="843959646" Received: from mail.meego.com ([208.43.41.65]) by mtab.intel.com with ESMTP; 06 Dec 2010 16:27:57 -0800 Received: from localhost (localhost [127.0.0.1]) by mail.meego.com (Postfix) with ESMTP id 39CB910AFA6; Mon, 6 Dec 2010 16:27:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at mail.moblin.org Received: from mail.meego.com ([127.0.0.1]) by localhost (mail.moblin.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JsoPdIdPFqdY; Mon, 6 Dec 2010 16:27:56 -0800 (PST) Received: from otc01.sl.ssgisp.com (localhost [127.0.0.1]) by mail.meego.com (Postfix) with ESMTP; Mon, 6 Dec 2010 16:27:56 -0800 (PST) X-Original-To: meego-kernel@meego.com Delivered-To: meego-kernel@meego.com Received: from localhost (localhost [127.0.0.1]) by mail.meego.com (Postfix) with ESMTP id C9BAD10AF9C for <meego-kernel@meego.com>; Mon, 6 Dec 2010 16:27:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at mail.moblin.org Received: from mail.meego.com ([127.0.0.1]) by localhost (mail.moblin.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a1KIaCGW2w+Y for <meego-kernel@meego.com>; Mon, 6 Dec 2010 16:27:46 -0800 (PST) Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mail.meego.com (Postfix) with ESMTP for <meego-kernel@meego.com>; Mon, 6 Dec 2010 16:27:45 -0800 (PST) Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id oB70RjQB008851 for <meego-kernel@meego.com>; Mon, 6 Dec 2010 16:27:45 -0800 (PST) Received: from ala-mail06.corp.ad.wrs.com ([147.11.57.147]) by ALA-MAIL03.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 6 Dec 2010 16:27:45 -0800 Received: from localhost6.localdomain6 ([10.3.1.103]) by ala-mail06.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 6 Dec 2010 16:27:45 -0800 To: meego-kernel@meego.com From: Ken Lierman <ken.lierman@windriver.com> Date: Mon, 06 Dec 2010 16:30:08 -0800 Message-ID: <20101207003008.12500.61165.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 X-OriginalArrivalTime: 07 Dec 2010 00:27:45.0487 (UTC) FILETIME=[919625F0:01CB95A5] Subject: [Meego-kernel] [PATCH] Change the clock divider to slow the polling X-BeenThere: meego-kernel@lists.meego.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: "MeeGo kernel discussions and patches." <meego-kernel.lists.meego.com> List-Unsubscribe: <http://lists.meego.com/options/meego-kernel>, <mailto:meego-kernel-request@lists.meego.com?subject=unsubscribe> List-Archive: <http://lists.meego.com/pipermail/meego-kernel> List-Post: <mailto:meego-kernel@lists.meego.com> List-Help: <mailto:meego-kernel-request@lists.meego.com?subject=help> List-Subscribe: <http://lists.meego.com/listinfo/meego-kernel>, <mailto:meego-kernel-request@lists.meego.com?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: meego-kernel-bounces@lists.meego.com Errors-To: meego-kernel-bounces@lists.meego.com On some hardware, getting double keys for single keypresses. Slow the clock slightly (rate requested by the customer) to avoid double key detects on formfactor hardware that has higher capacitance across the lines. Signed-off-by: Ken Lierman <ken.lierman@windriver.com>
* Driver for TC35894XBG keypad controllerCharlie Paul2010-12-104-0/+2257
| | | | Signed-off-by: Andy Ross <andy.ross@windriver.com>
* emc1403: added emc1423 supportJekyll Lai2010-12-102-10/+16
| | | | | | | | | | | emc1423 uses the similar register and adds a hardware shutdown pin to protect exceed temperature. This function is set by resistor; it's not necessary to do anything in the driver except add the emc1423 pid of 0x23. Signed-off-by: Jekyll Lai <jekyll_lai@wistron.com> [Updated Kconfig/comments and minor further changes asked for by the hwmon maintainers] Signed-off-by: Alan Cox <alan@linux.intel.com>
* There is a possiblity that the last word of a transaction will be lost ifMajor Lee2010-12-101-0/+5
| | | | | | | | | | | data is not ready. Re-read in poll_transfer() to solve this issue when poll_mode is enabled. Patch is against mainline (2.6.37-rc5). Verified on SPI touch screen device. Signed-off-by: Major Lee <major_lee@wistron.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* Cleaned Nested LockingRamakrishna Pallala2010-12-091-22/+29
| | | | | Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* 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>