History

pinctrl: pinconf-generic: loose DT dependence

New pin controllers such as ACPI-based may also have custom properties to parse, and should be able to use generic pin config. Let's make the code compile on !OF systems and rename members a bit to underscore it is custom parameters and not necessarily DT parameters. This fixes a build regression for x86_64 on the zeroday kernel builds.

Linus Walleij committed 11 years ago

Commit f684e4a1 parent 7382b625 files · +41 −33Browse files

Showing the changes to include/linux/pinctrl (2 of 5 files). Show all

Unified · Split

2 files
  1. include/linux/pinctrl/pinconf-generic.h +1 −1
  2. include/linux/pinctrl/pinctrl.h +10 −7
include/linux/pinctrl/pinconf-generic.h+1−1
@@ -162,7 +162,7 @@ static inline unsigned long pinconf_to_config_packed(enum pin_config_param param · 161 unmodified lines
162162 struct pinctrl_dev;
163163 struct pinctrl_map;
164164
165−struct pinconf_generic_dt_params {
165+struct pinconf_generic_params {
166166 const char * const property;
167167 enum pin_config_param param;
168168 u32 default_value;
include/linux/pinctrl/pinctrl.h+10−7
@@ -118,9 +118,12 @@ struct pinctrl_ops { · 117 unmodified lines
118118 * @confops: pin config operations vtable, if you support pin configuration in
119119 * your driver
120120 * @owner: module providing the pin controller, used for refcounting
121− * @num_dt_params: Number of driver-specific DT parameters
122− * @params: List of DT parameters
123− * @conf_items: Information how to print @params in debugfs
121+ * @num_custom_params: Number of driver-specific custom parameters to be parsed
122+ * from the hardware description
123+ * @custom_params: List of driver_specific custom parameters to be parsed from
124+ * the hardware description
125+ * @custom_conf_items: Information how to print @params in debugfs, must be
126+ * the same size as the @custom_params, i.e. @num_custom_params
124127 */
125128 struct pinctrl_desc {
126129 const char *name;
@@ -130,10 +133,10 @@ struct pinctrl_desc { · 3 unmodified lines
130133 const struct pinmux_ops *pmxops;
131134 const struct pinconf_ops *confops;
132135 struct module *owner;
133−#if defined(CONFIG_GENERIC_PINCONF) && defined(CONFIG_OF)
134− unsigned int num_dt_params;
135− const struct pinconf_generic_dt_params *params;
136− const struct pin_config_item *conf_items;
136+#ifdef CONFIG_GENERIC_PINCONF
137+ unsigned int num_custom_params;
138+ const struct pinconf_generic_params *custom_params;
139+ const struct pin_config_item *custom_conf_items;
137140 #endif
138141 };
139142