Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

+8 -8
+8 -8
drivers/pinctrl/intel/pinctrl-intel.h
··· 27 27 * @name: Name of the groups 28 28 * @pins: All pins in this group 29 29 * @npins: Number of pins in this groups 30 - * @mode: Native mode in which the group is muxed out @pins. Used if @modes 31 - * is %NULL. 30 + * @grp: Generic data of the pin group (name and pins) 31 + * @mode: Native mode in which the group is muxed out @pins. Used if @modes is %NULL. 32 32 * @modes: If not %NULL this will hold mode for each pin in @pins 33 33 */ 34 34 struct intel_pingroup { 35 35 const char *name; 36 36 const unsigned int *pins; 37 37 size_t npins; 38 + struct pingroup grp; 38 39 unsigned short mode; 39 40 const unsigned int *modes; 40 41 }; ··· 157 156 * a single integer or an array of integers in which case mode is per 158 157 * pin. 159 158 */ 160 - #define PIN_GROUP(n, p, m) \ 161 - { \ 159 + #define PIN_GROUP(n, p, m) \ 160 + { \ 162 161 .name = (n), \ 163 162 .pins = (p), \ 164 163 .npins = ARRAY_SIZE((p)), \ 165 - .mode = __builtin_choose_expr( \ 166 - __builtin_constant_p((m)), (m), 0), \ 167 - .modes = __builtin_choose_expr( \ 168 - __builtin_constant_p((m)), NULL, (m)), \ 164 + .grp = PINCTRL_PINGROUP((n), (p), ARRAY_SIZE((p))), \ 165 + .mode = __builtin_choose_expr(__builtin_constant_p((m)), (m), 0), \ 166 + .modes = __builtin_choose_expr(__builtin_constant_p((m)), NULL, (m)), \ 169 167 } 170 168 171 169 #define FUNCTION(n, g) \