aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/i2c.c
Commit message (Collapse)AuthorAgeFilesLines
* merge more graphics stuff from 3.2.72Wolfgang Wiedmeyer2015-10-231-13/+32
|
* arm: omap: i2c: fix compile warningFelipe Balbi2011-01-271-1/+1
| | | | | | | | | | | Fix the following compile warning: arch/arm/plat-omap/i2c.c:120:13: warning: 'omap_pm_set_max_mpu_wakeup_lat_compat' defined but not used arch/arm/plat-omap/i2c.c:125:38: warning: 'omap_i2c_latency' defined but not used Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* I2C: i2c-omap: Change device name: i2c_omap -> omap_i2cBenoit Cousson2010-12-201-1/+1
| | | | | | | | | | | | | | | | | The convention for omap device naming is omap_XXX. Rename the device and driver name in order to stick to this naming convention. Change device name in clock nodes as well. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Rajendra Nayak <rnayak@ti.com> Cc: Ben Dooks <ben-i2c@fluff.org> Acked-by: Paul Walmsley <paul@pwsan.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: Fix undefined reference to omap2_i2c_mux_pinsTony Lindgren2010-12-071-0/+7
| | | | | | | | | In some cases we can get error function `omap2_i2c_add_bus': arch/arm/plat-omap/i2c.c:136: undefined reference to `omap2_i2c_mux_pins' arch/arm/plat-omap/i2c.c:141: undefined reference to `omap_hwmod_lookup' arch/arm/plat-omap/i2c.c:157: undefined reference to `omap_device_build' Signed-off-by: Tony Lindgren <tony@atomide.com>
* OMAP1: I2C: fix device initializationPaul Walmsley2010-12-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | Commit 4d17aeb1c5b2375769446d13012a98e6d265ec13 ("OMAP: I2C: split device registration and convert OMAP2+ to omap_device") broke I2C on OMAP1. The following messages appear at boot: i2c_omap i2c_omap.1: failure requesting irq 0 i2c_omap: probe of i2c_omap.1 failed with error -22 Investigation revealed that a chunk of code is missing from the original plat-omap/i2c.c file which configured the IRQ and base address for the I2C block on OMAP1. Upon adding this back, the OMAP1 I2C block seems to initialize correctly. Thanks to Cory Maccarrone <darkstar6262@gmail.com> for reporting the bug, and apologies for the breakage. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Tested-by: Cory Maccarrone <darkstar6262@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* OMAP: I2C: split device registration and convert OMAP2+ to omap_devicePaul Walmsley2010-11-091-75/+49
| | | | | | | | | | | | | Split the OMAP1 and OMAP2+ platform_device build and register code. Convert the OMAP2+ variant to use omap_device. This patch was developed in collaboration with Rajendra Nayak <rnayak@ti.com>. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
* OMAP: PM constraints: add return values; add requesting device param to ↵Paul Walmsley2010-07-261-1/+11
| | | | | | | | | | | | | | | | | | | | omap_pm_set_max_dev_wakeup_lat() Add return values to the PM constraint functions. This allows the PM core to provide feedback to the caller if a constraint is not possible. Update the one upstream user of omap_pm_set_max_mpu_wakeup_lat() to add a compatibility wrapper, needed until the driver is changed. Update some of the documentation to conform more closely to kerneldoc style. Add an additional device parameter to omap_pm_set_max_dev_wakeup_lat() to identify the device requesting the constraint. This is so repeated calls to omap_pm_set_max_dev_wakeup_lat() with the same requesting device can override the device's previously-set constraint. Also, it allows the PM core to make a decision as to whether or not the constraint should be satisfied, based on the caller's identity. Signed-off-by: Paul Walmsley <paul@pwsan.com>
* omap4: Add support for i2c initTony Lindgren2010-05-201-7/+26
| | | | | | | | | Add support for i2c init for omap4. This patch is based on and earlier patch by Santosh Shilimkar <santosh.shilimkar@ti.com>. Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: Fix i2c platform init code for omap4Tony Lindgren2010-05-201-20/+47
| | | | | | | | | | | | Add separate omap_i2c_add_bus functions for mach-omap1 and mach-omap2. Make the mach-omap2 init set the interrupt dynamically to support. This is needed to add support for omap4 in a way that works with multi-omap builds. This will eventually get fixed in a generic way with the omap hwmods. Signed-off-by: Tony Lindgren <tony@atomide.com>
* i2c-omap: add mpu wake up latency constraint in i2cKalle Jokiniemi2010-05-201-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While waiting for completion of the i2c transfer, the MPU could hit OFF mode and cause several msecs of delay that made i2c transfers fail more often. The extra delays and subsequent re-trys cause i2c clocks to be active more often. This has also an negative effect on power consumption. Created a mechanism for passing and using the constraint setting function in driver code. The used mpu wake up latency constraints are now set individually per bus, and they are calculated based on clock rate and fifo size. Thanks to Jarkko Nikula, Moiz Sonasath, Paul Walmsley, and Nishanth Menon for tuning out the details of this patch. Updates by Kevin as requested by Tony: - Remove omap_set_i2c_constraint_func() in favor of conditionally adding the flag in omap_i2c_add_bus() in order to keep all the OMAP conditional checking in a single location. - Update set_mpu_wkup_lat prototypes to match OMAP PM layer so OMAP PM function can be used directly in pdata. Cc: Moiz Sonasath <m-sonasath@ti.com> Cc: Jarkko Nikula <jhnikula@gmail.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Nishanth Menon <nm@ti.com> Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* omap: i2c: Fix muxing for command line enabled busJarkko Nikula2010-02-251-2/+8
| | | | | | | | | | | | The commit b63128e81214cc2db2995d690438055c26d213a5 broke the pin muxing for I2C busses that are enabled from the kernel command line. Fix this by defining the board registration function omap_register_i2c_bus in common platform code as it was before but keep the muxing in architecture dependent files. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap3: Replace ARCH_OMAP34XX with ARCH_OMAP3Tony Lindgren2010-02-151-4/+4
| | | | | | Replace ARCH_OMAP34XX with ARCH_OMAP3 Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap2: Convert ARCH_OMAP24XX to ARCH_OMAP2Tony Lindgren2010-02-151-2/+2
| | | | | | Convert ARCH_OMAP24XX to ARCH_OMAP2 Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: Split i2c platform init for mach-omap1 and mach-omap2Tony Lindgren2009-12-111-42/+2
| | | | | | | | | | | | Otherwise we cannot limit new mux code to mach-omap2. The same signal names should eventually work for other omaps under mach-omap2. Note that these pins don't need to be OMAP_PIN_INPUT_PULLUP, just OMAP_PIN_INPUT is enough. Cc: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* omap: headers: Move remaining headers from include/mach to include/platTony Lindgren2009-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the remaining headers under plat-omap/include/mach to plat-omap/include/plat. Also search and replace the files using these headers to include using the right path. This was done with: #!/bin/bash mach_dir_old="arch/arm/plat-omap/include/mach" plat_dir_new="arch/arm/plat-omap/include/plat" headers=$(cd $mach_dir_old && ls *.h) omap_dirs="arch/arm/*omap*/ \ drivers/video/omap \ sound/soc/omap" other_files="drivers/leds/leds-ams-delta.c \ drivers/mfd/menelaus.c \ drivers/mfd/twl4030-core.c \ drivers/mtd/nand/ams-delta.c" for header in $headers; do old="#include <mach\/$header" new="#include <plat\/$header" for dir in $omap_dirs; do find $dir -type f -name \*.[chS] | \ xargs sed -i "s/$old/$new/" done find drivers/ -type f -name \*omap*.[chS] | \ xargs sed -i "s/$old/$new/" for file in $other_files; do sed -i "s/$old/$new/" $file done done for header in $(ls $mach_dir_old/*.h); do git mv $header $plat_dir_new/ done Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Update contact address of I2C registration helperJarkko Nikula2009-05-251-1/+1
| | | | | | | This email address is going to expire soon so update it. Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Add method to register additional I2C busses on the command line, v2Jarkko Nikula2009-03-231-21/+52
| | | | | | | | | | | | | This patch extends command line option "i2c_bus=bus_id,clkrate" so that it allow to register additional I2C busses that are not registered with omap_register_i2c_bus from board initialization code. Purpose of this is to register additional board busses which are routed to external connectors only without any on board I2C devices. Cc: linux-i2c@vger.kernel.org Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Add command line option for I2C bus speed, v2Jarkko Nikula2009-03-231-10/+44
| | | | | | | | | | | | | | | This patch adds a new command line option "i2c_bus=bus_id,clkrate" into I2C bus registration helper. Purpose of the option is to override the default board specific bus speed which is supplied by the omap_register_i2c_bus. The default bus speed is typically set to speed of slowest I2C chip on the bus and overriding allow to use some experimental configurations or updated chip versions without any kernel modifications. Cc: linux-i2c@vger.kernel.org Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Add documentation for function omap_register_i2c_busJarkko Nikula2009-03-231-0/+9
| | | | | Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] fix AT91, davinci, h720x, ks8695, msm, mx2, mx3, netx, omap1, omap2, ↵Russell King2009-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | pxa, s3c arch/arm/mach-at91/at91cap9.c:337: error: 'NR_AIC_IRQS' undeclared here (not in a function) arch/arm/mach-at91/at91rm9200.c:301: error: 'NR_AIC_IRQS' undeclared here (not in a function) arch/arm/mach-at91/at91sam9260.c:351: error: 'NR_AIC_IRQS' undeclared here (not in a function) arch/arm/mach-at91/at91sam9261.c:287: error: 'NR_AIC_IRQS' undeclared here (not in a function) arch/arm/mach-at91/at91sam9263.c:312: error: 'NR_AIC_IRQS' undeclared here (not in a function) arch/arm/mach-at91/at91sam9rl.c:304: error: 'NR_AIC_IRQS' undeclared here (not in a function) arch/arm/mach-h720x/h7202-eval.c:38: error: implicit declaration of function 'IRQ_CHAINED_GPIOB' arch/arm/mach-ks8695/devices.c:46: error: 'KS8695_IRQ_WAN_RX_STATUS' undeclared here (not in a function) arch/arm/mach-msm/devices.c:28: error: 'INT_UART1' undeclared here (not in a function) arch/arm/mach-mx2/devices.c:233: error: 'MXC_GPIO_IRQ_START' undeclared here (not in a function) arch/arm/mach-mx3/devices.c:128: error: 'MXC_GPIO_IRQ_START' undeclared here (not in a function) arch/arm/mach-omap1/mcbsp.c:140: error: 'INT_730_McBSP1RX' undeclared here (not in a function) arch/arm/mach-omap1/mcbsp.c:165: error: 'INT_McBSP1RX' undeclared here (not in a function) arch/arm/mach-omap1/mcbsp.c:200: error: 'INT_McBSP1RX' undeclared here (not in a function) arch/arm/mach-omap2/board-apollon.c:286: error: implicit declaration of function 'omap_set_gpio_direction' arch/arm/mach-omap2/mcbsp.c:154: error: 'INT_24XX_MCBSP1_IRQ_RX' undeclared here (not in a function) arch/arm/mach-omap2/mcbsp.c:181: error: 'INT_24XX_MCBSP1_IRQ_RX' undeclared here (not in a function) arch/arm/mach-pxa/e350.c:36: error: 'IRQ_BOARD_START' undeclared here (not in a function) arch/arm/plat-s3c/dev-i2c0.c:32: error: 'IRQ_IIC' undeclared here (not in a function) ... Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP3: Add OMAP34xx pin multiplexing into I2C bus registration helperJarkko Nikula2008-12-101-19/+36
| | | | | | | | - Simplify function omap_i2c_mux_pins - Add OMAP34xx pin multiplexing for busses 1 - 3 Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King2008-08-071-1/+1
| | | | | | This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Eliminate useless includes of asm/mach-types.hRussell King2008-08-071-1/+0
| | | | | | | | There are 43 includes of asm/mach-types.h by files that don't reference anything from that file. Remove these unnecessary includes. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: Add helper module for board specific I2C bus registrationJarkko Nikula2008-02-081-0/+148
This helper module simplifies I2C bus registration for different OMAP platforms by doing registration in one place only and to allow board specific bus configuration like clock rate and number of busses configured. Helper should cover OMAP processors from first to third generation. This patch just adds the feature and current implementation cleanup and board file modifications will be done in following patches. Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>