aboutsummaryrefslogtreecommitdiff
path: root/drivers/base
AgeCommit message (Collapse)AuthorFilesLines
2013-07-03Merge tag 'regmap-v3.11' of ↵Linus Torvalds5-30/+289
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "A small but useful set of regmap updates this time around: - An abstraction for bitfields within a register map contributed by Srinivas Kandagatla, allowing drivers to cope more easily when hardware designers randomly move things about (mainly when talking to things like system controllers). - Changes from Lars-Peter Clausen to allow the MMIO regmap to be used from hard IRQ context. - Small improvements to the cache infrastructure and performance, including a default cache sync operation so now all regmaps can sync easily. There's also a pinctrl driver making use of the new bitfield API, merged here for dependency reasons. There will be a simple add/add conflict with the pinctrl tree as a result." * tag 'regmap-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: pinctrl: st: Remove unnecessary use of of_match_ptr macro pinctrl: st: fix return value check pinctrl: st: Add pinctrl and pinconf support. regmap: debugfs: Suppress cache for partial register files regmap: Add regmap_field APIs regmap: core: Cache all registers by default when cache is enabled regmap: Implemented default cache sync operation regmap: Make regmap-mmio usable from atomic contexts regmap: regcache: Fixup locking for custom lock callbacks regmap: debugfs: Fix return from regmap_debugfs_get_dump_start regmap: debugfs: Don't mark lockdep as broken due to debugfs write regmap: rbtree: Use range information to allocate nodes regmap: rbtree: Factor out node allocation regmap: Make regmap_check_range_table() a public API regmap: Add support for discarding parts of the register cache
2013-07-02mm/cma: Move dma contiguous changes into a seperate configAneesh Kumar K.V2-17/+5
We want to use CMA for allocating hash page table and real mode area for PPC64. Hence move DMA contiguous related changes into a seperate config so that ppc64 can enable CMA without requiring DMA contiguous. Acked-by: Michal Nazarewicz <[email protected]> Acked-by: Paul Mackerras <[email protected]> Signed-off-by: Aneesh Kumar K.V <[email protected]> [removed defconfig changes] Signed-off-by: Marek Szyprowski <[email protected]>
2013-06-30Merge remote-tracking branch 'regmap/topic/field' into regmap-nextMark Brown2-0/+138
2013-06-30Merge remote-tracking branch 'regmap/topic/debugfs' into regmap-nextMark Brown1-2/+2
2013-06-30Merge remote-tracking branch 'regmap/topic/core' into regmap-nextMark Brown1-1/+4
2013-06-30Merge remote-tracking branch 'regmap/topic/cache' into regmap-nextMark Brown5-27/+145
2013-06-28Merge branch 'pm-assorted'Rafael J. Wysocki6-35/+17
* pm-assorted: PM / QoS: Add pm_qos and dev_pm_qos to events-power.txt PM / QoS: Add dev_pm_qos_request tracepoints PM / QoS: Add pm_qos_request tracepoints PM / QoS: Add pm_qos_update_target/flags tracepoints PM / QoS: Update Documentation/power/pm_qos_interface.txt PM / Sleep: Print last wakeup source on failed wakeup_count write PM / QoS: correct the valid range of pm_qos_class PM / wakeup: Adjust messaging for wake events during suspend PM / Runtime: Update .runtime_idle() callback documentation PM / Runtime: Rework the "runtime idle" helper routine PM / Hibernate: print physical addresses consistently with other parts of kernel
2013-06-28Merge branch 'pm-cpufreq'Rafael J. Wysocki1-2/+2
* pm-cpufreq: (41 commits) cpufreq: tegra: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: s3c64xx: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: omap: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: exynos: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: dbx500: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: davinci: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: e_powersaver: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: ACPI: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: s3c2416: fix forgotten driver_data conversions cpufreq: make __cpufreq_notify_transition() static cpufreq: Fix minor formatting issues cpufreq: Fix governor start/stop race condition cpufreq: Simplify userspace governor cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE cpufreq: tegra: create CONFIG_ARM_TEGRA_CPUFREQ cpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE ...
2013-06-28Merge branch 'acpi-hotplug'Rafael J. Wysocki3-97/+248
* acpi-hotplug: ACPI: Do not use CONFIG_ACPI_HOTPLUG_MEMORY_MODULE ACPI / cpufreq: Add ACPI processor device IDs to acpi-cpufreq Memory hotplug: Move alternative function definitions to header ACPI / processor: Fix potential NULL pointer dereference in acpi_processor_add() Memory hotplug / ACPI: Simplify memory removal ACPI / scan: Add second pass of companion offlining to hot-remove code Driver core / MM: Drop offline_memory_block() ACPI / processor: Pass processor object handle to acpi_bind_one() ACPI: Drop removal_type field from struct acpi_device Driver core / memory: Simplify __memory_block_change_state() ACPI / processor: Initialize per_cpu(processors, pr->id) properly CPU: Fix sysfs cpu/online of offlined CPUs Driver core: Introduce offline/online callbacks for memory blocks ACPI / memhotplug: Bind removable memory blocks to ACPI device nodes ACPI / processor: Use common hotplug infrastructure ACPI / hotplug: Use device offline/online for graceful hot-removal Driver core: Use generic offline/online for CPU offline/online Driver core: Add offline/online device operations
2013-06-28reservation: cross-device reservation support, v4Maarten Lankhorst2-1/+40
This adds support for a generic reservations framework that can be hooked up to ttm and dma-buf and allows easy sharing of reservations across devices. The idea is that a dma-buf and ttm object both will get a pointer to a struct reservation_object, which has to be reserved before anything is done with the contents of the dma-buf. Changes since v1: - Fix locking issue in ticket_reserve, which could cause mutex_unlock to be called too many times. Changes since v2: - All fence related calls and members have been taken out for now, what's left is the bare minimum to be useful for ttm locking conversion. Changes since v3: - Removed helper functions too. The documentation has an example implementation for locking. With the move to ww_mutex there is no need to have much logic any more. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-06-27Merge branch 'pm-cpufreq-assorted' into pm-cpufreqRafael J. Wysocki1-2/+2
* pm-cpufreq-assorted: (21 commits) cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: e_powersaver: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: ACPI: call CPUFREQ_POSTCHANGE notfier in error cases cpufreq: make __cpufreq_notify_transition() static cpufreq: Fix minor formatting issues cpufreq: Fix governor start/stop race condition cpufreq: Simplify userspace governor cpufreq: powerpc: move cpufreq driver to drivers/cpufreq cpufreq: kirkwood: Select CPU_FREQ_TABLE option cpufreq: big.LITTLE needs cpufreq table cpufreq: SPEAr needs cpufreq table cpufreq: powerpc: Add cpufreq driver for Freescale e500mc SoCs cpufreq: remove unnecessary cpufreq_cpu_{get|put}() calls cpufreq: MAINTAINERS: Add git tree path for ARM specific updates cpufreq: rename index as driver_data in cpufreq_frequency_table cpufreq: Don't create empty /sys/devices/system/cpu/cpufreq directory cpufreq: Move get_cpu_idle_time() to cpufreq.c cpufreq: governors: Move get_governor_parent_kobj() to cpufreq.c cpufreq: Add EXPORT_SYMBOL_GPL for have_governor_per_policy ...
2013-06-25firmware loader: fix another compile warning with PM_SLEEP unsetMing Lei1-12/+12
This patch fixes another compiling warning with PM_SLEEP unset: drivers/base/firmware_class.c:221:29: warning: 'fw_lookup_buf' defined but not used [-Wunused-function] This time I do build kernel with both PM_SLEEP set and unset, and no warning found any more with the patch. Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-24PM / QoS: Add dev_pm_qos_request tracepointsSahara1-0/+6
Adds tracepoints to dev_pm_qos_add_request, dev_pm_qos_update_request, and dev_pm_qos_remove_request. It's useful for checking device name, dev_pm_qos_request_type, and value. Signed-off-by: Sahara <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-06-21firmware loader: fix compile warning with PM_SLEEP setMing Lei1-3/+3
This patch fixes the below compile warning: drivers/base/firmware_class.c:1254:12: warning: 'cache_firmware' defined but not used [-Wunused-function] static int cache_firmware(const char *fw_name) ^ drivers/base/firmware_class.c:1281:12: warning: 'uncache_firmware' defined but not used [-Wunused-function] static int uncache_firmware(const char *fw_name) ^ Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-21PM / Sleep: Print last wakeup source on failed wakeup_count writeJulius Werner1-2/+3
Commit a938da06 introduced a useful little log message to tell users/debuggers which wakeup source aborted a suspend. However, this message is only printed if the abort happens during the in-kernel suspend path (after writing /sys/power/state). The full specification of the /sys/power/wakeup_count facility allows user-space power managers to double-check if wakeups have already happened before it actually tries to suspend (e.g. while it was running user-space pre-suspend hooks), by writing the last known wakeup_count value to /sys/power/wakeup_count. This patch changes the sysfs handler for that node to also print said log message if that write fails, so that we can figure out the offending wakeup source for both kinds of suspend aborts. Signed-off-by: Julius Werner <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-06-20Merge branch 'linus' into patchworkMauro Carvalho Chehab6-23/+27
* linus: (1465 commits) ARM: tegra30: clocks: Fix pciex clock registration lseek(fd, n, SEEK_END) does *not* go to eof - n Linux 3.10-rc6 smp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu(). powerpc: Fix missing/delayed calls to irq_work powerpc: Fix emulation of illegal instructions on PowerNV platform powerpc: Fix stack overflow crash in resume_kernel when ftracing snd_pcm_link(): fix a leak... use can_lookup() instead of direct checks of ->i_op->lookup move exit_task_namespaces() outside of exit_notify() fput: task_work_add() can fail if the caller has passed exit_task_work() xfs: don't shutdown log recovery on validation errors xfs: ensure btree root split sets blkno correctly xfs: fix implicit padding in directory and attr CRC formats xfs: don't emit v5 superblock warnings on write mei: me: clear interrupts on the resume path mei: nfc: fix nfc device freeing mei: init: Flush scheduled work before resetting the device sctp: fully initialize sctp_outq in sctp_outq_init netiucv: Hold rtnl between name allocation and device registration. ...
2013-06-19Merge branch 'driver-core-linus' into driver-core-nextGreg Kroah-Hartman1-16/+32
This resolves the merge issues with drivers/base/firmware_class.c Thanks to Ming Lei for the patch and hints on how to resolve it. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-19regmap: debugfs: Suppress cache for partial register filesMark Brown1-0/+4
The cache is based on the full register map so confuses things if used for a partial map. Reported-by: Bard Liao <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-06-18firmware loader: fix use-after-free by double abortMing Lei1-9/+18
fw_priv->buf is accessed in both request_firmware_load() and writing to sysfs file of 'loading' context, but not protected by 'fw_lock' entirely. The patch makes sure that access on 'fw_priv->buf' is protected by the lock. So fixes the double abort problem reported by nirinA raseliarison: http://lkml.org/lkml/2013/6/14/188 Reported-and-tested-by: nirinA raseliarison <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: stable <[email protected]> # 3.9 Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-17Merge 3.10-rc6 into driver-core-nextGreg Kroah-Hartman3-15/+16
We want these fixes here too. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-16drivers: pinctrl sleep and idle states in the coreLinus Walleij1-0/+19
If a device have sleep and idle states in addition to the default state, look up these in the core and stash them in the pinctrl state container. Add accessor functions for pinctrl consumers to put the pins into "default", "sleep" and "idle" states passing nothing but the struct device * affected. Solution suggested by Kevin Hilman, Mark Brown and Dmitry Torokhov in response to a patch series from Hebbar Gururaja. Cc: Hebbar Gururaja <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Stephen Warren <[email protected]> Acked-by: Wolfram Sang <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Mark Brown <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-06-12regmap: Add regmap_field APIsSrinivas Kandagatla2-0/+138
It is common to access regmap registers at bit level, using regmap_update_bits or regmap_read functions, however the end user has to take care of a mask or shifting. This becomes overhead when such use cases are high. Having a common function to do this is much convenient and less error prone. The idea of regmap_field is simple, regmap_field gives a logical structure to bits of the regmap register, and the driver can use this logical entity without the knowledge of the bit positions and masks all over the code. This way code looks much neat and it need not handle the masks, shifts every time it access the those entities. With this new regmap_field_read/write apis the end user can setup a regmap field using regmap_field_init and use the return regmap_field to read write the register field without worrying about the masks or shifts. Also this apis will be useful for drivers which are based on regmaps, like some clocks or pinctrls which can work on the regmap_fields directly without having to worry about bit positions. Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-06-12driver core: move to_platform_driver to platform_device.hRob Herring1-3/+0
In converting the last remaining of_platform_driver (ibmebus) to a regular platform driver, to_platform_driver is needed to replace to_of_platform_driver. Signed-off-by: Rob Herring <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Tested-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-06-11PM / wakeup: Adjust messaging for wake events during suspendBernie Thompson1-1/+3
This adds in a new message to the wakeup code which adds an indication to the log that suspend was cancelled due to a wake event occouring during the suspend sequence. It also adjusts the message printed in suspend.c to reflect the potential that a suspend was aborted, as opposed to a device failing to suspend. Without these message adjustments one can end up with a kernel log that says that a device failed to suspend with no actual device suspend failures, which can be confusing to the log examiner. Signed-off-by: Bernie Thompson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-06-08[media] dma-buf: Cocci spatch "ptr_ret.spatch"Thomas Meyer1-4/+1
Signed-off-by: Thomas Meyer <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2013-06-06firmware loader: simplify holding module for request_firmwareMing Lei1-6/+7
module reference doesn't cover direct loading path, so this patch simply holds the module in the whole life time of request_firmware() to fix the problem. Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-06firmware loader: don't export cache_firmware and uncache_firmwareMing Lei1-4/+2
Looks no driver has the explict requirement for the two exported API, just don't export them anymore. Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-06drivers/base: Use attribute groups to create sysfs memory filesNathan Fontenot1-81/+62
Update the sysfs memory code to create/delete files at the time of device and subsystem registration. The current code creates files in the root memory directory explicitly through the use of init_* routines. The files for each memory block are created and deleted explicitly using the mem_[create|delete]_simple_file macros. This patch creates attribute groups for the memory root files and files in each memory block directory so that they are created and deleted implicitly at subsys and device register and unregister time. This did necessitate moving the register_memory() updating it to set the dev.groups field. Signed-off-by: Nathan Fontenot <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-06firmware loader: fix compile warningMing Lei1-0/+4
The commit ddf1f0648e8c("firmware loader: fix build failure with !CONFIG_FW_LOADER_USER_HELPER") introduces the below warning: drivers/base/firmware_class.c:921:13: warning: 'kill_requests_without_uevent' defined but not used [-Wunused-function] So fix it by defining kill_requests_without_uevent() only if CONFIG_PM_SLEEP is set. Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Ming Lei <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-04firmware loader: fix build failure with !CONFIG_FW_LOADER_USER_HELPERMing Lei1-14/+17
This patch fixes one build failure which is introduced by the patch below: driver core: firmware loader: kill FW_ACTION_NOHOTPLUG requests before suspend When CONFIG_FW_LOADER_USER_HELPER is unset, kill_requests_without_uevent() should be nop because no userspace loading is involved. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-04cpufreq: rename index as driver_data in cpufreq_frequency_tableViresh Kumar1-2/+2
The "index" field of struct cpufreq_frequency_table was never an index and isn't used at all by the cpufreq core. It only is useful for cpufreq drivers for their internal purposes. Many people nowadays blindly set it in ascending order with the assumption that the core will use it, which is a mistake. Rename it to "driver_data" as that's what its purpose is. All of its users are updated accordingly. [rjw: Changelog] Signed-off-by: Viresh Kumar <[email protected]> Acked-by: Simon Horman <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-06-03Finally eradicate CONFIG_HOTPLUGStephen Rothwell1-2/+0
Ever since commit 45f035ab9b8f ("CONFIG_HOTPLUG should be always on"), it has been basically impossible to build a kernel with CONFIG_HOTPLUG turned off. Remove all the remaining references to it. Cc: Russell King <[email protected]> Cc: Doug Thompson <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Steven Whitehouse <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Pavel Machek <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Stephen Rothwell <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-03driver core: firmware loader: kill FW_ACTION_NOHOTPLUG requests before suspendMing Lei1-0/+17
This patch kills the firmware loading requests of FW_ACTION_NOHOTPLUG before suspend to avoid blocking suspend because there is no timeout for these requests. Signed-off-by: Ming Lei <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-03driver core: firmware loader: don't cache FW_ACTION_NOHOTPLUG firmwareMing Lei1-3/+6
Generally there are only two drivers which don't need uevent to handle firmware loading, so don't cache these firmwares during suspend for these drivers since doing that may block firmware loading forever. Both the two drivers are involved in private firmware images, so they don't hit in direct loading too. Signed-off-by: Ming Lei <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-03Documentation: Tidy up some drivers/base/core.c kerneldoc content.Robert P. J. Day1-7/+7
Standardize the indentation, and switch the order of a couple kerneldoc entries to match the parameter order. No functional change. Signed-off-by: Robert P. J. Day <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-03platform_device: use a macro instead of platform_driver_registerLibo Chen1-3/+5
I found a lot of mistakes using struct platform_driver without owner so I make a macro instead of the function platform_driver_register. It can set owner in it, then guys don`t care about module owner again. Signed-off-by: Libo Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-03firmware: move EXPORT_SYMBOL annotationsDaniel Mack1-6/+5
Move EXPORT_SYMBOL annotations so they follow immediately after the closing function brace line. Signed-off-by: Daniel Mack <[email protected]> Acked-by: Takashi Iwai <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-03firmware: Avoid deadlock of usermodehelper lock at shutdownTakashi Iwai1-7/+37
When a system goes to reboot/shutdown, it tries to disable the usermode helper via usermodehelper_disable(). This might be blocked when a driver tries to load a firmware beforehand and it's stuck by some reason. For example, dell_rbu driver loads the firmware in non-hotplug mode and waits for user-space clearing the loading sysfs flag. If user-space doesn't clear the flag, it waits forever, thus blocks the reboot, too. As a workaround, in this patch, the firmware class driver registers a reboot notifier so that it can abort all pending f/w bufs before issuing usermodehelper_disable(). Signed-off-by: Takashi Iwai <[email protected]> Acked-by: Ming Lei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-06-03PM / Runtime: Rework the "runtime idle" helper routineRafael J. Wysocki4-32/+5
The "runtime idle" helper routine, rpm_idle(), currently ignores return values from .runtime_idle() callbacks executed by it. However, it turns out that many subsystems use pm_generic_runtime_idle() which checks the return value of the driver's callback and executes pm_runtime_suspend() for the device unless that value is not 0. If that logic is moved to rpm_idle() instead, pm_generic_runtime_idle() can be dropped and its users will not need any .runtime_idle() callbacks any more. Moreover, the PCI, SCSI, and SATA subsystems' .runtime_idle() routines, pci_pm_runtime_idle(), scsi_runtime_idle(), and ata_port_runtime_idle(), respectively, as well as a few drivers' ones may be simplified if rpm_idle() calls rpm_suspend() after 0 has been returned by the .runtime_idle() callback executed by it. To reduce overall code bloat, make the changes described above. Tested-by: Mika Westerberg <[email protected]> Tested-by: Kevin Hilman <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Kevin Hilman <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Acked-by: Alan Stern <[email protected]>
2013-06-03Merge remote-tracking branch 'regmap/fix/debugfs' into regmap-linusMark Brown1-1/+4
2013-06-03Merge remote-tracking branch 'regmap/fix/cache' into regmap-linusMark Brown2-14/+12
2013-06-03regmap: core: Cache all registers by default when cache is enabledMark Brown1-1/+4
Currently all register maps with a cache need to provide a volatile callback since the default is to assume all registers are volatile. This is not sensible if we have a cache so change the default to be fully cached if a cache is provided. Signed-off-by: Mark Brown <[email protected]>
2013-06-03regmap: Implemented default cache sync operationMaarten ter Huurne1-4/+42
This can be used for cache types for which syncing values one by one is equally efficient as syncing a range, such as the flat cache. Signed-off-by: Maarten ter Huurne <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-06-01Driver core / MM: Drop offline_memory_block()Rafael J. Wysocki1-21/+0
Since offline_memory_block(mem) is functionally equivalent to device_offline(&mem->dev), make the only caller of the former use the latter instead and drop offline_memory_block() entirely. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Toshi Kani <[email protected]>
2013-06-01Driver core / memory: Simplify __memory_block_change_state()Rafael J. Wysocki1-9/+2
As noted by Tang Chen, the last_online field in struct memory_block introduced by commit 4960e05 (Driver core: Introduce offline/online callbacks for memory blocks) is not really necessary, because online_pages() restores the previous state if passed ONLINE_KEEP as the last argument. Therefore, remove that field along with the code referring to it. References: http://marc.info/?l=linux-kernel&m=136919777305599&w=2 Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Tang Chen <[email protected]>
2013-06-01regmap: rbtree: Fixed node range check on syncMaarten ter Huurne1-2/+0
A node starting before the minimum register is no reason to reject it, since its end could be in range. The check for the end already exists two lines lower, so we can just remove the incorrect check. Signed-off-by: Maarten ter Huurne <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-05-30CPU: Fix sysfs cpu/online of offlined CPUsToshi Kani1-0/+1
As reported by Dave Hansen, sysfs cpu/online shows 1 for offlined CPUs at boot. Fix this problem by initializing dev.offline with cpu_online() when registering a CPU. References: https://lkml.org/lkml/2013/5/29/403 Reported-and-tested-by: Dave Hansen <[email protected]> Signed-off-by: Toshi Kani <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-05-27Merge 3.10-rc3 into driver-core-nextGreg Kroah-Hartman3-8/+11
We want the changes here. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-25regmap: Make regmap-mmio usable from atomic contextsLars-Peter Clausen2-2/+6
regmap-mmio uses a spinlock with spin_lock() and spin_unlock() for locking. To be able to use the regmap API from different contexts (atomic vs non-atomic), without the risk of race conditions, we need to use spin_lock_irqsave() and spin_lock_irqrestore() instead. A new field, the spinlock_flags field, is added to regmap struct to store the flags between regmap_{,un}lock_spinlock(). The spinlock_flags field itself is also protected by the spinlock. Thanks to Stephen Warren for the suggestion of this particular solution. Signed-off-by: Lars-Peter Clausen <[email protected]> Reviewed-by: Stephen Warren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-05-23Merge tag 'driver-core-3.10-rc2' of ↵Linus Torvalds2-2/+5
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg Kroah-Hartman: "Here are 3 tiny driver core fixes for 3.10-rc2. A needed symbol export, a change to make it easier to track down offending sysfs files with incorrect attributes, and a klist bugfix. All have been in linux-next for a while" * tag 'driver-core-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: klist: del waiter from klist_remove_waiters before wakeup waitting process driver core: print sysfs attribute name when warning about bogus permissions driver core: export subsys_virtual_register