Commit 277b95a9 authored by Andy Shevchenko's avatar Andy Shevchenko
Browse files

pinctrl: intel: Embed struct pingroup into struct intel_pingroup



Add a new member to the struct intel_pingroup to cover generic
pin control group parameters. The idea is to convert all users
(one-by-one) to it and drop old members later on.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent be753a1f
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -27,14 +27,15 @@ struct device;
 * @name: Name of the groups
 * @pins: All pins in this group
 * @npins: Number of pins in this groups
 * @mode: Native mode in which the group is muxed out @pins. Used if @modes
 *        is %NULL.
 * @grp: Generic data of the pin group (name and pins)
 * @mode: Native mode in which the group is muxed out @pins. Used if @modes is %NULL.
 * @modes: If not %NULL this will hold mode for each pin in @pins
 */
struct intel_pingroup {
	const char *name;
	const unsigned int *pins;
	size_t npins;
	struct pingroup grp;
	unsigned short mode;
	const unsigned int *modes;
};
@@ -161,10 +162,9 @@ struct intel_community {
		.name = (n),					\
		.pins = (p),					\
		.npins = ARRAY_SIZE((p)),			\
		.mode = __builtin_choose_expr(			\
			__builtin_constant_p((m)), (m), 0),	\
		.modes = __builtin_choose_expr(			\
			__builtin_constant_p((m)), NULL, (m)),	\
		.grp = PINCTRL_PINGROUP((n), (p), ARRAY_SIZE((p))),			\
		.mode = __builtin_choose_expr(__builtin_constant_p((m)), (m), 0),	\
		.modes = __builtin_choose_expr(__builtin_constant_p((m)), NULL, (m)),	\
	}

#define FUNCTION(n, g)				\