| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
pressures is being reported inverted - fix that
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
Seems to work at all
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Before we enable off-mode, we really need the wakeup
to work, and I broke it recently.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
| |
Maybe this will cause problems, maybe it will help...
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
It provides no value
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
works with new jack driver support.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Mostly about __initdata section mismatches.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
Add new gyroscope driver to defconfig
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Set name and class.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
that was it is always present, and the board file can describe it.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
various magic copied from changes to other drivers.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|