drivers/pinctrl: grab default handles from device core
[deliverable/linux.git] / include / linux / device.h
index 05292e488346697a40614b356eef82e2425f423b..001f6637aa476eacb7cd75b36008ecce35d3bd53 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/compiler.h>
 #include <linux/types.h>
 #include <linux/mutex.h>
+#include <linux/pinctrl/devinfo.h>
 #include <linux/pm.h>
 #include <linux/atomic.h>
 #include <linux/ratelimit.h>
@@ -498,6 +499,10 @@ ssize_t device_show_int(struct device *dev, struct device_attribute *attr,
                        char *buf);
 ssize_t device_store_int(struct device *dev, struct device_attribute *attr,
                         const char *buf, size_t count);
+ssize_t device_show_bool(struct device *dev, struct device_attribute *attr,
+                       char *buf);
+ssize_t device_store_bool(struct device *dev, struct device_attribute *attr,
+                        const char *buf, size_t count);
 
 #define DEVICE_ATTR(_name, _mode, _show, _store) \
        struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
@@ -507,6 +512,9 @@ ssize_t device_store_int(struct device *dev, struct device_attribute *attr,
 #define DEVICE_INT_ATTR(_name, _mode, _var) \
        struct dev_ext_attribute dev_attr_##_name = \
                { __ATTR(_name, _mode, device_show_int, device_store_int), &(_var) }
+#define DEVICE_BOOL_ATTR(_name, _mode, _var) \
+       struct dev_ext_attribute dev_attr_##_name = \
+               { __ATTR(_name, _mode, device_show_bool, device_store_bool), &(_var) }
 #define DEVICE_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) \
        struct device_attribute dev_attr_##_name =              \
                __ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store)
@@ -613,6 +621,8 @@ struct acpi_dev_node {
  * @pm_domain: Provide callbacks that are executed during system suspend,
  *             hibernation, system resume and during runtime PM transitions
  *             along with subsystem-level and driver-level callbacks.
+ * @pins:      For device pin management.
+ *             See Documentation/pinctrl.txt for details.
  * @numa_node: NUMA node this device is close to.
  * @dma_mask:  Dma mask (if dma'ble device).
  * @coherent_dma_mask: Like dma_mask, but for alloc_coherent mapping as not all
@@ -665,6 +675,10 @@ struct device {
        struct dev_pm_info      power;
        struct dev_pm_domain    *pm_domain;
 
+#ifdef CONFIG_PINCTRL
+       struct dev_pin_info     *pins;
+#endif
+
 #ifdef CONFIG_NUMA
        int             numa_node;      /* NUMA node this device is close to */
 #endif
This page took 0.03107 seconds and 5 git commands to generate.