- 24 7月, 2012 19 次提交
-
-
由 Laurent Pinchart 提交于
Generate a stop condition after each message marked with I2C_M_STOP. [JD: Add I2C_FUNC_PROTOCOL_MANGLING.] Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Laurent Pinchart 提交于
Adapter drivers might support only a subset of the SMBus operations natively. Those drivers currently have to manually emulate unsupported operations using I2C. Make the i2c_smbus_xfer() function fall back to i2c_smbus_xfer_emulated() when the adapter's .smbus_xfer() operation returns -EOPNOTSUPP, like it already does when the .smbus_xfer() operation isn't available at all. [JD: Minor optimization.] Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Laurent Pinchart 提交于
SCCB is a serial communication bus developed by Omnivision. Its 2-wire mode is very similar to SMBus byte data transactions, but requires the controller to ignore the ACK bit and to insert a stop condition after each message. Add a device SCCB flag and a message stop flag to be passed to controller drivers. [JD: Kill rogue definition in go7007 driver.] Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Emmanuel Deloget 提交于
Robofuzz OSIF is a generic USB/iIC interface that embeds an ATMega8A AVR-RISC microcontroler. The device is based upon Till Harbaum's i2c-tiny-usb and although it enhances the original design with further functionnalities it still maintain compatibility with it with respect to the USB/I2C interface. Signed-off-by: NEmmanuel Deloget <logout@free.fr> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Daniel Kurtz 提交于
Byte-by-byte transactions are used primarily for accessing I2C devices with an SMBus controller. For these transactions, for each byte that is read or written, the SMBus controller generates a BYTE_DONE IRQ. The isr reads/writes the next byte, and clears the IRQ flag to start the next byte. On the penultimate IRQ, the isr also sets the LAST_BYTE flag. There is no locking around the cmd/len/count/data variables, since the I2C adapter lock ensures there is never multiple simultaneous transactions for the same device, and the driver thread never accesses these variables while interrupts might be occurring. The end result is faster I2C block read and write transactions. Note: This patch has only been tested and verified by doing I2C read and write block transfers on Cougar Point 6 Series PCH, as well as I2C read block transfers on ICH5. Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Jean Delvare 提交于
Enable interrupts on more devices. ICH5, ICH7(-M) and ICH10 have been tested to work OK. ICH8 and ICH9 are expected to work just fine as they are very close to ICH7 and ICH10. Ultimately we want to enable this feature on at least every device since the ICH5, but for now we limit the exposure. We'll enable it for other devices if we don't get negative feedback. As a bonus, let the user know when interrupts are used. Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Daniel Kurtz <djkurtz@chromium.org>
-
由 Daniel Kurtz 提交于
Add a new 'feature' to i2c-i801 to enable using PCI interrupts. When the feature is enabled, then an isr is installed for the device's PCI IRQ. An I2C/SMBus transaction is always terminated by one of the following interrupt sources: FAILED, BUS_ERR, DEV_ERR, or on success: INTR. When the isr fires for one of these cases, it sets the ->status variable and wakes up the waitq. The waitq then saves off the status code, and clears ->status (in preparation for some future transaction). The SMBus controller generates an INTR irq at the end of each transaction where INTREN was set in the HST_CNT register. No locking is needed around accesses to priv->status since all writes to it are serialized: it is only ever set once in the isr at the end of a transaction, and cleared while no interrupts can occur. In addition, the I2C adapter lock guarantees that entire I2C transactions for a single adapter are always serialized. For this patch, the INTREN bit is set only for SMBus block, byte and word transactions, but not for I2C reads or writes. The use of the DS (BYTE_DONE) interrupt with byte-by-byte I2C transactions is implemented in a subsequent patch. The interrupt feature has only been enabled for COUGARPOINT hardware. In addition, it is disabled if SMBus is using the SMI# interrupt. Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Jean Delvare 提交于
(Based on earlier work by Daniel Kurtz.) Come up with a consistent, driver-wide strategy for event polling. For intermediate steps of byte-by-byte block transactions, check for BYTE_DONE or any error flag being set. At the end of every transaction (regardless of PEC being used), check for both BUSY being cleared and INTR or any error flag being set. This ensures proper action for all transaction types. Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Daniel Kurtz <djkurtz@chromium.org>
-
由 Daniel Kurtz 提交于
Later patches enable interrupts. This preliminary patch removes the older unsupported ENABLE_INT9 flag. Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Daniel Kurtz 提交于
Rename the SMBHSTCNT register bit access constants to match the style of other register bits. Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Daniel Kurtz 提交于
If an error is detected in the polling loop, abort the transaction and return an error code. * DEV_ERR is set if the device does not respond with an acknowledge, and the SMBus controller times out (minimum 25ms). * BUS_ERR is set if a bus arbitration collision is detected. In other words, when the SMBus controller tries to generate a START condition, but detects that the SMBDATA is being held low, usually by another SMBus/I2C master. * FAILED is only set if a transaction is stopped by software (using the SMBHSTCNT KILL bit). Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Daniel Kurtz 提交于
Writing back the whole status register could clear unwanted bits. In particular, it could clear the "INUSE_STS" bit, which is a 'hardware semaphore', that might be useful to use some day. To prepare for this, let's ban writing back the whole status to register HST_STS, of which this is the only instance. Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Daniel Kurtz 提交于
As a slight optimization, pull some logic out of the polling loop during byte-by-byte transactions by just setting the I801_LAST_BYTE bit, as defined in the i801 (PCH) datasheet, when reading the last byte of a byte-by-byte I2C_SMBUS_READ. Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Fabio Estevam 提交于
Using module_i2c_driver() makes the code smaller and cleaner. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Andrew Armenia 提交于
Some AMD chipsets, such as the SP5100, have an auxiliary SMBus controller with a second set of registers. This patch adds support for this auxiliary controller. Tested on ASUS KCMA-D8 motherboard. Signed-off-by: NAndrew Armenia <andrew@asquaredlabs.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Andrew Armenia 提交于
Some chipsets have multiple sets of SMBus registers each controlling a separate SMBus. Supporting these chipsets properly will require registering multiple I2C adapters for one piix4. The code to initialize and register the i2c_adapter structure has been separated from piix4_probe and allows registration of a piix4 adapter given its base address. Note that the i2c_adapter and i2c_piix4_adapdata structures are now dynamically allocated. Signed-off-by: NAndrew Armenia <andrew@asquaredlabs.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Andrew Armenia 提交于
Some chipsets have multiple sets of piix4-compatible SMBus registers. Eliminating the global variable will allow these chipsets to be fully supported. Return value from piix4_setup and piix4_sb800_setup now returns the smba value detected. This is stored in a struct i2c_piix4_adapdata. Thus the global variable is eliminated. Signed-off-by: NAndrew Armenia <andrew@asquaredlabs.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Axel Lin 提交于
Convert the drivers in drivers/i2c/busses/* to usemodule_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: NAxel Lin <axel.lin@gmail.com> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Olof Johansson <olof@lixom.net> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Tomoya MORINAGA <tomoya.rohm@gmail.com>
-
由 Guenter Roeck 提交于
My old e-mail address won't be valid for much longer. Time to update it. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
- 13 7月, 2012 1 次提交
-
-
由 Lee Jones 提交于
Now that u5500 is obsolete, u8500 is the only user of the Nomadik i2c driver. As such there is no requirement to differentiate between initialisation values. By the time a new SoC is released, almost all of the ux500 platform will be DT:ed, so we can make decisions based on the compatible property instead. Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 11 7月, 2012 1 次提交
-
-
由 Benjamin Herrenschmidt 提交于
This patch adds a number of workarounds for broken Apple device-trees mostly around sound chips. It handles creating the missing audio codec devices and works around various issues with missing addresses or missing compatible properties. Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 01 7月, 2012 1 次提交
-
-
由 Shawn Guo 提交于
Remove unneeded mach/irq.h inclusion from i2c-imx driver. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Cc: linux-i2c@vger.kernel.org Acked-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NSascha Hauer <s.hauer@pengutronix.de> Acked-by: NDong Aisheng <dong.aisheng@linaro.org>
-
- 12 6月, 2012 1 次提交
-
-
由 Prashant Gaikwad 提交于
Use clk_prepare/clk_unprepare as required by the generic clk framework. Cc: w.sang@pengutronix.de Cc: linux-i2c@vger.kernel.org Signed-off-by: NPrashant Gaikwad <pgaikwad@nvidia.com> Signed-off-by: NStephen Warren <swarren@nvidia.com>
-
- 04 6月, 2012 1 次提交
-
-
由 Stephen Warren 提交于
This is useful for SoCs whose I2C module's signals can be routed to different sets of pins at run-time, using the pinctrl API. +-----+ +-----+ | dev | | dev | +------------------------+ +-----+ +-----+ | SoC | | | | /----|------+--------+ | +---+ +------+ | child bus A, on first set of pins | |I2C|---|Pinmux| | | +---+ +------+ | child bus B, on second set of pins | \----|------+--------+--------+ | | | | | +------------------------+ +-----+ +-----+ +-----+ | dev | | dev | | dev | +-----+ +-----+ +-----+ Signed-off-by: NStephen Warren <swarren@nvidia.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-
- 30 5月, 2012 2 次提交
-
-
由 Mark Brown 提交于
Since there are uses for I2C_M_NOSTART which are much more sensible and standard than most of the protocol mangling functionality (the main one being gather writes to devices where something like a register address needs to be inserted before a block of data) create a new I2C_FUNC_NOSTART for this feature and update all the users to use it. Also strengthen the disrecommendation of the protocol mangling while we're at it. In the case of regmap-i2c we remove the requirement for mangling as I2C_M_NOSTART is the only mangling feature which is being used. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Jean Delvare 提交于
As the bus driver side implementation of I2C_M_RECV_LEN is heavily tied to SMBus, we can't support received length over 32 bytes, but let's at least support that. In practice, the caller will have to setup a buffer large enough to cover the case where received length byte has value 32, so minimum 32 + 1 = 33 bytes, possibly more if there is a fixed number of bytes added for the specific slave (for example a checksum.) Signed-off-by: NJean Delvare <khali@linux-fr.org> Tested-by: NDouglas Gilbert <dgilbert@interlog.com>
-
- 17 5月, 2012 1 次提交
-
-
由 Oskar Schirmer 提交于
That old mail address doesnt exist any more. This changes all occurences to my new address. Signed-off-by: NOskar Schirmer <oskar@scara.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 13 5月, 2012 2 次提交
-
-
由 Shawn Guo 提交于
Add device tree probe support for i2c-mxs driver. So far, it's only been tested on imx28. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Acked-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Marcus Folkesson 提交于
The freed IRQ is not necessary the one requested in probe. Even if it was, with two or more i2c-controllers it will fails anyway. Signed-off-by: NMarcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: NWolfram Sang <w.sang@pengutronix.de> Cc: stable@kernel.org
-
- 12 5月, 2012 11 次提交
-
-
由 Ganesan Ramalingam 提交于
Call of_i2c_register_devices() in probe function to register i2c devices specified in the device tree or OF. Signed-off-by: NGanesan Ramalingam <ganesanr@broadcom.com> Signed-off-by: NJayachandran C <jayachandranc@netlogicmicro.com> [wsa: add proper braces] Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Laxman Dewangan 提交于
The notification of the transfer complete by calling complete() should be done after clearing all interrupt status. This avoids the race condition of misconfigure the i2c controller in multi-core environment. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NWolfram Sang <w.sang@pengutronix.de> Cc: stable@kernel.org
-
由 Lars-Peter Clausen 提交于
Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Jean Delvare 提交于
Update the MAINTAINERS entry and all other references accordingly. Based on an original patch by Wolfram Sang. Signed-off-by: NJean Delvare <khali@linux-fr.org> Acked-by: NPeter Korsgaard <peter.korsgaard@barco.com> [wsa: fixed merge conflict due to rework in i2c_add_mux_adapter()] Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Laxman Dewangan 提交于
The slave address of device to be configured in packet header as follows: 7 bit address: PacketHeader3[7:1] 10 bit address: PacketHeader3[9:0] Fixing the code to make packet header3 properly. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Acked-by: NJean Delvare <khali@linux-fr.org> Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Wolfram Sang 提交于
Apply a naming pattern like in the rest of the subsystem to a first set of mux drivers. Those drivers are the low-hanging fruit; we want to pick them to motivate upcoming drivers to follow the new pattern. The missing GPIO driver will be converted in a later patch. Signed-off-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> (pca9541) Acked-by: NJean Delvare <khali@linux-fr.org>
-
由 Stephen Warren 提交于
This converts a struct device * to a struct i2c_adapter * while verifying that the device really is an I2C adapter. Just like i2c_verify_client. Signed-off-by: NStephen Warren <swarren@nvidia.com> Acked-by: NJean Delvare <khali@linux-fr.org> Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Karol Lewandowski 提交于
This patch adds support for s3c2440 I2C bus controller dedicated HDMIPHY device on Exynos4 platform. Some quirks are introduced due to differences between HDMIPHY and other I2C controllers on Exynos4. These differences are: - no GPIOs, HDMIPHY is inside the SoC and the controller is connected internally - due to unknown reason (probably HW bug in HDMIPHY and/or the controller) a transfer fails to finish. The controller hangs after sending the last byte, the workaround for this bug is resetting the controller after each transfer Signed-off-by: NTomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: NKarol Lewandowski <k.lewandowsk@samsung.com> Tested-by: NTomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Karol Lewandowski 提交于
Reorganize driver a bit to better handle device tree-based systems: - move machine type to driver's private structure instead of quering platform device variants in runtime - replace s3c24xx_i2c_type enum with unsigned int that holds bitmask with revision-specific quirks Signed-off-by: NKarol Lewandowski <k.lewandowsk@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-
由 Wolfram Sang 提交于
We got multiple patches to add mux support to device tree, so people are using it happily already and build up on it. I also used it in a project without encountering problems. 20 months of EXPERIMENTAL should do for this. Signed-off-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NPeter Korsgaard <jacmet@sunsite.dk> Acked-by: NGuenter Roeck <guenter.roeck@ericsson.com> Acked-by: NJean Delvare <khali@linux-fr.org> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Acked-by: NMichael Lawnick <ml.lawnick@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: David Daney <ddaney.cavm@gmail.com>
-
由 David Daney 提交于
For 'normal' i2c bus drivers, we can call of_i2c_register_devices() and have the device tree framework automatically populate the bus with the devices specified in the device tree. This patch adds a common code to the i2c mux framework to have the mux sub-busses be populated by the of_i2c_register_devices() too. If the mux device has an of_node, we populate the sub-bus' of_node so that the subsequent call to of_i2c_register_devices() will find the corresponding devices. It seemed better to put this logic in i2c_add_mux_adapter() rather than the individual mux drivers, as they will all probably want to do the same thing. Signed-off-by: NDavid Daney <david.daney@cavium.com> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Tested-by: NLars-Peter Clausen <lars@metafoo.de> [wsa: removed superfluous ret-variable and fixed a typo in a comment] Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
-