14 Jul, 2012
5 commits
-
Some architectures supports only 16-bit or 32-bit read/write access to
their IO space. Add a 'reg-io-width' platform and OF parameter which
specifies the IO width to support these platforms.reg-io-width can be specified as 1, 2 or 4, and has a default value
of 1 if it is unspecified.Signed-off-by: Ganesan Ramalingam
Signed-off-by: Jayachandran C
Signed-off-by: Wolfram Sang -
Update for change in i2c-ocores.h which uses reg_shift to
specify the register offset shifts instead of regstep.Signed-off-by: Jayachandran C
Acked-by: Richard Rojfors
Signed-off-by: Wolfram Sang -
Deprecate 'regstep' property and use the standard 'reg-shift' property
for register offset shifts. 'regstep' will still be supported as an
optional property, but will give a warning when used.Signed-off-by: Ganesan Ramalingam
Signed-off-by: Jayachandran C
Signed-off-by: Wolfram Sang -
Cleanups to i2c-cores, no change in logic, changes are:
* Move i2c-ocores device tree documentation from source file to
Documentation/devicetree/bindings/i2c/i2c-ocores.txt.
* Add \n to dev_warn and dev_err messages where missing
* Minor updates to the text and formatting fixes.Signed-off-by: Jayachandran C
Signed-off-by: Wolfram Sang -
As git history indicates, the driver predates the git era and is heavily
used and worked on since. Not EXPERIMENTAL anymore.Signed-off-by: Wolfram Sang
Cc: Rodolfo Giometti
Cc: Florian Fainelli
13 Jul, 2012
11 commits
-
There's no point in using _sync() as we don't really care if the suspend
has completed immediately.Signed-off-by: Mark Brown
Reviewed-by: Shubhrajyoti D
Signed-off-by: Wolfram Sang -
This commit fixes warning introduced in 27452498a ("i2c-s3c2410: Rework
device type handling"):drivers/i2c/busses/i2c-s3c2410.c: In function 's3c24xx_get_device_quirks':
drivers/i2c/busses/i2c-s3c2410.c:125: warning: passing argument 1 of 'of_match_node' from incompatible pointer type
include/linux/of.h:245: note: expected 'const struct of_device_id *' but argument is of type 'const struct of_device_id (*)[4]'Signed-off-by: Karol Lewandowski
Signed-off-by: Kyungmin Park
Signed-off-by: Wolfram Sang -
This patch configures the I2C bus timing registers according
to information passed via DT. Currently, 100kHz and 400kHz
modes are supported.The TIMING2 register value is wrong in the documentation for
i.MX28! This was found and fixed by:
Shawn GuoSigned-off-by: Marek Vasut
Signed-off-by: Wolfram Sang -
Depend on 1e92bf6d80b5a0a137455c96bf6cdd9c1a5b531e
Signed-off-by: Sonic Zhang
Signed-off-by: Wolfram Sang -
Depend on commit cf93feb3a0dee97c7896016a352a3226139fbcf4
Signed-off-by: Sonic Zhang
Signed-off-by: Wolfram Sang -
TWI bit mask macros are moved to twi head file.
Depend on commit 61c16b5c7414b6d0511dc384e0ea994e250e6339Signed-off-by: Sonic Zhang
Signed-off-by: Bob Liu
Signed-off-by: Wolfram Sang -
Current driver was developed based on BF537 0.2 HRM. In high system load, BUFRDERR error
interrupt may be raised if XMTSERV interrupt of last TX byte is not served in time
(set RSTART bit), which breaks restart tranfer as expected."Buffer Read Error (BUFRDERR)" description in Blackfin HRM only applys to BF537
rev. < 0.3. In later rev. and later announced Blackfin chips, such as BF527 and
BF548, a new TWI master feature "Clock Stretching" is added into the TWI controller,
BUFRDERR interrupt is not triggered after TX FIFO is empty.This patch sets RSTART bit at the beginning of the first transfer. The SCL and SDA
is hold till XMTSERV interrupt of last TX byte is served. Restart transfer is not broken
in high system load.Signed-off-by: Sonic Zhang
[wsa: fixed spaces around operators]
Signed-off-by: Wolfram Sang
-
In order to mark I2C transfer fail when MEN bit in I2C controller is
reset unexpectedly in MCOMP interrupt, interrupt status bits XMTSERV or
RCVSERV should be checked.Master Transfer Complete (MCOMP).
[1] The initiated master transfer has completed. In the absence of a
repeat start, the bus has been released.
[0] The completion of a transfer has not been detected.Signed-off-by: Sonic Zhang
[wsa: fixed spaces around operators and typo in commit message]
Signed-off-by: Wolfram Sang
-
Some fault i2c device may hold the sda/scl line and cause i2c driver
wait in the BUS busy loop. The I2C framework already retry the
transfer loop before timeout. Return -EAGAIN instead of pull BUSBUSY
in the other loop.Signed-off-by: Sonic Zhang
Signed-off-by: Wolfram Sang -
For transfer counts > 255 bytes i2c-bfin-twi sets the data
transfer counter DCNT to 0xFF indicating unlimited transfers.
It then uses a flag iface->manual_stop to manually issue the STOP
condition, once the required amount of bytes are received.We found that on I2C receive operation issuing the STOP condition
together with a FULL RCV FIFO (2bytes) will cause SDA and SCL be
constantly driven low.This patch stops receiving operation immediately in last rx interrupt.
This patch also wakes up waiting process when transfer completes.
Signed-off-by: Sonic Zhang
Signed-off-by: Wolfram Sang -
For transfer counts > 255 bytes i2c-bfin-twi sets the data
transfer counter DCNT to 0xFF indicating unlimited transfers.
It then uses a flag iface->manual_stop to manually issue the STOP
condition, once the required amount of bytes are received.We found that on I2C receive operation issuing the STOP condition
together with a FULL RCV FIFO (2bytes) will cause SDA and SCL be
constantly driven low.Temporary workaround until further investigation:
Discard the RCV FIFO before issuing the STOP condition.Signed-off-by: Michael Hennerich
Signed-off-by: Sonic Zhang
Signed-off-by: Wolfram Sang
12 Jul, 2012
16 commits
-
The driver currently checks the platform device id and rejects platform
device id different from 0. This prevents the registration of a second
i2c controller on systems where a second one might be available (such as
Kirkwood 88F6282).CC: Andrew Lunn
Signed-off-by: Nicolas Schichan
Signed-off-by: Florian Fainelli
Signed-off-by: Wolfram Sang -
The OMAP3530 is based upon the same silicon as the OMAP3430 and so the I2C
revision is the same for 3430 and 3530. However, the OMAP3630 device has the
same I2C revision as OMAP4. Correct the revision definition to reflect this.This patch is based on work done by Jon Hunter
Changes from his patch
- Update OMAP_I2C_REV_ON_3430 also to reflect that it is same as 3530Reviewed-by: Felipe Balbi
Signed-off-by: Jon Hunter
Signed-off-by: Shubhrajyoti D
Signed-off-by: Wolfram Sang -
Use INIT_COMPLETION instead of init_completion in transfer.
Reviewed-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
Signed-off-by: Wolfram Sang -
Use SET_RUNTIME_PM_OPS macro to set runtime functions.
Acked-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
Signed-off-by: Wolfram Sang -
The omap_i2c_remove function may not be needed after
device exit so the memory could be freed.Signed-off-by: Shubhrajyoti D
Signed-off-by: Wolfram Sang -
To provide the late suspend and early resume for i2c
driver, convert the suspend/resume as
suspend-> suspend_noirq
resume -> resume_noirqSigned-off-by: Laxman Dewangan
[wsa: fixed up to match previous pm_ops change]
Signed-off-by: Wolfram Sang
-
Make the Tegra I2C controller driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.Signed-off-by: Rafael J. Wysocki
Acked-by: Laxman Dewangan[wsa] adapt to of_match_ptr change
Signed-off-by: Wolfram Sang
-
Make the ST-Ericsson U300 I2C controller driver define its PM
callbacks through a struct dev_pm_ops object rather than by using
legacy PM hooks in struct platform_driver.Signed-off-by: Rafael J. Wysocki
Reviewed-by: Linus Walleij
Signed-off-by: Wolfram Sang -
Make the PKUnity-v3 SoC I2C controller driver define its suspend
callback through a struct dev_pm_ops object rather than by using
a legacy PM hook in struct platform_driver. The empty resume
callback is not necessary, so remove it.Signed-off-by: Rafael J. Wysocki
Acked-by: Guan Xuetao
Signed-off-by: Wolfram Sang -
Make the PNX I2C controller driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.Signed-off-by: Rafael J. Wysocki
Signed-off-by: Wolfram Sang -
Make the OpenCores I2C controller driver define its PM callbacks
through a struct dev_pm_ops object rather than by using legacy PM
hooks in struct platform_driver.Signed-off-by: Rafael J. Wysocki
Signed-off-by: Wolfram Sang -
Make the Blackfin On-Chip Two Wire Interface driver define its PM
callbacks through a struct dev_pm_ops object rather than by using
legacy PM hooks in struct platform_driver.Signed-off-by: Rafael J. Wysocki
Acked-by: Sonic Zhang
Signed-off-by: Wolfram Sang -
Make the AT91 Two-Wire Interface driver define its PM callbacks
through a struct dev_pm_ops object rather than by using legacy PM
hooks in struct platform_driver.Signed-off-by: Rafael J. Wysocki
Signed-off-by: Wolfram Sang -
In place of defining match_table for non-DT based as NULL,
use of_match_ptr() for initialzing the of_match_table.Signed-off-by: Laxman Dewangan
Signed-off-by: Wolfram Sang -
Use clk_disable_unprepare() inplace of clk_disable().
This was missed as part of moving clock enable/disable to
prepare/unprepare for using the common clock framework.Signed-off-by: Laxman Dewangan
Signed-off-by: Wolfram Sang -
Remove unused member variable "iomem" of the
i2c device structure.This variable becomes unused when converted all allocation
to devm_* in following change:
i2c: tegra: make all resource allocation through devm_*Signed-off-by: Laxman Dewangan
Signed-off-by: Wolfram Sang
10 Jul, 2012
1 commit
-
sparse found this assignment of u32 to an int. Fix it:
drivers/i2c/busses/i2c-imx.c:540:56: warning: incorrect type in argument 3 (different signedness)
and also fix the type in platform_data. All current users use values
which fit into the old and new type, so it is a safe change.Signed-off-by: Wolfram Sang
Reviewed-by: Richard Zhao
Acked-by: Sascha Hauer
09 Jul, 2012
7 commits
-
With the new i.mx clock framework the i2c clock is registered as:
clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx-i2c.0")
So we do not need to pass "i2c_clk" string and can use NULL instead.
Signed-off-by: Fabio Estevam
Acked-by: Sascha Hauer[wsa: rebased on top of the devm-conversion]
Signed-off-by: Wolfram Sang
-
Make sure we prepare/unprepare the clock for the ST U300
I2C driver as is required by the clk API especially if you
use common clock.Signed-off-by: Linus Walleij
Signed-off-by: Wolfram Sang -
This patch mutes the false positive compiler warning:
drivers/i2c/busses/i2c-mxs.c: In function 'mxs_i2c_xfer_msg':
drivers/i2c/busses/i2c-mxs.c:206:8: warning: 'data' may be used uninitialized in this function [-Wuninitialized]
drivers/i2c/busses/i2c-mxs.c:196:6: note: 'data' was declared hereSigned-off-by: Marc Kleine-Budde
Signed-off-by: Wolfram Sang -
Signed-off-by: Virupax Sadashivpetimath
Signed-off-by: Srinidhi KASAGAR
Acked-by: Linus Walleij
Signed-off-by: Wolfram Sang -
The gateware device has been used outside of the Nomadik world, using
the pci-amba bridge driver, so loosen the dependencies.Signed-off-by: Alessandro Rubini
Acked-by: Giancarlo Asnaghi
Tested-by: Linus Walleij
Signed-off-by: Wolfram Sang -
The i2c-nomadik gateware is really a PrimeCell APB device. By hosting
the driver under the amba bus we can access it more easily, for
example using the generic pci-amba driver. The patch also fixes the
mach-ux500 users, so they register an amba device instead than a
platform device.Signed-off-by: Alessandro Rubini
Acked-by: Giancarlo Asnaghi
Tested-by: Linus Walleij
Signed-off-by: Wolfram Sang -
The header and driver are only used by arm/mach-u8500 (and potentially
arm/mach-nomadik), but the STA2X11 I/O Hub exports on PCIe a number of
devices, including i2c-nomadik. This patch allows compilation of the
driver under x86.Signed-off-by: Alessandro Rubini
Acked-by: Giancarlo Asnaghi
Tested-by: Linus Walleij
Signed-off-by: Wolfram Sang