aboutsummaryrefslogtreecommitdiff
path: root/drivers/base
AgeCommit message (Collapse)AuthorFilesLines
2018-01-10PM / core: Propagate wakeup_path status flag in __device_suspend_late()Ulf Hansson1-15/+16
Currently the wakeup_path status flag becomes propagated from a child device to its parent device at __device_suspend(). This allows a driver dealing with a parent device to act on the flag from its ->suspend() callback. However, in situations when the wakeup_path status flag needs to be set from a ->suspend_late() callback, its value doesn't get propagated to the parent by the PM core. Let's address this limitation, by also propagating the flag at __device_suspend_late(). Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-01-10PM / core: Re-structure code for clearing the direct_complete flagUlf Hansson1-5/+10
To make the code more consistent, let's clear the parent's direct_complete flag along with clearing it for suppliers, instead of as currently, when propagating the wakeup_path flag to parents. While changing this, let's take the opportunity to rename the affected internal functions, to make them self-explanatory. Like this: dpm_clear_suppliers_direct_complete -> dpm_clear_superiors_direct_complete dpm_propagate_to_parent -> dpm_propagate_wakeup_to_parent Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-01-09PM / core: Assign the wakeup_path status flag in __device_prepare()Ulf Hansson1-1/+4
The PM core in the device_prepare() phase, resets the wakeup_path status flag to the value of device_may_wakeup(). This means if a ->prepare() or a ->suspend() callback for the device would update the device's wakeup setting, this doesn't become reflected in the wakeup_path status flag. In general this isn't a problem, because wakeup settings are not supposed to be changed (via for example calling device_set_wakeup_enable()) during any system wide suspend/resume phase. Nevertheless there are some users, which can be considered as legacy, that don't conform to this behaviour. These legacy cases should be corrected, however until that is done, let's address the issue from the PM core, by moving the assignment of the wakeup_path status flag to the __device_suspend() phase and after the ->suspend() callback has been invoked. Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-01-09PM / wakeup: Do not fail dev_pm_attach_wake_irq() unnecessarilyRafael J. Wysocki3-20/+10
Returning an error code from dev_pm_attach_wake_irq() if device_wakeup_attach_irq() called by it returns an error is pointless, because the wakeup source used by it may be deleted by user space via sysfs at any time and in particular right after dev_pm_attach_wake_irq() has returned. Moreover, it requires the callers of dev_pm_attach_wake_irq() to create that wakeup source via device_wakeup_enable() upfront, but that obviously is racy with respect to the sysfs-based manipulations of it. To avoid the race, modify device_wakeup_attach_irq() to check that the wakeup source it is going to use is there (and return early otherwise), make it void (as it cannot fail after that change) and make dev_pm_attach_wake_irq() simply call it for the device unconditionally. Tested-by: Tony Lindgren <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-01-08regmap: Allow empty read/write_flag_maskAndrew F. Davis1-1/+3
All zero read and write masks in the regmap config are used to signal no special mask is needed and the bus defaults are used. In some devices all zero read/write masks are the special mask and bus defaults should not be used. To signal this a new variable is added. For example SPI often sets bit 7 in address to signal to the device a read is requested. On TI AFE44xx parts with SPI interfaces no bit needs to be set as registers are either read or write only and the operation can be determined from the address only. For this case both masks must be zero to not effect the address. Signed-off-by: Andrew F. Davis <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08regcache: flat: Un-inline index lookup from cache accessAndrew F. Davis1-5/+10
This makes the code slightly more readable and allows for cleaner addition of functionality in later patches. Signed-off-by: Andrew F. Davis <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08regmap: Add SoundWire bus supportVinod Koul3-0/+93
SoundWire bus provides sdw_read() and sdw_write() APIs for Slave devices to program the registers. Provide support in regmap for SoundWire bus. Signed-off-by: Hardik T Shah <[email protected]> Signed-off-by: Sanyog Kale <[email protected]> Reviewed-by: Philippe Ombredanne <[email protected]> Acked-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-01-08sysfs/cpu: Add vulnerability folderThomas Gleixner2-0/+51
As the meltdown/spectre problem affects several CPU architectures, it makes sense to have common way to express whether a system is affected by a particular vulnerability or not. If affected the way to express the mitigation should be common as well. Create /sys/devices/system/cpu/vulnerabilities folder and files for meltdown, spectre_v1 and spectre_v2. Allow architectures to override the show function. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Will Deacon <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: David Woodhouse <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
2018-01-05drivers: do not use print_symbol()Sergey Senozhatsky1-3/+2
print_symbol() is a very old API that has been obsoleted by %pS format specifier in a normal printk() call. Replace print_symbol() with a direct printk("%pS") call. Link: http://lkml.kernel.org/r/[email protected] To: Andrew Morton <[email protected]> To: Russell King <[email protected]> To: Catalin Marinas <[email protected]> To: Mark Salter <[email protected]> To: Tony Luck <[email protected]> To: David Howells <[email protected]> To: Yoshinori Sato <[email protected]> To: Guan Xuetao <[email protected]> To: Borislav Petkov <[email protected]> To: Greg Kroah-Hartman <[email protected]> To: Thomas Gleixner <[email protected]> To: Peter Zijlstra <[email protected]> To: Vineet Gupta <[email protected]> To: Fengguang Wu <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Petr Mladek <[email protected]> Cc: LKML <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Sergey Senozhatsky <[email protected]> [[email protected]: updated commit message] Signed-off-by: Petr Mladek <[email protected]>
2018-01-03PM / core: Direct DPM_FLAG_LEAVE_SUSPENDED handlingRafael J. Wysocki1-11/+40
Make the PM core handle DPM_FLAG_LEAVE_SUSPENDED directly for devices whose "noirq", "late" and "early" driver callbacks are invoked directly by it. Namely, make it skip all of the system-wide resume callbacks for such devices with DPM_FLAG_LEAVE_SUSPENDED set if they are in runtime suspend during the "noirq" phase of system-wide suspend (or analogous) transitions or the system transition under way is a proper suspend (rather than anything related to hibernation) and the device's wakeup settings are compatible with runtime PM (that is, the device cannot generate wakeup signals at all or it is allowed to wake up the system from sleep). Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-01-03PM / core: Direct DPM_FLAG_SMART_SUSPEND optimizationRafael J. Wysocki1-7/+78
Make the PM core avoid invoking the "late" and "noirq" system-wide suspend (or analogous) callbacks provided by device drivers directly for devices with DPM_FLAG_SMART_SUSPEND set that are in runtime suspend during the "late" and "noirq" phases of system-wide suspend (or analogous) transitions. That is only done for devices without any middle-layer "late" and "noirq" suspend callbacks (to avoid confusing the middle layer if there is one). The underlying observation is that runtime PM is disabled for devices during the "late" and "noirq" system-wide suspend phases, so if they remain in runtime suspend from the "late" phase forward, it doesn't make sense to invoke the "late" and "noirq" callbacks provided by the drivers for them (arguably, the device is already suspended and in the right state). Thus, if the remaining driver suspend callbacks are to be invoked directly by the core, they can be skipped. This change really makes it possible for, say, platform device drivers to re-use runtime PM suspend and resume callbacks by pointing ->suspend_late and ->resume_early, respectively (and possibly the analogous hibernation-related callback pointers too), to them without adding any extra "is the device already suspended?" type of checks to the callback routines, as long as they will be invoked directly by the core. Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-01-03PM / core: Add helpers for subsystem callback selectionRafael J. Wysocki1-60/+128
Add helper routines to find and return a suitable subsystem callback during the "noirq" phases of system suspend/resume (or analogous) transitions as well as during the "late" phase of system suspend and the "early" phase of system resume (or analogous) transitions. The helpers will be called from additional sites going forward. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]>
2018-01-03PM / wakeup: Drop redundant check from device_init_wakeup()Rafael J. Wysocki1-3/+1
Since device_wakeup_disable() checks the device's power.can_wakeup flag, device_init_wakeup() doesn't need to do that before calling it, so drop that redundant check from device_init_wakeup(). No intentional changes in functionality. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Ulf Hansson <[email protected]>
2018-01-03PM / wakeup: Drop redundant check from device_set_wakeup_enable()Rafael J. Wysocki1-3/+0
Since both device_wakeup_enable() and device_wakeup_disable() check if dev is not NULL and whether or not power.can_wakeup is set for it, device_set_wakeup_enable() doesn't have to do that, so drop that check from it. No intentional changes in functionality. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Ulf Hansson <[email protected]>
2018-01-02Merge 4.15-rc6 into driver-core-nextGreg Kroah-Hartman2-0/+28
We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-02Merge 4.15-rc6 into char-misc-nextGreg Kroah-Hartman2-0/+28
We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-12-31Merge tag 'driver-core-4.15-rc6' of ↵Linus Torvalds1-0/+13
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two driver core fixes for 4.15-rc6, resolving some reported issues. The first is a cacheinfo fix for DT based systems to resolve a reported issue that has been around for a while, and the other is to resolve a regression in the kobject uevent code that showed up in 4.15-rc1. Both have been in linux-next for a while with no reported issues" * tag 'driver-core-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: kobject: fix suppressing modalias in uevents delivered over netlink drivers: base: cacheinfo: fix cache type for non-architected system cache
2017-12-27regmap: Add one flag to indicate if a hwlock should be usedBaolin Wang1-1/+1
Since the hwlock id 0 is valid for hardware spinlock core, but now id 0 is treated as one invalid value for regmap. Thus we should add one extra flag for regmap config to indicate if a hardware spinlock should be used, then id 0 can be valid for regmap to request. Signed-off-by: Baolin Wang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-12-27regmap: debugfs: document why we don't create the debugfs entriesBartosz Golaszewski1-0/+7
This is a follow-up to commit a5ba91c380b8 ("regmap: debugfs: emit a debug message when locking is disabled"). I figured that a user may see this message, grep the code, come to this place and he still won't know why we actually disabled debugfs. Add a comment explaining the reason. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-12-21regmap: debugfs: emit a debug message when locking is disabledBartosz Golaszewski1-1/+3
We currently silently omit creating the debugfs entries when regmap locking is disabled. Users may not be aware of the reason for which regmap files don't show up in debugfs. Add a dev_dbg() message explaining that. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-12-19BackMerge tag 'v4.15-rc4' into drm-nextDave Airlie4-18/+35
Linux 4.15-rc4 Daniel requested it to fix some messy conflicts.
2017-12-19regmap: use proper part of work_buf for storing valKrzysztof Adamski1-2/+4
The map->work_buf is a buffer preallocated in __regmap_init() with size allowing it to store all 3 parts of a buffer - reg, pad and val. While reg and val parts are always properly setup before each transaction, the pad part is left at its default value (zeros). Until it is overwritten, that is. _regmap_bus_read(), when calling _regmap_raw_read() uses beginning of work_buf as a place to store data read. Usually that is fine but if val_bits > reg_bits && pad_bits > 0, padding area of work_buf() may get overwritten. Since padding is not zeroed before each transaction, garbage will be used on next calls. This patch moves the val pointer used for _regmap_raw_read() to point to a part of work_buf intended for storing value read. Signed-off-by: Krzysztof Adamski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-12-19regmap: add SLIMbus supportSrinivas Kandagatla3-0/+85
This patch adds support to read/write SLIMbus value elements. Currently it only supports byte read/write. Adding this support in regmap would give codec drivers more flexibility when there are more than 2 control interfaces like SLIMbus, i2c. Without this patch each codec driver has to directly call SLIMbus value element apis, and this could would get messy once we want to add i2c interface to it. Signed-off-by: Srinivas Kandagatla <[email protected]> Reviwed-by: Mark Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-12-19PM / wakeup: only recommend "call"ing device_init_wakeup() onceBrian Norris1-1/+1
I'll admit admit it: I've written bad driver code that tries to configure a device's wake IRQ without having called device_init_wakeup() first. But do you really have to ask ask me twice? Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2017-12-18component: add debugfs supportMaciej Purski1-0/+78
Currently there is no information in any vfs about which devices a master component consists of, what makes debugging hard if one of the component devices fails to register. Add 'device_component' directory to debugfs. Create a new file for each component master, when it has been added. Remove it on a master deletion. Show a list of devices required by the given master and their status (registered or not). This provides an easy way to check, which device has failed to register if the given master device is not available in the system. Signed-off-by: Maciej Purski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-12-18drivers: base: omit redundant interationsGimcuan Hui3-3/+3
When error happens, these interators return the error, no interation should be continued, so make the change for getting out of while immediately. Signed-off-by: Gimcuan Hui <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-12-16Merge back PM core material for v4.16.Rafael J. Wysocki2-121/+163
2017-12-15drivers: base: cacheinfo: fix cache type for non-architected system cacheSudeep Holla1-0/+13
Commit dfea747d2aba ("drivers: base: cacheinfo: support DT overrides for cache properties") doesn't initialise the cache type if it's present only in DT and the architecture is not aware of it. They are unified system level cache which are generally transparent. This patch check if the cache type is set to NOCACHE but the DT node indicates that it's unified cache and sets the cache type accordingly. Fixes: dfea747d2aba ("drivers: base: cacheinfo: support DT overrides for cache properties") Reported-and-tested-by: Tan Xiaojun <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Sudeep Holla <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-12-13regmap: potentially duplicate the name string stored in regmapBartosz Golaszewski1-2/+12
Currently we just copy over the pointer passed to regmap_init() in the regmap config struct. To be on the safe side: duplicate the string with kstrdup_const() so that if an unaware user passes an address to a stack-allocated buffer, we won't crash. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-12-13Merge branches 'topic/hwspinlock' and 'topic/nolock' of ↵Mark Brown3-1/+20
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into regmap-const
2017-12-13regmap: Disable debugfs when locking is disabledMark Brown3-0/+12
The recently added support for disabling the regmap internal locking left debugfs enabled for devices with the locking disabled. This is a problem since debugfs allows userspace to do things like initiate reads from the hardware which will use the scratch buffers protected by the regmap locking so could cause data corruption. For safety address this by just disabling debugfs for these devices. That is overly conservative since some of the debugfs files just read internal data structures but it's much simpler to implmement and less likely to lead to problems with tooling that works with debugfs. Reported-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-12-13regmap: rename regmap_lock_unlock_empty() to regmap_lock_unlock_none()Bartosz Golaszewski1-2/+2
Minor naming convention tweak. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-12-13device property: Introduce a common API to fetch device match dataSinan Kaya1-0/+7
There is an OF/ACPI function to obtain the driver data. We want to hide OF/ACPI details from the device drivers and abstract following the device family of functions. Signed-off-by: Sinan Kaya <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2017-12-13PM / core: Use dev_pm_skip_next_resume_phases() internallyRafael J. Wysocki1-2/+1
Make the PM core call dev_pm_skip_next_resume_phases() to skip the "early resume" and "resume" phases of system-wide transitions to the working state for a given device instead of clearing the relevant status bits for it directly. No intentional changes in functionality. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Ulf Hansson <[email protected]>
2017-12-13PM / core: remove unneeded kallsyms includeSergey Senozhatsky1-1/+0
The file was converted from print_fn_descriptor_symbol() to %pF some time ago (c80cfb0406c01bb "vsprintf: use new vsprintf symbolic function pointer format"). kallsyms does not seem to be needed anymore. Signed-off-by: Sergey Senozhatsky <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2017-12-13PM / Domains: Remove obsolete "samsung,power-domain" checkGeert Uytterhoeven1-14/+2
Currently the generic PM Domain code code checks for the presence of both (generic) "power-domains" and (Samsung Exynos legacy) "samsung,power-domain" properties in all device tree nodes representing devices. There are two issues with this: 1. This imposes a small boot-time penalty on all platforms using DT, 2. Platform-specific checks do not really belong in core framework code. Remove the platform-specific check, as the last user of "samsung,power-domain" was removed in commit 46dcf0ff0de35da8 ("ARM: dts: exynos: Remove exynos4415.dtsi"). All other users were converted before in commit 0da6587041363033 ("ARM: dts: convert to generic power domain bindings for exynos DT"). Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Ulf Hansson <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2017-12-11PM / sleep: Avoid excess pm_runtime_enable() calls in device_resume()Rafael J. Wysocki1-0/+15
Middle-layer code doing suspend-time optimizations for devices with the DPM_FLAG_SMART_SUSPEND flag set (currently, the PCI bus type and the ACPI PM domain) needs to make the core skip ->thaw_early and ->thaw callbacks for those devices in some cases and it sets the power.direct_complete flag for them for this purpose. However, it turns out that setting power.direct_complete outside of the PM core is a bad idea as it triggers an excess invocation of pm_runtime_enable() in device_resume(). For this reason, provide a helper to clear power.is_late_suspended and power.is_suspended to be invoked by the middle-layer code in question instead of setting power.direct_complete and make that code call the new helper. Fixes: c4b65157aeef (PCI / PM: Take SMART_SUSPEND driver flag into account) Fixes: 05087360fd7a (ACPI / PM: Take SMART_SUSPEND driver flag into account) Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Acked-by: Bjorn Helgaas <[email protected]>
2017-12-11Merge back earlier PM core material for v4.16.Rafael J. Wysocki2-120/+164
2017-12-11Merge 4.15-rc3 into driver-core-nextGreg Kroah-Hartman3-18/+20
We want the fixes and changes in here for testing. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-12-08Merge tag 'pm-4.15-rc3' of ↵Linus Torvalds1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "This fixes an issue in the device runtime PM framework that prevents customer devices from resuming if runtime PM is disabled for one or more of their supplier devices (as reflected by device links between those devices)" * tag 'pm-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / runtime: Fix handling of suppliers with disabled runtime PM
2017-12-07driver core: Remove redundant license textGreg Kroah-Hartman27-121/+0
Now that the SPDX tag is in all driver core files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Johannes Berg <[email protected]> Cc: "Luis R. Rodriguez" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-12-07drivers: core: arch_topology.c: move SPDX tag to top of the fileGreg Kroah-Hartman1-7/+1
arch_topology.c had a SPDX tag in it, so move it to the top of the file like the rest of the kernel files have it. Also remove the redundant license text as it is not needed if the SPDX tag is in the file, as the tag identifies the license in a specific and legally-defined manner. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-12-07driver core: add SPDX identifiers to all driver core filesGreg Kroah-Hartman30-0/+30
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the driver core files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Johannes Berg <[email protected]> Cc: "Luis R. Rodriguez" <[email protected]> Cc: William Breathitt Gray <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Kate Stewart <[email protected]> Cc: Philippe Ombredanne <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-12-06regmap: allow to disable all locking mechanismsBartosz Golaszewski1-1/+8
We have a use case in the at24 EEPROM driver (recently converted to using regmap instead of raw i2c/smbus calls) where we read from/write to the regmap in a loop, while protecting the entire loop with a mutex. Currently this implicitly makes us use two mutexes - one in the driver and one in regmap. While browsing the code for similar use cases I noticed a significant number of places where locking *seems* redundant. Allow users to completely disable any locking mechanisms in regmap config. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2017-12-05PM / core: Re-factor some code dealing with parents in __device_suspend()Ulf Hansson1-12/+17
Let's make the code a bit more readable by moving some of the code, which deals with adjustments for parent devices in __device_suspend(), into its own function. Signed-off-by: Ulf Hansson <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2017-12-05PM / sysfs: Convert to use DEVICE_ATTR_RO / DEVICE_ATTR_RWAndy Shevchenko1-68/+65
Use DEVICE_ATTR_RO() and DEVICE_ATTR_RW() macros instead of open coding them. No functional change intended. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2017-12-05PM / sysfs: Remove redundant 'else' keyword.Andy Shevchenko1-5/+5
There is no need to use 'else' if in main branch 'return' is present. No functional change intended. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2017-12-05PM / sysfs: Convert to use sysfs_streq()Andy Shevchenko1-30/+9
...instead of custom approach. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2017-12-04PM / runtime: Fix handling of suppliers with disabled runtime PMRafael J. Wysocki1-1/+2
Prevent rpm_get_suppliers() from returning an error code if runtime PM is disabled for one or more of the supplier devices it wants to runtime-resume, so as to make runtime PM work for devices with links to suppliers that don't use runtime PM (such links may be created during device enumeration even before it is known whether or not runtime PM will be enabled for the devices in question, for example). Fixes: 21d5c57b3726 (PM / runtime: Use device links) Reported-by: Adrian Hunter <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Lukas Wunner <[email protected]> Tested-by: Adrian Hunter <[email protected]>
2017-12-04Merge tag 'drm-misc-next-2017-11-30' of ↵Dave Airlie1-0/+1
git://anongit.freedesktop.org/drm/drm-misc into drm-next Cross-subsystem Changes: - device tree doc for the Mitsubishi AA070MC01 and Tianma TM070RVHG71 panels (Lukasz Majewski) and for a 2nd endpoint on stm32 (Philippe Cornu) Core Changes: The most important changes are: - Add drm_driver .last_close and .output_poll_changed helpers to reduce fbdev emulation footprint in drivers (Noralf) - Fix plane clipping in core and for vmwgfx (Ville) Then we have a bunch of of improvement for print and debug such as the addition of a framebuffer debugfs file. ELD connector, HDMI and improvements. And a bunch of misc improvements, clean ups and style changes and doc updates [airlied: drop eld bits from amdgpu_dm] Driver Changes: - sii8620: filter unsupported modes and add DVI mode support (Maciej Purski) - rockchip: analogix_dp: Remove unnecessary init code (Jeffy Chen) - virtio, cirrus: add fb create_handle support to enable screenshots(Lepton Wu) - virtio: replace reference/unreference with get/put (Aastha Gupta) - vc4, gma500: Convert timers to use timer_setup() (Kees Cook) - vc4: Reject HDMI modes with too high of clocks (Eric) - vc4: Add support for more pixel formats (Dave Stevenson) - stm: dsi: Rename driver name to "stm32-display-dsi" (Philippe Cornu) - stm: ltdc: add a 2nd endpoint (Philippe Cornu) - via: use monotonic time for VIA_WAIT_IRQ (Arnd Bergmann) * tag 'drm-misc-next-2017-11-30' of git://anongit.freedesktop.org/drm/drm-misc: (96 commits) drm/bridge: tc358767: add copyright lines MAINTAINERS: change maintainer for Rockchip drm drivers drm/vblank: Fix vblank timestamp debugs drm/via: use monotonic time for VIA_WAIT_IRQ dma-buf: Fix ifnullfree.cocci warnings drm/printer: Add drm_vprintf() drm/edid: Allow HDMI infoframe without VIC or S3D video/hdmi: Allow "empty" HDMI infoframes dma-buf/fence: Fix lock inversion within dma-fence-array drm/sti: Handle return value of platform_get_irq_byname drm/vc4: Add support for NV21 and NV61. drm/vc4: Use .pixel_order instead of custom .flip_cbcr drm/vc4: Add support for DRM_FORMAT_RGB888 and DRM_FORMAT_BGR888 drm: Move drm_plane_helper_check_state() into drm_atomic_helper.c drm: Check crtc_state->enable rather than crtc->enabled in drm_plane_helper_check_state() drm/vmwgfx: Try to fix plane clipping drm/vmwgfx: Use drm_plane_helper_check_state() drm/vmwgfx: Remove bogus crtc coords vs fb size check gpu: gma500: remove unneeded DRIVER_LICENSE #define drm: don't link DP aux i2c adapter to the hardware device node ...