summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-eg20t.c
AgeCommit message (Collapse)Author
2012-05-12i2c-eg20t: add helper function for xfer checkTomoya MORINAGA
Currently, there are the same code for xfer complete check processing. So, I add helper function pch_i2c_wait_for_check_xfer. Reported-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-05-12i2c-eg20t: Call init() when wait-event timeout occursTomoya MORINAGA
Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-04-22i2c-eg20t: Modify MODULE_AUTHOR's email addressTomoya MORINAGA
Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-04-22i2c-eg20t: change timeout value 50msec to 1000msecTomoya MORINAGA
Currently, during i2c works alone, wait-event timeout is not occurred. However, as CPU load increases, timeout occurs frequently. So, I modified like this patch. Modifying like this patch, I've never seen the timeout event with high load test. Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-03-07i2c-eg20t: Remove write-only variablesAlexander Stein
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-03-07i2c-eg20t: Rework pch_i2c_wait_for_bus_idle to reduce wait timeAlexander Stein
If you insert several i2c transfers, the driver might start the next one while the STOP bit of the previous transfer is still on the bus, marking the bus as busy. pch_i2c_wait_for_bus_idle does an msleep(20) delaying the next transfer by >=20ms. Reduce wait time by actively waiting 5 us once, then using usleep_range. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Acked-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-01-17i2c-eg20t: Change-company-name-OKI-SEMICONDUCTOR to LAPIS SemiconductorTomoya MORINAGA
On October 1 in 2011, OKI SEMICONDUCTOR Co., Ltd. changed the company name in to LAPIS Semiconductor Co., Ltd. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2012-01-17i2c-eg20t: Support new device LAPIS Semiconductor ML7831 IOHTomoya MORINAGA
ML7831 is companion chip for Intel Atom E6xx series. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2012-01-17i2c-eg20t: modified the setting of transfer rate.Toshiharu Okada
This patch modified the setting value of I2C Bus Transfer Rate Setting Counter regisrer. Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2012-01-17i2c-eg20t: use i2c_add_numbered_adapter to get a fixed bus numberFeng Tang
For EG20T and ML7213 IOH, the i2c controller numbers are fixed, using fixed bus number will make it much easier for platform code to use i2c_register_board_info() to register i2c devices. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2012-01-12i2c: Convert to DEFINE_PCI_DEVICE_TABLEAxel Lin
Convert static struct pci_device_id *[] to static DEFINE_PCI_DEVICE_TABLE tables. Use DEFINE_PCI_DEVICE_TABLE ensures we make the pci_device_id table const and marked as __devinitconst. This also fixes some warnings from checkpatch: e.g. WARNING: Use DEFINE_PCI_DEVICE_TABLE for struct pci_device_id #1096: FILE: i2c/busses/i2c-intel-mid.c:1096: +static struct pci_device_id intel_mid_i2c_ids[] = { Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Ben Dooks <ben-linux@fluff.org> Acked-by: Olof Johansson <olof@lixom.net> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Acked-by: Dirk Brandewie <dirk.brandewie@gmail.com> Cc: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Feng Tang <feng.tang@intel.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-12-18i2c-eg20t: correct the driver init order of pch_i2c_probe()Feng Tang
Before registering an adapter to i2c subsystem, we need make sure driver is ready for incoming i2c xfer, becasue the i2c_add_adapter() may trigger a i2c device driver's proble function which may start some real i2c xfer. I met this issue when integrating a TSC2007 i2c touch screen device with the i2c-eg20t driver. This patch will call request_irq() and hw init before calling i2c_add_adapter(). Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-10-29i2c-eg20t: Add initialize processing in case i2c-error occursTomoya MORINAGA
In case disconnecting physical connection, need to initialize i2c device for retry access. This patch adds initialize process in case bus-idle fails and Lost arbitration. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-10-29i2c-eg20t: Fix flag setting issueTomoya MORINAGA
Currently, in case occurring abnormal event, internal flag variable(=pch_event_flag) is not reset. This patch fixes the issue. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-10-29i2c-eg20t: add stop sequence in case wait-event timeout occursTomoya MORINAGA
add stop sequence in case wait-event timeout in write processing. (read processing already had it) Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-10-29i2c-eg20t: Separate error processingTomoya MORINAGA
Error processing for NACK or wait-event must be precessed separately. So divide wait-event error processing into NACK-receiving and timeout. Add arbitration lost processing. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-10-29i2c-eg20t: Fix 10bit access issueTomoya MORINAGA
Reported-by: Jeffrey (Sheng-Hui) Chu <jeffchu@broadcom.com> Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-10-29i2c-eg20t: Modify returned value s32 to longTomoya MORINAGA
Type of wait_event_timeout is long not s32. This patch replaces s32 with long. Additionally, delete negative processing(ret < 0). Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-10-29i2c-eg20t: Fix bus-idle waiting issueTomoya MORINAGA
Currently, when checking whether bus is idle or not, if timeout occurs, this function always returns success(zero). This patch fixes the issue. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-07-26i2c-eg20t : Fix the issue of Combined R/W transfer modeTomoya MORINAGA
issue-1 In case combined transfer mode fails halfway, the processing must be stopped halfway. However currently, the processing is continued. This patch breaks the processing. issue-2 Currently, pch_i2c_xfer returns read/write size at that time. However pch_i2c_xfer must return the number of messages to be read/written. This patch modifies correctly. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-07-26i2c-eg20t : Support Combined R/W transfer modeTomoya MORINAGA
Currently, Combined R/W transfer mode is not supported. This patch enables Combined R/W transfer mode. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-05-11i2c-eg20t: Support new device ML7223 IOHTomoya MORINAGA
Support new device OKI SEMICONDUCTOR ML7223 IOH(Input/Output Hub). The ML7223 IOH is for MP(Media Phone) use. The ML7223 is companion chip for Intel Atom E6xx series. The ML7223 is completely compatible for Intel EG20T PCH. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-03-21Merge branches 'for-2639/i2c/i2c-ce4100-v6', 'for-2639/i2c/i2c-eg20t-v3' and ↵Ben Dooks
'for-2639/i2c/i2c-imx' into for-linus/2639/i2c-2
2011-03-08i2c-eg20t: include slab.h for memory allocationsWolfram Sang
Fixes (with v2.6.38-rc3/parisc/parisc-allmodconfig): src/drivers/i2c/busses/i2c-eg20t.c:720: error: implicit declaration of function 'kzalloc' src/drivers/i2c/busses/i2c-eg20t.c:790: error: implicit declaration of function 'kfree' Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-03-02i2c-eg20t: support new device OKI SEMICONDUCTOR ML7213 IOHTomoya MORINAGA
Support new device OKI SEMICONDUCTOR ML7213 IOH. The ML7213 which is for IVI(In-Vehicle Infotainment) is a companion chip for the Atom E6xx series and compatible with the Intel EG20T PCH. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-01-04i2c-eg20t: add driver for Intel EG20TTomoya MORINAGA
I2C driver for Intel EG20T PCH Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Reviewed-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Qi Wang <qi.wang@intel.com> [ben-linux@fluff.org: reworded commit message] Signed-off-by: Ben Dooks <ben-linux@fluff.org>