diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 19:02:13 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 19:02:13 -0400 |
| commit | 5d4e2d08e7fdf7339f84a1c670d296a77e02f881 (patch) | |
| tree | 1c419660defa56191091dfdf50fdb57a72009173 /include/linux | |
| parent | fb2123fad3b499f0898835b19dbb93b18d27ee98 (diff) | |
| parent | 94ca629e40eb7e997be21d8065c25e4f3797b03f (diff) | |
Merge tag 'driver-core-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg Kroah-Hartman:
"Here's the driver core, and other driver subsystems, pull request for
the 3.5-rc1 merge window.
Outside of a few minor driver core changes, we ended up with the
following different subsystem and core changes as well, due to
interdependancies on the driver core:
- hyperv driver updates
- drivers/memory being created and some drivers moved into it
- extcon driver subsystem created out of the old Android staging
switch driver code
- dynamic debug updates
- printk rework, and /dev/kmsg changes
All of this has been tested in the linux-next releases for a few weeks
with no reported problems.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
Fix up conflicts in drivers/extcon/extcon-max8997.c where git noticed
that a patch to the deleted drivers/misc/max8997-muic.c driver needs to
be applied to this one.
* tag 'driver-core-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (90 commits)
uio_pdrv_genirq: get irq through platform resource if not set otherwise
memory: tegra{20,30}-mc: Remove empty *_remove()
printk() - isolate KERN_CONT users from ordinary complete lines
sysfs: get rid of some lockdep false positives
Drivers: hv: util: Properly handle version negotiations.
Drivers: hv: Get rid of an unnecessary check in vmbus_prep_negotiate_resp()
memory: tegra{20,30}-mc: Use dev_err_ratelimited()
driver core: Add dev_*_ratelimited() family
Driver Core: don't oops with unregistered driver in driver_find_device()
printk() - restore prefix/timestamp printing for multi-newline strings
printk: add stub for prepend_timestamp()
ARM: tegra30: Make MC optional in Kconfig
ARM: tegra20: Make MC optional in Kconfig
ARM: tegra30: MC: Remove unnecessary BUG*()
ARM: tegra20: MC: Remove unnecessary BUG*()
printk: correctly align __log_buf
ARM: tegra30: Add Tegra Memory Controller(MC) driver
ARM: tegra20: Add Tegra Memory Controller(MC) driver
printk() - restore timestamp printing at console output
printk() - do not merge continuation lines of different threads
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device.h | 34 | ||||
| -rw-r--r-- | include/linux/dynamic_debug.h | 22 | ||||
| -rw-r--r-- | include/linux/extcon.h | 324 | ||||
| -rw-r--r-- | include/linux/extcon/extcon_gpio.h | 52 | ||||
| -rw-r--r-- | include/linux/hyperv.h | 4 | ||||
| -rw-r--r-- | include/linux/mfd/max8997.h | 23 | ||||
| -rw-r--r-- | include/linux/moduleparam.h | 3 | ||||
| -rw-r--r-- | include/linux/platform_data/emif_plat.h | 128 | ||||
| -rw-r--r-- | include/linux/printk.h | 13 | ||||
| -rw-r--r-- | include/linux/sysfs.h | 12 |
10 files changed, 587 insertions, 28 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 5ad17cccdd71..e04f5776f6d0 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
| 24 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
| 25 | #include <linux/atomic.h> | 25 | #include <linux/atomic.h> |
| 26 | #include <linux/ratelimit.h> | ||
| 26 | #include <asm/device.h> | 27 | #include <asm/device.h> |
| 27 | 28 | ||
| 28 | struct device; | 29 | struct device; |
| @@ -502,7 +503,10 @@ ssize_t device_store_int(struct device *dev, struct device_attribute *attr, | |||
| 502 | { __ATTR(_name, _mode, device_show_ulong, device_store_ulong), &(_var) } | 503 | { __ATTR(_name, _mode, device_show_ulong, device_store_ulong), &(_var) } |
| 503 | #define DEVICE_INT_ATTR(_name, _mode, _var) \ | 504 | #define DEVICE_INT_ATTR(_name, _mode, _var) \ |
| 504 | struct dev_ext_attribute dev_attr_##_name = \ | 505 | struct dev_ext_attribute dev_attr_##_name = \ |
| 505 | { __ATTR(_name, _mode, device_show_ulong, device_store_ulong), &(_var) } | 506 | { __ATTR(_name, _mode, device_show_int, device_store_int), &(_var) } |
| 507 | #define DEVICE_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) \ | ||
| 508 | struct device_attribute dev_attr_##_name = \ | ||
| 509 | __ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) | ||
| 506 | 510 | ||
| 507 | extern int device_create_file(struct device *device, | 511 | extern int device_create_file(struct device *device, |
| 508 | const struct device_attribute *entry); | 512 | const struct device_attribute *entry); |
| @@ -541,6 +545,8 @@ extern void *devres_remove(struct device *dev, dr_release_t release, | |||
| 541 | dr_match_t match, void *match_data); | 545 | dr_match_t match, void *match_data); |
| 542 | extern int devres_destroy(struct device *dev, dr_release_t release, | 546 | extern int devres_destroy(struct device *dev, dr_release_t release, |
| 543 | dr_match_t match, void *match_data); | 547 | dr_match_t match, void *match_data); |
| 548 | extern int devres_release(struct device *dev, dr_release_t release, | ||
| 549 | dr_match_t match, void *match_data); | ||
| 544 | 550 | ||
| 545 | /* devres group */ | 551 | /* devres group */ |
| 546 | extern void * __must_check devres_open_group(struct device *dev, void *id, | 552 | extern void * __must_check devres_open_group(struct device *dev, void *id, |
| @@ -931,6 +937,32 @@ int _dev_info(const struct device *dev, const char *fmt, ...) | |||
| 931 | 937 | ||
| 932 | #endif | 938 | #endif |
| 933 | 939 | ||
| 940 | #define dev_level_ratelimited(dev_level, dev, fmt, ...) \ | ||
| 941 | do { \ | ||
| 942 | static DEFINE_RATELIMIT_STATE(_rs, \ | ||
| 943 | DEFAULT_RATELIMIT_INTERVAL, \ | ||
| 944 | DEFAULT_RATELIMIT_BURST); \ | ||
| 945 | if (__ratelimit(&_rs)) \ | ||
| 946 | dev_level(dev, fmt, ##__VA_ARGS__); \ | ||
| 947 | } while (0) | ||
| 948 | |||
| 949 | #define dev_emerg_ratelimited(dev, fmt, ...) \ | ||
| 950 | dev_level_ratelimited(dev_emerg, dev, fmt, ##__VA_ARGS__) | ||
| 951 | #define dev_alert_ratelimited(dev, fmt, ...) \ | ||
| 952 | dev_level_ratelimited(dev_alert, dev, fmt, ##__VA_ARGS__) | ||
| 953 | #define dev_crit_ratelimited(dev, fmt, ...) \ | ||
| 954 | dev_level_ratelimited(dev_crit, dev, fmt, ##__VA_ARGS__) | ||
| 955 | #define dev_err_ratelimited(dev, fmt, ...) \ | ||
| 956 | dev_level_ratelimited(dev_err, dev, fmt, ##__VA_ARGS__) | ||
| 957 | #define dev_warn_ratelimited(dev, fmt, ...) \ | ||
| 958 | dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__) | ||
| 959 | #define dev_notice_ratelimited(dev, fmt, ...) \ | ||
| 960 | dev_level_ratelimited(dev_notice, dev, fmt, ##__VA_ARGS__) | ||
| 961 | #define dev_info_ratelimited(dev, fmt, ...) \ | ||
| 962 | dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__) | ||
| 963 | #define dev_dbg_ratelimited(dev, fmt, ...) \ | ||
| 964 | dev_level_ratelimited(dev_dbg, dev, fmt, ##__VA_ARGS__) | ||
| 965 | |||
| 934 | /* | 966 | /* |
| 935 | * Stupid hackaround for existing uses of non-printk uses dev_info | 967 | * Stupid hackaround for existing uses of non-printk uses dev_info |
| 936 | * | 968 | * |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 7e3c53a900d8..c18257b0fa72 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
| @@ -17,8 +17,8 @@ struct _ddebug { | |||
| 17 | const char *format; | 17 | const char *format; |
| 18 | unsigned int lineno:18; | 18 | unsigned int lineno:18; |
| 19 | /* | 19 | /* |
| 20 | * The flags field controls the behaviour at the callsite. | 20 | * The flags field controls the behaviour at the callsite. |
| 21 | * The bits here are changed dynamically when the user | 21 | * The bits here are changed dynamically when the user |
| 22 | * writes commands to <debugfs>/dynamic_debug/control | 22 | * writes commands to <debugfs>/dynamic_debug/control |
| 23 | */ | 23 | */ |
| 24 | #define _DPRINTK_FLAGS_NONE 0 | 24 | #define _DPRINTK_FLAGS_NONE 0 |
| @@ -44,6 +44,9 @@ extern int ddebug_remove_module(const char *mod_name); | |||
| 44 | extern __printf(2, 3) | 44 | extern __printf(2, 3) |
| 45 | int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); | 45 | int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); |
| 46 | 46 | ||
| 47 | extern int ddebug_dyndbg_module_param_cb(char *param, char *val, | ||
| 48 | const char *modname); | ||
| 49 | |||
| 47 | struct device; | 50 | struct device; |
| 48 | 51 | ||
| 49 | extern __printf(3, 4) | 52 | extern __printf(3, 4) |
| @@ -94,11 +97,26 @@ do { \ | |||
| 94 | 97 | ||
| 95 | #else | 98 | #else |
| 96 | 99 | ||
| 100 | #include <linux/string.h> | ||
| 101 | #include <linux/errno.h> | ||
| 102 | |||
| 97 | static inline int ddebug_remove_module(const char *mod) | 103 | static inline int ddebug_remove_module(const char *mod) |
| 98 | { | 104 | { |
| 99 | return 0; | 105 | return 0; |
| 100 | } | 106 | } |
| 101 | 107 | ||
| 108 | static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, | ||
| 109 | const char *modname) | ||
| 110 | { | ||
| 111 | if (strstr(param, "dyndbg")) { | ||
| 112 | /* avoid pr_warn(), which wants pr_fmt() fully defined */ | ||
| 113 | printk(KERN_WARNING "dyndbg param is supported only in " | ||
| 114 | "CONFIG_DYNAMIC_DEBUG builds\n"); | ||
| 115 | return 0; /* allow and ignore */ | ||
| 116 | } | ||
| 117 | return -EINVAL; | ||
| 118 | } | ||
| 119 | |||
| 102 | #define dynamic_pr_debug(fmt, ...) \ | 120 | #define dynamic_pr_debug(fmt, ...) \ |
| 103 | do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0) | 121 | do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0) |
| 104 | #define dynamic_dev_dbg(dev, fmt, ...) \ | 122 | #define dynamic_dev_dbg(dev, fmt, ...) \ |
diff --git a/include/linux/extcon.h b/include/linux/extcon.h new file mode 100644 index 000000000000..cdd401477656 --- /dev/null +++ b/include/linux/extcon.h | |||
| @@ -0,0 +1,324 @@ | |||
| 1 | /* | ||
| 2 | * External connector (extcon) class driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Samsung Electronics | ||
| 5 | * Author: Donggeun Kim <dg77.kim@samsung.com> | ||
| 6 | * Author: MyungJoo Ham <myungjoo.ham@samsung.com> | ||
| 7 | * | ||
| 8 | * based on switch class driver | ||
| 9 | * Copyright (C) 2008 Google, Inc. | ||
| 10 | * Author: Mike Lockwood <lockwood@android.com> | ||
| 11 | * | ||
| 12 | * This software is licensed under the terms of the GNU General Public | ||
| 13 | * License version 2, as published by the Free Software Foundation, and | ||
| 14 | * may be copied, distributed, and modified under those terms. | ||
| 15 | * | ||
| 16 | * This program is distributed in the hope that it will be useful, | ||
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 19 | * GNU General Public License for more details. | ||
| 20 | * | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef __LINUX_EXTCON_H__ | ||
| 24 | #define __LINUX_EXTCON_H__ | ||
| 25 | |||
| 26 | #include <linux/notifier.h> | ||
| 27 | |||
| 28 | #define SUPPORTED_CABLE_MAX 32 | ||
| 29 | #define CABLE_NAME_MAX 30 | ||
| 30 | |||
| 31 | /* | ||
| 32 | * The standard cable name is to help support general notifier | ||
| 33 | * and notifee device drivers to share the common names. | ||
| 34 | * Please use standard cable names unless your notifier device has | ||
| 35 | * a very unique and abnormal cable or | ||
| 36 | * the cable type is supposed to be used with only one unique | ||
| 37 | * pair of notifier/notifee devices. | ||
| 38 | * | ||
| 39 | * Please add any other "standard" cables used with extcon dev. | ||
| 40 | * | ||
| 41 | * You may add a dot and number to specify version or specification | ||
| 42 | * of the specific cable if it is required. (e.g., "Fast-charger.18" | ||
| 43 | * and "Fast-charger.10" for 1.8A and 1.0A chargers) | ||
| 44 | * However, the notifee and notifier should be able to handle such | ||
| 45 | * string and if the notifee can negotiate the protocol or idenify, | ||
| 46 | * you don't need such convention. This convention is helpful when | ||
| 47 | * notifier can distinguish but notifiee cannot. | ||
