- 06 Oct, 2008 5 commits
-
-
David Brownell authored
Add a new gpiolib mechanism: gpio_chip instances can provide mappings between their (input) GPIOs and any associated IRQs. This makes it easier for platforms to support IRQs that are provided by board-specific external chips instead of as part of their core (such as SOC-integrated GPIOs). Also update the irq_to_gpio() description, saying to avoid it becuase it's not always supported. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
A variety of twl4030-core cleanups: - SIH register declarations moved from core.c to twl4030.h, for keypad, madc, bci; this decouples from twl4030-madc.h; add several omitted register decls; remove a duplicate. - Use a global "inuse" flag, not a per-slave one; - Remove pointless SLAVENUM_NUM symbols; just use 0/1/2/3 - Comments: * Add comments: header, register values * Add some section delimiters * Correct clock init and other comments - Minor stuff: * Group some variables and code with sibling * Make clock init a bit simpler * List twl5030 in supported i2c chips list * Remove needless "return;" And one IRQ-related bugfix: if the I2C timeout bug strikes while reading PIH interrupt status, force an immediate retry. Otherwise the twl4030 IRQ will never get re-enabled... Object size shrinks by 180 bytes, w00t! Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Get rid of another needless TWL header file: twl4030-pwrirq.h can easily live in twl4030.h; updating its three users. Also switch to the shared definition of the SIH_CTRL COR bit, remove useless-to-non-driver MODULE_ALIAS(), and add a note about a bug that will appear if anyone ever removes this code. No functional changes, just shrinkage. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Remove <linux/i2c/twl4030-rtc.h> by moving all the relevant contents into the driver itself, and removing the rest. Stuff removed included many useless bitmasks, and remnants of the platform data hook. Add markers inside the rtc driver to split sections apart: first data structure declarations, then the RTC driver, then platform bus glue for it all. There's still an issue with the twl4030-pwrirq.h registers ... this driver has no business touching them! This patch at least switches away from having private versions of those register definitions, and removes some unnecessary accesses to them. No functional changes, just shrinkage. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Portability fixes (simplifications) for rtc-twl4030: don't include so many needless headers, especially platform-specific ones. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
- 03 Oct, 2008 8 commits
-
-
Felipe Balbi authored
make twl4030_usb transceiver reach musb. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Paul Walmsley authored
When a non-CORE DPLL is enabled via omap3_noncore_dpll_enable(), use the user's desired rate in clk->rate to determine whether to put the DPLL into bypass or lock mode, rather than reading the DPLL's current idle state from its hardware registers. This fixes a bug observed when leaving retention. Non-CORE DPLLs were not being relocked when downstream clocks re-enabled; rather, the DPLL entered bypass mode. Problem reported by Tero Kristo <tero.kristo@nokia.com>. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Paul Walmsley authored
Commit a63efb15 broke the dss1_alwon_fck clock enable on 3430ES2+. The clock code was not waiting for the module to come out of idle. Problem reported by Rajendra Nayak <rnayak@ti.com>. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
The <linux/i2c/...> directory has too many headers for twl4030 support. Start simplifying that by moving twl430-gpio.h into the main twl4030.h and also: - Providing comments to summarize the { module, offset } logical addressing vs the { i2c_client, register } physical addressing. - Moving the { module, offset } based I/O calls next to the place those modules are defined, with slightly improved descriptions. - Adding some section markers internal to twl4030.h so unrelated things can be visually separated. - Move TWL4030_GPIO_MAX adjacent to the other GPIO symbols. - Remove two more now-obsolete symbols (for GPIO pullup/pulldown). - Have global definitions of the three SIH_CTRL register bits, following the pattern of twl4030-core.c (and fixing a minor fault handling bug in reading the clear-on-read bit). To keep things simple, the only blocks with register declarations in this file should be ones with registers that (cleanly) get shared between components ... modules with SIH registers (for IRQ handling) being the obvious candidates. No functional changes. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Move twl4030-core to drivers/mfd from drivers/i2c/chips, along with its Kconfig and Makefile help. The intent here is: no functional change, match the patch sent to LKML this morning (except, fix that spelling error in the new Kconfig text). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Tony Lindgren authored
Merge branches 'master' and 'linus' Conflicts: drivers/usb/musb/musb_core.c
-
Anand Gadiyar authored
Fix typo in omap_wdt.c introduced by a recent change Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Tony Lindgren authored
Signed-off-by: Tony Lindgren <tony@atomide.com>
-
- 01 Oct, 2008 27 commits
-
-
Santosh Shilimkar authored
SDMA channel is not disabled after transaction error. So explicitly disable it. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked By : Nishant kamat <nskamat@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Clean up the twl4030-gpio code a bit ... mostly by shrinkage. Remove a bunch of macros that are just obfuscating what the TWL4030 GPIO code is doing. Some duplicated standard macros like BIT(); others hid trivial math (mask/shift); others were completely unused. Use BIT() in several places to highlight the bitmasking and make the code more compact. Remove pointless locking calls, sanity checks, and parenthesis. And needless irq_chip. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Better TWL init on Beagle: use the setup() callback to learn IRQ assignments; and configure pullups/pulldowns. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Finish moving initialization of pullups and pulldowns for twl4030 GPIOs into board specific init. Remove partial/incorrect init code for that from the hsmmc glue. Doing this right requires some attention from board init logic, based on how the TWL chip is wired. Letting digital inputs float will waste power. Everyone with board schematics should update their board init code so it matches their boards; meanwhile, this returns to "current" behavior (all pullups disabled) but finally offers a way to do it "right". Note that the ULPI pins won't need this attention (muxed against gpio{3-5,9-12,14} pins), and neither will ones with external pullups or pulldowns (conventional for MMC/SD card detect). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Felipe Balbi authored
twl4030_bci_battery.c is now moved to new style registration of twl4030 children. During the process a few bugfixes came, the main one is that twl4030-bci was releasing the wrong irq if battery registration had failed. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Felipe Balbi authored
Brainless fixes, checkpatch.pl fixes, variable naming, etc. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Improve handling of the OMAP-specific setup in twl4030-core, and remove various warnings on non-OMAP builds. The main remaining portability problem for this core code (from a build perspective) is needing symbols like TWL4030_PWR_IRQ_BASE which are undesirable and platform-specific. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Remove some ARM and OMAP specific stuff from the twl4030 GPIO code, and some unused/undesirable CPP symbols. Add minor checkpatch fixes. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Make the hsmmc code use genirq interfaces to make sure the card detect IRQ triggers on both edges. Remove the older TWL-specific infrastructure for making that happen. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Make twl4030 GPIO support set_type() request. Plus a bit of cleanup for the simple functions. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Felipe Balbi authored
Trivial brainless fixes, a few unused headers removed, changed one printk to pr_err() and removed one comment. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
This avoids oopsing in statically linked systems when some subsystems register I2C drivers in subsys_initcall() code, but those subsystems are linked (and initialized) before I2C. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Felipe Balbi authored
use platform_get_irq() for getting irq number passed to twl4030-usb via twl4030-core.c:add_children() Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Minor IRQ-related cleanups: comment out the no-longer-used GPIO irq symbol (more to come, eventually); create RTC IRQ resource; and use that RTC IRQ resource. And incidentally, make the RTC code free the correct IRQ; it was pretty goofed up... Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Felipe Balbi authored
Previously we were failing platform_device_add_data() and returning from add_children but trying to keep going when platform_device_add() fails. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Move the twl4030 GPIO support from drivers/i2c/chips to drivers/gpio, which is a more appropriate home for this code. The Kconfig symbol name is changed to match the GPIO_* convention for such symbols, so config files must change in the obvious ways (Kconfig will prompt you). There's now some helptext. It can now be compiled as a module, should anyone really want to do that; that'll be mostly useful for test builds. Sanity check the IRQ range we're given. Initialization order needed a bit of work too: core add_children() called only after IRQs get set up, gpio uses subsys_initcall. This depends on a patch making i2c driver model init use postcore_initcall. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Provide detailed diagnostics in add_children() when DEBUG is defined ... and fix the non-DEBUG message to include minimal status, and not appear unless there was actually an error. Update the IRQ message; have it match what the GPIO subchip says, and as a precaution, make it only appear if the IRQs have been initialized. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Added a few more diagnostics when platform_device_add() fails. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Minor twl4030-core cleanups: alphabetize the creation of the new sub-function nodes; wrap an #if around the OMAP-only part (to get more general build testing when this goes upstream); remove reference to undocumented "twl3040" variant. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Moved gpio before keypad driver due to alphabetic order. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Felipe Balbi authored
Moving twl4030-madc to new style registration just like the other twl4030 children. Cc: Mikko Ylinen <mikko.k.ylinen@nokia.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Make the twl4030 core create a platform device to which its GPIO code will bind, with platform_data used to configure board-specific behaviors and configuration. Update the twl4030 GPIO code: - Morph its gpio function code into a platform driver. - Move away from IRQ (and GPIO) numbers hard-wired in headers. - Hook up the twl4030 GPIO code to gpiolib. - Start phasing out the older TWL-specific calls ... currently those are used only by arch/arm/mach-omap2/hsmmc.c setup code. - Use a mutex for locking, not a binary semaphore. NOTE: more patches pending: (a) this doesn't use pdata->pullups to initialize (currently hsmmc code always sets GPIO-0 pullup even if the board has an external pullup); (b) there's a new gpio request/free hook forthcoming in 2.6.28, which this should use; (c) likewise there's a new gpio_to_irq() hook; (d) the irq_chip set_type() mechanism needs to be supported; (e) needs to move over to drivers/gpio; (f) upcoming threaded IRQ infrastructure should be used, when that merges. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
David Brownell authored
Define platform data for configuring TWL4030 GPIOs, and provide it for all boards using these chips. For now all boards use the same fixed assignments for GPIO and IRQ numbers. Eventually we should be able to shuffle them without changing platform headers. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Felipe Balbi authored
vbus sysfs file will report the state of vbus irq coming from twl4030-usb. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Felipe Balbi authored
use new style twl4030-core to register a platform_device for twl4030-usb. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Felipe Balbi authored
let twl4030-core.c take care of twl4030_keypad registration. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Felipe Balbi authored
Clean up add_children a bit before adding more children to twl4030-core.c Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Jagadeesh Bhaskar Pakaravoor authored
One twl4030_request_gpio() should not tamper with the pullup enabling/disabling of the rest of the GPIOs. So removing the default pullup values written to REG_GPIOPUPDCTR1. Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Girish S G <girishsg@ti.com> Signed-off-by: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-
Felipe Balbi authored
The following patch fix a potential null pointer dereference in twl4030 keypad driver when parts of keypad platform_data aren't passed down to the driver. At that point kp->dbg_dev is not set yet. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-