aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-09-14ARM: imx: move platform_data definitionsArnd Bergmann1-1/+1
Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the imx include directories Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Sascha Hauer <kernel@pengutronix.de> Acked-by: Vinod Koul <vinod.koul@linux.intel.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Dan Williams <djbw@fb.com> Cc: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org> Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de> Cc: Chris Ball <cjb@laptop.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Alan Cox <alan@linux.intel.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Liam Girdwood <lrg@ti.com> Cc: Javier Martin <javier.martin@vista-silicon.com> Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2012-09-14ARM: davinci: move platform_data definitionsArnd Bergmann1-1/+1
Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the davinci include directories Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Sekhar Nori <nsekhar@ti.com> Cc: Kevin Hilman <khilman@ti.com> Cc: "Ben Dooks" <ben-linux@fluff.org> Cc: "Wolfram Sang" <w.sang@pengutronix.de> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Chris Ball <cjb@laptop.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Liam Girdwood <lrg@ti.com> Cc: davinci-linux-open-source@linux.davincidsp.com
2012-09-13i2c: tegra: dynamically control fast clkLaxman Dewangan1-7/+28
Tegra I2C driver enables the fast clock during initialization and does not disable till driver removed. Enable this clock before transfer and disable after transfer done. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-09-13i2c: tegra: I2_M_NOSTART functionality not supported in Tegra20Laxman Dewangan1-14/+47
Tegra20 i2c controller does not support the continue transfer which implements the I2C_M_NOSTART functionality of i2c protocol mangling. Removing the I2C_M_NOSTART functionality support for Tegra20. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-09-13i2c: tegra: pass proper name for getting clockLaxman Dewangan1-23/+23
Tegra's i2c controller require two clock sources named as div_clk and fast_clk. This change make sure that driver pass the correct clock's name when it acquires clock handle. Also change the variable name to reflect the correct clock handles. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-09-13Merge branch 'ofdeviceiddata' of git://git.pengutronix.de/git/ukl/linux into next/fixes-non-criticalOlof Johansson2-7/+8
From "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>: this is the 2nd version of this series whose goal is to make struct of_device_id.data const. Conceptually a driver must not modify the data contained there so making it const is the right thing. v1 of this series was sent with Message-id: 1342182734-321-1-git-send-email-y. Changes since then are: - powerpc fixes - several new consts that were found by Arnd that are possible after patch 19. Arnd suggested to take this series via arm-soc late for 3.6 in one go because patch 19 depends on the former patches but is a precondition to the latter and it fixes a few warnings. So getting it in via the respective maintainer trees would need a much bigger coordination effort. That means I prefer getting Acks over you taking the patch. Vinod Koul already took dmaengine: at_hdmac: add a few const qualifiers that is in next-20120723 as 7fd63ccdad72 now. Vinod, I don't follow your pull requests, but assuming you didn't let it already pull for 3.6 I suggest you drop it from your queue and I just take your Ack. This series was build tested for arm (all defconfigs) and powerpc (all defconfigs and an allyesconfig) and grep didn't find more issues. As before it introduces a warning in drivers/regulator/twl-regulator.c. This driver does modify its .of_match_table when a device is bound which doesn't fits the concept of independant devices. Arnd noticed another new warning in drivers/scsi/qlogicpti.c that isn't that easy to resolve, because the pointer to (now) const data is passed as first argument to scsi_host_alloc. To fix that properly struct Scsi_Host.hostt needs to get a const, too. Alternatively I could introduce a cast removing the const, but I don't like that. * 'ofdeviceiddata' of git://git.pengutronix.de/git/ukl/linux: (25 commits) dma: tegra: make data used as *of_device_id.data const can: mpc5xxx_can: make data used as *of_device_id.data const macintosh/mediabay: make data used as *of_device_id.data const i2c/mpc: make data used as *of_device_id.data const mfd/da9052: make i2c_device_id array const powerpc/fsl_msi: drop unneeded cast to non-const pointer gpio/gpio-omap: make platformdata used as *of_device_id.data const of: add const to struct *of_device_id.data dma: tegra: make tegra_dma.chip_data a pointer to const data watchdog/mpc8xxx: add a const qualifier powerpc/celleb_pci: add a const qualifier powerpc/fsl_msi: add a const qualifier powerpc/83xx: add a const qualifier macintosh/mediabay: add a const qualifier mmc/omap_hsmmc: add a const qualifier i2c/mpc: add a const qualifier i2c/i2c-omap: add a const qualifier gpio/mpc8xxx: add a const qualifier gpio/gpio-omap.c: add a const qualifier misc/atmel_tc: make atmel_tc.tcb_config member point to const data Signed-off-by: Arnd Bergmann <arnd@arndb.de> [olof: repulled a v3 version of the branch that rebased to add some more acked-bys and added one more patch on top for tegra] Signed-off-by: Olof Johansson <olof@lixom.net>
2012-09-12i2c: mxs: correctly setup speed for non devicetreeWolfram Sang1-7/+6
Commit cd4f2d4 (i2c: mxs: Set I2C timing registers for mxs-i2c) only covered the case for devicetree and made platform_data based boards bail out with -EINVAL. Correctly support the latter one, too. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: pnx: Fix read transactions of >= 2 bytesRoland Stigge1-20/+28
On transactions with n>=2 bytes, the controller actually wrongly clocks in n+1 bytes. This is caused by the (wrong) assumption that RFE in the Status Register is 1 iff there is no byte already ordered (via a dummy TX byte). This lead to the implementation of synchronized byte ordering, e.g.: Dummy-TX - RX - Dummy-TX - RX - ... But since RFE actually stays high after some Dummy-TX, it rather looks like: Dummy-TX - Dummy-TX - RX - Dummy-TX - RX - (RX) The last RX byte is clocked in by the bus controller, but ignored by the kernel when filling the userspace buffer. This patch fixes the issue by asking for RX via Dummy-TX asynchronously. Introducing a separate counter for TX bytes. Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: pnx: Fix bit definitionsRoland Stigge1-2/+3
The I2C Control Register bits RFDAIE and RFFIE were mixed up. In addition to this fix, this patch adds the missing bit DRSIE for completeness. Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12omap-i2c: fix incorrect log message when using a device treeFlorian Vaussard1-3/+3
When booting using a device tree, the adapter number is dynamically assigned after the log message is sent. This patch modifies the log message to get a correct adapter id. Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> Tested-by: Benoit Cousson <b-cousson@ti.com> Acked-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: sanitize exit pathFelipe Balbi1-13/+13
move the goto out label one line down, so that it can be used when stat is read as zero. All other exits, can be done with a break statement. While at that, also break out as soon as we complete draining IRQ, since at that time we know we transferred everything there was to be transferred. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: switch over to autosuspend APIFelipe Balbi1-2/+10
this helps us reduce unnecessary pm transitions in case we have another i2c message starting soon. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: remove unnecessary pm_runtime_suspended checkFelipe Balbi1-3/+0
before starting any messages we call pm_runtime_get_sync() which will make sure that by the time we program a transfer and our IRQ handler gets called, we're not suspended anymore. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: switch to threaded IRQ supportFelipe Balbi1-6/+37
for OMAP2, we can easily switch over to threaded IRQs on the I2C driver. This will allow us to spend less time in hardirq context. Signed-off-by: Felipe Balbi <balbi@ti.com> [Trivial formating changes] Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: remove redundant status readShubhrajyoti D1-2/+0
Currently omap_i2c_ack_stat doesn't use the stat variable. After the read of the I2C_STAT_REG it is not used. Remove the redundant read of the status register. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: get rid of the "complete" labelFelipe Balbi1-3/+13
we can ack stat and complete the command from the errata handling itself. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: resize fifos before each messageFelipe Balbi1-32/+51
This patch will try to avoid the usage of draining feature by reconfiguring the FIFO the start condition of each message based on the message's size. By doing that, we will be better utilizing the FIFO when doing big transfers. While at that also drop the now unneeded check for dev->buf_len as we always know the amount of data to be transmitted. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: simplify IRQ exit pathFelipe Balbi1-12/+8
instead of having multiple return points, use a goto statement to make that clearer. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: always return IRQ_HANDLEDFelipe Balbi1-1/+1
Always return IRQ_HANDLED otherwise we could get our IRQ line disabled due to many spurious IRQs. Signed-off-by: Felipe Balbi <balbi@ti.com> [Trivial changes to commitlogs] Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: simplify errata checkFelipe Balbi1-3/+1
omap_i2c_dev is allocated with kzalloc(), so we need not initialize b_hw to zero. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: bus: add a receiver flagFelipe Balbi1-0/+8
that way we can ignore TX IRQs while in receiver mode and ignore RX IRQs while in transmitter mode. Signed-off-by: Felipe Balbi <balbi@ti.com> [Remove unnecessary braces] Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: switch to platform_get_irq()Felipe Balbi1-5/+7
that's a nice helper from drivers core which will give us the exact IRQ number, instead of a pointer to an IRQ resource. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: ack IRQ in partsFelipe Balbi1-12/+16
According to flow diagrams on OMAP TRMs, we should ACK the IRQ as they happen. Signed-off-by: Felipe Balbi <balbi@ti.com> [Ack the stat OMAP_I2C_STAT_AL in case of arbitration lost] Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: switch over to do {} while loopFelipe Balbi1-6/+14
this will make sure that we execute at least once. No functional changes otherwise. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: re-factor receive/transmit data loopFelipe Balbi1-122/+82
re-factor the common parts to a separate function, so that code is easier to read and understand. No functional changes. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: improve i462 errata handlingFelipe Balbi1-13/+30
Make it not depend on ISR's local variables in order to make it easier to re-factor the transmit data loop. Also since we are waiting for XUDF(Transmitter underflow) just before writing data lets not flag the underflow. This is anyways going to go once we write the data. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: split out [XR]DR and [XR]RDYFelipe Balbi1-34/+92
While they do pretty much the same thing, there are a few peculiarities. Specially WRT erratas, it's best to split those out and re-factor the read/write loop to another function which both cases call. This last part will be done on another patch. While at that, also avoid an unncessary register read since dev->fifo_len will always contain the correct amount of data to be transferred. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: simplify omap_i2c_ack_stat()Felipe Balbi1-9/+10
stat & BIT(1) is the same as BIT(1), so let's simplify things a bit by removing "stat &" from all omap_i2c_ack_stat() calls. Code snippet (extremely simplified): if (stat & NACK) { ... omap_i2c_ack_stat(dev, stat & NACK); } if (stat & RDR) { ... omap_i2c_ack_stat(dev, stat & RDR); } and so on. The tricky place is only WRT errata handling, for example: if (*stat & (NACK | AL)) { omap_i2c_ack_stat(dev, *stat & (XRDY | XDR)); ... } but in this case, the errata says we must clear XRDY and XDR if that errata triggers, so if they just got enabled or not, it doesn't matter. Another tricky place is RDR | RRDY (likewise for XDR | XRDY): if (stat & (RDR | RRDY)) { ... omap_i2c_ack_stat(dev, stat & (RDR | RRDY)); } again here there will be no issues because those IRQs never fire simultaneously and one will only after after we have handled the previous, that's because the same FIFO is used anyway and we won't shift data into FIFO until we tell the IP "hey, I'm done with the FIFO, you can shift more data" Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-by : Santosh Shilimkar <santosh.shilimkar@ti.com> [Added the explaination from the discurssion to the commit logs] Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: add blank linesFelipe Balbi1-0/+5
trivial patch to aid readability. No functional changes. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: decrease indentation level on data handlingFelipe Balbi1-32/+31
The patch intends to decrease the indentation level on the data handling by using the fact that else of if (dev->buf_len) is same as if (!dev->buf_len) if (dev->buf_len) { aaa; } else { bbb; break; } to if (!dev->buf_len) { bbb; break; } aaa; Hence no functional changes. Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-by : Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: simplify num_bytes handlingFelipe Balbi1-4/+2
trivial patch, no functional changes If the fifo is disabled or fifo_size is 0 the num_bytes is set to 1. Else it is set to fifo_size or in case of a draining interrupt the remaining bytes in the buff stat. So the zero check is redundant and can be safely optimised. Signed-off-by: Felipe Balbi <balbi@ti.com> Reviewed-by : Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: omap: switch to devm_* APIFelipe Balbi1-29/+12
that helps deleting some boiler plate code and lets driver-core manage our resources for us. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: at91: add dt support to i2c-at91Ludovic Desroches1-0/+49
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by: Nikolaus Voss <n.voss@weinmann.de> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: at91: add new driverNikolaus Voss3-7/+516
This driver has the following properties compared to the old driver: 1. Support for multiple interfaces. 2. Interrupt driven I/O as opposed to polling/busy waiting. 3. Support for _one_ repeated start (Sr) condition, which is enough for most real-world applications including all SMBus transfer types. (The hardware does not support issuing arbitrary Sr conditions on the bus.) testing: SoC: at91sam9g45 - BQ20Z80 battery SMBus client. - on a 2.6.38 kernel with several i2c clients (temp-sensor, audio-codec, touchscreen-controller, w1-bridge, io-expanders) Signed-off-by: Nikolaus Voss <n.voss@weinmann.de> Reviewed-by: Felipe Balbi <balbi@ti.com> Tested-by: Hubert Feurstein <h.feurstein@gmail.com> Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com> Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com> [wsa: squashed with the following patches from Ludovic to have some flaws fixed: i2c: at91: use managed resources i2c: at91: add warning about transmission issues for some devices i2c: at91: use an id table for SoC dependent parameters ] Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: at91: remove old polling driverNikolaus Voss2-316/+0
It will get replaced by a superior one. Safe to remove since this one depends on BROKEN anyhow. Signed-off-by: Nikolaus Voss <n.voss@weinmann.de> Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com> Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com> [wsa: added commit message] Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: nomadik: stop fetching the regulatorLinus Walleij1-17/+0
The regulator fetched by the Nomadik I2C driver is actually a voltage domain regulator. Stop doing this in the driver and let the power domain code handle any regulators, as discussed on the list. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-12i2c: davinci: add OF supportHeiko Schocher1-11/+37
add of support for the davinci i2c driver. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Sekhar Nori <nsekhar@ti.com> [wsa: fix indentation in the binding description] Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-11i2c: imx: Use dev_dbg logging styleFabio Estevam1-2/+2
Use dev_dbg logging style as it is done in other parts of this driver. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-11i2c: imx: Use dev_info to indicate that i2c driver was succesfully registeredFabio Estevam1-1/+1
It is useful information in dmesg to have a message indicating that the i2c driver was succesfully registered, so promote it to dev_info. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-11i2c/mpc: make data used as *of_device_id.data constArnd Bergmann1-5/+5
Since of_device_id.data is declared as a pointer to const data a few more consts can be added in this driver. [ukl: split Arnd's patch by driver] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2012-09-11i2c/mpc: add a const qualifierUwe Kleine-König1-1/+1
This prepares *of_device_id.data becoming const. Without this change the following warning would occur: drivers/i2c/busses/i2c-mpc.c: In function 'fsl_i2c_probe': drivers/i2c/busses/i2c-mpc.c:650:31: warning: initialization discards 'const' qualifier from pointer target type [enabled by default] Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2012-09-11i2c/i2c-omap: add a const qualifierUwe Kleine-König1-1/+2
This prepares *of_device_id.data becoming const. Without this change the following warning would occur: drivers/i2c/busses/i2c-omap.c: In function 'omap_i2c_probe': drivers/i2c/busses/i2c-omap.c:1025: warning: assignment discards qualifiers from pointer target type Reviewed-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2012-09-10i2c-core: Fix for lockdep validatorJean Delvare1-2/+20
If kernel is compiled with CONFIG_PROVE_LOCKING the validator raises an error when a multiplexer is removed via sysfs and sub-clients are connected to it. This is a false positive. Documentation/lockdep-design.txt recommends to handle this via calls to mutex_lock_nested(). Based on an earlier fix from Michael Lawnick. Note that the extra code resolves to nothing unless CONFIG_DEBUG_LOCK_ALLOC=y. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Michael Lawnick <ml.lawnick@gmx.de>
2012-09-10i2c-designware: Fix build error if CONFIG_I2C_DESIGNWARE_PLATFORM=y && CONFIG_I2C_DESIGNWARE_PCI=yAxel Lin3-2/+19
This patch adds config I2C_DESIGNWARE_CORE in Kconfig, and let I2C_DESIGNWARE_PLATFORM and I2C_DESIGNWARE_PCI select I2C_DESIGNWARE_CORE. Because both I2C_DESIGNWARE_PLATFORM and I2C_DESIGNWARE_PCI can be built as built-in or module, we also need to export the functions in i2c-designware-core. This fixes below build error when CONFIG_I2C_DESIGNWARE_PLATFORM=y && CONFIG_I2C_DESIGNWARE_PCI=y: LD drivers/i2c/busses/built-in.o drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_clear_int': i2c-designware-core.c:(.text+0xa10): multiple definition of `i2c_dw_clear_int' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x928): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_init': i2c-designware-core.c:(.text+0x178): multiple definition of `i2c_dw_init' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x90): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `dw_readl': i2c-designware-core.c:(.text+0xe8): multiple definition of `dw_readl' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x0): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_isr': i2c-designware-core.c:(.text+0x724): multiple definition of `i2c_dw_isr' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x63c): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_xfer': i2c-designware-core.c:(.text+0x4b0): multiple definition of `i2c_dw_xfer' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x3c8): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_is_enabled': i2c-designware-core.c:(.text+0x9d4): multiple definition of `i2c_dw_is_enabled' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x8ec): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `dw_writel': i2c-designware-core.c:(.text+0x124): multiple definition of `dw_writel' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x3c): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_xfer_msg': i2c-designware-core.c:(.text+0x2e8): multiple definition of `i2c_dw_xfer_msg' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x200): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_enable': i2c-designware-core.c:(.text+0x9c8): multiple definition of `i2c_dw_enable' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x8e0): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_read_comp_param': i2c-designware-core.c:(.text+0xa24): multiple definition of `i2c_dw_read_comp_param' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x93c): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_disable': i2c-designware-core.c:(.text+0x9dc): multiple definition of `i2c_dw_disable' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x8f4): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_func': i2c-designware-core.c:(.text+0x710): multiple definition of `i2c_dw_func' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x628): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_disable_int': i2c-designware-core.c:(.text+0xa18): multiple definition of `i2c_dw_disable_int' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x930): first defined here make[3]: *** [drivers/i2c/busses/built-in.o] Error 1 make[2]: *** [drivers/i2c/busses] Error 2 make[1]: *** [drivers/i2c] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Jiri Slaby <jslaby@suse.cz> Cc: stable@vger.kernel.org [3.2+]
2012-09-10i2c-i801: Add Device IDs for Intel Lynx Point-LP PCHJames Ralston2-0/+4
Add the SMBus Device IDs for the Intel Lynx Point-LP PCH. Signed-off-by: James Ralston <james.d.ralston@intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-09-05Merge branch 'pnx4008-removal' of git://git.antcom.de/linux-2.6 into next/cleanupOlof Johansson1-1/+1
Removes the pnx4008 platform support, which hasn't seen any active development since 2006 and seems to be unused these days. * 'pnx4008-removal' of git://git.antcom.de/linux-2.6: ARM: mach-pnx4008: Remove architecture
2012-09-04Merge commit 'a849088aa1' from rmk/fixes into cleanup/io-pciArnd Bergmann40-992/+1310
As Stephen Rothwell reports, a849088aa155 ("ARM: Fix ioremap() of address zero") from the arm-current tree and commit c2794437091a ("ARM: Add fixed PCI i/o mapping") from the arm-soc tree conflict in a nontrivial way in arch/arm/mm/mmu.c. Rob Herring explains: The PCI i/o reserved area has a dummy physical address of 0 and needs to be skipped by ioremap searches. So we don't set VM_ARM_STATIC_MAPPING to prevent matches by ioremap. The vm_struct settings don't really matter when we do the real mapping of the i/o space. Since commit a849088aa155 is at the start of the fixes branch in the arm tree, we can merge it into the branch that contains the other ioremap changes. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
2012-08-26ARM: mach-pnx4008: Remove architectureRoland Stigge1-1/+1
This patch removes the ARM architecture mach-pnx4008. No direct support or user feedback since 2006. Acknowledgements from NXP/Philips and Linux arm-soc maintainers. Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-08-18i2c: tegra: protect suspend/resume callbacks with CONFIG_PM_SLEEPLaxman Dewangan1-1/+1
The CONFIG_PM doesn't actually enable any of the PM callbacks, it only allows to enable CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME. This means if CONFIG_PM is used to protect system sleep callbacks then it may end up unreferenced if only runtime PM is enabled. Hence protecting sleep callbacks with CONFIG_PM_SLEEP. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-08-18i2c: diolan-u2c: Fix master_xfer return codeGuenter Roeck1-0/+1
The master_xfer function returns 0 on success. It should return the number of successful transactions. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>