aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tsc2007 fixes.neil-rebase-3.7NeilBrown2013-03-091-1/+5
| | | | | | pressures is being reported inverted - fix that Signed-off-by: NeilBrown <neilb@suse.de>
* bq27000: report missing device better.NeilBrown2013-03-091-1/+4
| | | | | | | One an hdq buss, a missing device reads as 0xff, not -1. So do a translation to allow detecting of a missing bus. Signed-off-by: NeilBrown <neilb@suse.de>
* added meaningful names to the gpio-keysH. Nikolaus Schaller2013-03-091-0/+2
|
* GTA04 enable off modeNeilBrown2013-03-091-1/+9
| | | | | | Seems to work at all Signed-off-by: NeilBrown <neilb@suse.de>
* OMAP:HACK - don't let CORE go to off-mode the first time.NeilBrown2013-03-091-0/+8
| | | | | | | | | | | | If CORE and USBHOST both go the off-mode the first time USBHOST does, then my device will not resume. However if we let USBHOST go to off-mode and back will CORE is in RETENSION at most, then subsequent off-mode transitions are not a problem. So for RETENTION for the first transition, and OFF for the next. Signed-off-by: NeilBrown <neilb@suse.de>
* musb: fix context save over suspend.NeilBrown2013-03-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | It is possible that the musb device will be runtime-active (not suspended) when system suspend happens. In particular, usb_suspend() will have called choose_wakeup() which might have called pm_runtime_resume(). In that case, after system-resume, the state of the device will be 'active', but the state of the registers will have been lost (if off_mode is enabled). So we need to save_context in musb_suspend (if runtime state is active), and restore_context on resume. This effectively reverts 5d193ce8 (usb: musb: PM: fix context save/restore in suspend/resume path) and adds a rest to avoid saving/restoring context if device is already runtime suspended. Tested-by: Kevin Hilman <khilman@deeprootsystems.com> Cc: "Bilovol, Ruslan" <ruslan.bilovol@ti.com> Cc: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: NeilBrown <neilb@suse.de>
* GTA04 - turnoff HFCLK in suspend.NeilBrown2013-03-091-2/+4
| | | | | | | I'm sure sure that this does anything useful, but let's have the code there and see. Signed-off-by: NeilBrown <neilb@suse.de>
* GTA04 - enable wakeup on 3G event.NeilBrown2013-03-091-0/+1
| | | | | | | Before we enable off-mode, we really need the wakeup to work, and I broke it recently. Signed-off-by: NeilBrown <neilb@suse.de>
* Enable SaveAndRestore for USB power domainNeilBrown2013-03-091-1/+1
| | | | Maybe this will cause problems, maybe it will help...
* GTA04 - mux output GPIOs as output.NeilBrown2013-03-091-1/+8
| | | | | | | This primarily removes the pull up/down, which shouldn't be much of a problem, but is best avoided. Signed-off-by: NeilBrown <neilb@suse.de>
* BMP085 - use mutex to avoid races.NeilBrown2013-03-091-1/+5
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* Jack bouncing: bugfix.NeilBrown2013-03-091-0/+3
| | | | | | | If get_madc_conversion returns an error, we should ignore the value. Reported-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Signed-off-by: NeilBrown <neilb@suse.de>
* pwm-omap: remove suspend handling code.NeilBrown2013-03-091-22/+0
| | | | | | It provides no value Signed-off-by: NeilBrown <neilb@suse.de>
* OMAP dmtimer - simplify context-loss handling.NeilBrown2013-03-091-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The context loss handling in dmtimer appears to assume that omap_dm_timer_set_load_start() or omap_dm_timer_start() and omap_dm_timer_stop() bracket all interactions. Only the first two restore the context and the last updates the context loss counter. However omap_dm_timer_set_load() or omap_dm_timer_set_match() can reasonably be call outside this bracketing, and the fact that they call omap_dm_timer_enable() / omap_dm_timer_disable() suggest that is expected. So if, after a transition into and out of off-mode, which would cause the dm timer to loose all state, omap_dm_timer_set_match() is called before omap_dm_timer_start(), the value read from OMAP_TIMER_CTRL_REG will be 'wrong' and this wrong value will be stored context.tclr so a subsequent omap_dm_timer_start() can fail (As the control register is wrong). Simplify this be doing the restore-from-context in omap_dm_timer_enable() so that whenever the timer is enabled, the context is correct. Also update the ctx_loss_count at the same time as we notice it is wrong - these is no value in delaying this until the omap_dm_timer_disable() as it cannot change while the timer is enabled. Signed-off-by: NeilBrown <neilb@suse.de>
* arm/dts: Add basic support for gta04 (Openmoko next generation) board.Marek Belisko2013-03-091-0/+65
| | | | Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
* GTA04 audio headset jack detect.NeilBrown2013-03-091-7/+51
| | | | | | | Enhance jack detection to differentiate with and without a microphone, and to report a button-press when the microphone is shorted. Signed-off-by: NeilBrown <neilb@suse.de>
* GTA04: add simple headset-jack detection support.NeilBrown2013-03-091-0/+74
| | | | | | | | | | | | | | | | | | | | | | | As headset-insert doesn't generate an interrupt we need to poll the MICSENSE line to see if a headset is present. We do this every 500ms. It takes nearly that long to physically insert a jack, so much faster wouldn't help and would impact power drain more. As detection is done by polling, a jack-insert or removal event cannot wake the device from suspend. Events are only detected while device is awake. We keep the HSMIC bias enabled whenever the 'input' device is open, except during suspend so that we can poll reliably. Turning it off and on seems to interfere with reliable measurements. Currently a reading below 100 is 'nothing plugged in' while a reading above that is 'mic and headphone plugged in'. I measure between 19 and 26 when nothing is plugged in, and between 804 and 811 when a headset is plugged in. Signed-off-by: NeilBrown <neilb@suse.de>
* GTA04 udev rules for /dev/input/jackNeilBrown2013-03-091-0/+1
| | | | | | works with new jack driver support. Signed-off-by: NeilBrown <neilb@suse.de>
* GTA04: Enable mdac hwmonNeilBrown2013-03-093-2/+9
| | | | | | | | | | | | | | | | | Useful for testing. /sys/class/hwmon/hwmon0/device/in7_input show the reading for MICSENSE which detects a jack plugged in. You need HSMIC_BIAS enabled which is forced by the next patch or can be achieved with alsamixer by "Analog Left Headset Mic" set to capture, and so loopback enabled, e.g. HeadsetL Mixer AudioL1 not muted Left1 Analog Loopback not muted Signed-off-by: NeilBrown <neilb@suse.de>
* GTA04: use ONDEMAND as default cpufreq governor.NeilBrown2013-03-092-4/+4
| | | | | | | | This is more appropriate than 'powersave' which always uses lowest speed. Reported-by: Radek Polak <psonek2@seznam.cz> Signed-off-by: NeilBrown <neilb@suse.de>
* Fix some compiler warnings.NeilBrown2013-03-091-4/+4
| | | | | | Mostly about __initdata section mismatches. Signed-off-by: NeilBrown <neilb@suse.de>
* GTA04 config ITG3200NeilBrown2013-03-092-0/+2
| | | | | | Add new gyroscope driver to defconfig Signed-off-by: NeilBrown <neilb@suse.de>
* IIO: add iio driver for ITG3200 3-axis gyroscope.NeilBrown2013-03-094-0/+600
| | | | | | | | | | | Each axis can be individually disabled to save power. Sample rate can be set. Appropriate clock is set automatically. No triggers implemented yet, so no streaming of data. Just read it from sysfs. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix hmc5883 to be auto-detect.NeilBrown2013-03-091-0/+2
| | | | | | Set name and class. Signed-off-by: NeilBrown <neilb@suse.de>
* GTA04 config: HMC5843 compiled in, not module.NeilBrown2013-03-092-4/+4
| | | | | | that was it is always present, and the board file can describe it. Signed-off-by: NeilBrown <neilb@suse.de>
* GTA04: adjust for new BMP085 driver.NeilBrown2013-03-091-31/+1
| | | | | | | | - discard i2c/bmp.h - it is included in a separate branch. - pass GPIO or IRQ to driver and have it initialise the GPIO and the IRQ Signed-off-by: NeilBrown <neilb@suse.de>
* BMP085: Clean up and enable use of interrupt for completion.NeilBrown2013-03-092-7/+58
| | | | | | | | | - pass GPIO or IRQ to driver and have it initialise the GPIO and the IRQ - finish waiting early if interrupt fires - clean up GPIO and IRQ on exit. Signed-off-by: NeilBrown <neilb@suse.de>
* Enable 800MHz Operating Power Point.NeilBrown2013-03-091-0/+46
| | | | | | | | | | | | | | Just having "mpurate=800" in kernel command line doesn't do any good when cpufreq is enabled. We need to explicitly enable the higher operating power points. So copy the opp_init code from board-omap3beagle.c. Once cpufreq is enabled, cpu-bound code can now operate 33% faster. Signed-off-by: NeilBrown <neilb@suse.de> Conflicts: arch/arm/mach-omap2/board-omap3gta04.c
* Allow wifi to be rescanned on resume.NeilBrown2013-03-091-0/+1
| | | | | | | | | | | commit 3339d1e33185798a45dbdb5ea6c0bec1c27ca5fd mmc: core: Do not rescan non-removable devices breaks wifi on resume because it stops the rescan. So clear the 'rescan_entered' flag when we suspend. Signed-off-by: NeilBrown <neilb@suse.de>
* OMAP: DSS: add FEAT_DPI_USES_VDDS_DSI to omap3630_dss_feat_listNeilBrown2013-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | commit 195e672a76056478cc79f5c48343164c9237852e OMAPDSS: DPI: Remove cpu_is_xxxx checks Made the mistake of assuming that cpu_is_omap34xx() is exclusive of other cpu_is_* predicates whereas it includes cpu_is_omap3630(). So on an omap3630, code that was previously enabled by if (cpu_is_omap34xx()) is now disabled as dss_has_feature(FEAT_DPI_USES_VDDS_DSI) fails. So add FEAT_DPI_USES_VDDS_DSI to omap3630_dss_feat_list. Cc: Chandrabhanu Mahapatra <cmahapatra@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: NeilBrown <neilb@suse.de>
* GTA04 defconfig updates for 3.7NeilBrown2013-03-092-231/+526
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* pwm: omap: Add PWM support using dual-mode timersNeilBrown2013-03-094-0/+301
| | | | | | | | | | | | | | | This patch is based on an earlier patch by Grant Erickson which provided PWM devices using the 'legacy' interface. This driver instead uses the new framework interface. Platform data must be provided to identify which dmtimer to use. Lots of cleanup and inprovements thanks to Thierry Reding and Jon Hunter. Cc: Grant Erickson <marathon96@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Remove IRQF_EARLY_RESUME in twl4030-irq.NeilBrown2013-03-091-1/+1
| | | | | | | | | This looks right, but I have another hack in place to fix the problem, and I think this might becausing a lock-up on resume. Need to explore more. Signed-off-by: NeilBrown <neilb@suse.de>
* panel-tpo-td028ttec1.c updates fror 3.7NeilBrown2013-03-091-6/+13
| | | | | | various magic copied from changes to other drivers. Signed-off-by: NeilBrown <neilb@suse.de>
* twl4030-usb - re-instate event notificationsNeilBrown2013-03-091-0/+27
| | | | | | | | | | | commit c9721438c009adf8e81d376839ed037c53b9b8d9 usb: musb: twl: use mailbox API to send VBUS or ID events went a bit too far in removing all event notification from twl4030-usb. The notifications are still needed for twl4030_charger.c to know when to enable the charger. Signed-off-by: NeilBrown <neilb@suse.de>
* OMAP GPIO - don't wake from suspend unless requested.NeilBrown2013-03-091-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current kernel will wake from suspend on an event an any active GPIO event if enable_irq_wake() wasn't called. There are two reasons that the hardware wake-enable bit should be set: 1/ while non-suspended the CPU might go into a deep sleep (off_mode) in which the wake-enable bit is needed for an interrupt to be recognised. 2/ while suspended the GPIO interrupt should wake from suspend if and only if irq_wake as been enabled. The code currently doesn't keep these two reasons separate so they get confused and sometimes the wakeup flags is set incorrectly. This patch reverts: commit 9c4ed9e6c01e7a8bd9079da8267e1f03cb4761fc gpio/omap: remove suspend/resume callbacks and commit 0aa2727399c0b78225021413022c164cb99fbc5e gpio/omap: remove suspend_wakeup field from struct gpio_bank and makes some minor changes so that we have separate flags for "GPIO should wake from deep idle" and "GPIO should wake from suspend". With this patch, the GPIO from my touch screen doesn't wake my device any more, which is what I want. Cc: Kevin Hilman <khilman@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: Benoit Cousson <b-cousson@ti.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Govindraj.R <govindraj.raja@ti.com> Signed-off-by: NeilBrown <neilb@suse.de>
* f2fs: fix tracking parent inode numberJaegeuk Kim2013-03-093-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, f2fs didn't track the parent inode number correctly which is stored in each f2fs_inode. In the case of the following scenario, a bug can be occured. Let's suppose there are one directory, "/b", and two files, "/a" and "/b/a". - pino of "/a" is ROOT_INO. - pino of "/b/a" is DIR_B_INO. Then, # sync : The inode pages of "/a" and "/b/a" contain the parent inode numbers as ROOT_INO and DIR_B_INO respectively. # mv /a /b/a : The parent inode number of "/a" should be changed to DIR_B_INO, but f2fs didn't do that. Ref. f2fs_set_link(). In order to fix this clearly, I added i_pino in f2fs_inode_info, and whenever it needs to be changed like in f2fs_add_link() and f2fs_set_link(), it is updated temporarily in f2fs_inode_info. And later, f2fs_write_inode() stores the latest information to the inode pages. For power-off-recovery, f2fs_sync_file() triggers simply f2fs_write_inode(). Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
* f2fs: cleanup the f2fs_bio_alloc routineJaegeuk Kim2013-03-094-18/+25
| | | | | | | | | | | | | | Do cleanup more for better code readability. - Change the parameter set of f2fs_bio_alloc() This function should allocate a bio only since it is not something like f2fs_bio_init(). Instead, the caller should initialize the allocated bio. - Introduce SECTOR_FROM_BLOCK This macro translates a block address to its sector address. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com> Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com>
* f2fs: introduce accessor to retrieve number of dentry slotsNamjae Jeon2013-03-092-8/+8
| | | | | | | | Simplify code by providing the accessor macro to retrieve the number of dentry slots for a given filename length. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
* f2fs: remove redundant call to f2fs_put_page in delete entryNamjae Jeon2013-03-091-3/+2
| | | | | | | | | Since, we anyway need to put the page after deleting entry. So, there is no need to make same call under different conditions. Move out the f2fs_put_page from the two conditions and call at once. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
* f2fs: make use of GFP_F2FS_ZERO for setting gfp_maskNamjae Jeon2013-03-091-1/+1
| | | | | | | | Since, GFP_NOFS and __GFP_ZERO is being used to set gfp_mask. We can instead make use of already predefined macro GFP_F2FS_ZERO. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
* f2fs: rewrite f2fs_bio_alloc to make it simplerNamjae Jeon2013-03-091-17/+7
| | | | | | | | | | Since, GFP_NOFS(__GFP_WAIT) is used for allocation requests of bio in f2fs. So, there is no chance of returning NULL from the BIO allocation. Making the bio allocation routine for f2fs simpler. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
* f2fs: fix a typo in f2fs documentationHuajun Li2013-03-091-1/+1
| | | | | | | In f2fs_fs.h, one f2fs inode contains 923 data block pointers, while f2fs documentation says it is 929. Fix this inconsistence. Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
* f2fs: remove unused variableWei Yongjun2013-03-092-4/+0
| | | | | | | The variables node_page and page_offset are initialized but never used otherwise, so remove those unused variables. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
* f2fs: move error condition for mkdir at proper placeNamjae Jeon2013-03-091-2/+1
| | | | | | | | | In function f2fs_mkdir, err is being initialized without even checking if there was any error in new inode creation. So, instead check the inode error and make use of error/return condition. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
* f2fs: remove unneeded initializationNamjae Jeon2013-03-092-3/+3
| | | | | | | | | No need to initialize "struct f2fs_gc_kthread *gc_th = NULL", as gc_th = NULL, will be taken care by the return values of kmalloc(). And fix codes in other places. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
* f2fs: check read only condition before beginning write outNamjae Jeon2013-03-091-2/+3
| | | | | | | | | If the filesystem is mounted as read-only then return from that point itself instead of first doing a writeout/wait and then checking for read-only condition. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
* f2fs: remove unneeded memset from init_onceNamjae Jeon2013-03-091-1/+0
| | | | | | | | Since, __GFP_ZERO is used while f2fs inode allocation, so we do not need memset for f2fs_inode_info, as this is already zeroed out. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
* f2fs: show error in case of invalid mount argumentsNamjae Jeon2013-03-091-0/+2
| | | | | | | | print the invalid argument/value from parse_options in case of mount failure. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
* f2fs: fix the compiler warning for uninitialized use of variableNamjae Jeon2013-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_CC_OPTIMIZE_FOR_SIZE is enabled in the kernel, -Os optimisation flag is passed to gcc for compilation, and somehow while trying to optimize the code, compiler is might not able to see the initialisation of variable ne struct variable inside the get_node_info() function and results into following warning: fs/f2fs/node.c: In function 'get_node_info': fs/f2fs/node.c:175:3: warning: 'ne.block_addr' may be used uninitialized in this function [-Wuninitialized] fs/f2fs/node.c:265:24: note: 'ne.block_addr' was declared here fs/f2fs/node.c:176:3: warning: 'ne.ino' may be used uninitialized in this function [-Wuninitialized] fs/f2fs/node.c:265:24: note: 'ne.ino' was declared here fs/f2fs/node.c:177:3: warning: 'ne.version' may be used uninitialized in this function [-Wuninitialized] fs/f2fs/node.c:265:24: note: 'ne.version' was declared here Hence, lets initialise the ne struct variable to zero, which will remove this warning and also doing this does not seems to making any impact on the code behavior. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Pankaj Kumar <pankaj.km@samsung.com>