mirror of https://gitee.com/openkylin/linux.git
pinctrl: sh-pfc: r8a7796: Deduplicate VIN5 pin definitions
Use union vin_data16 and VIN_DATA_PIN_GROUP() to reduce redundancies in pin definitions for the VIN5 channel. This reduces kernel size by 240 bytes. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
This commit is contained in:
parent
99fdb920f5
commit
08b7e2112a
|
@ -4070,67 +4070,29 @@ static const unsigned int vin4_clk_mux[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* - VIN5 ------------------------------------------------------------------- */
|
/* - VIN5 ------------------------------------------------------------------- */
|
||||||
static const unsigned int vin5_data8_pins[] = {
|
static const union vin_data16 vin5_data_pins = {
|
||||||
RCAR_GP_PIN(0, 0), RCAR_GP_PIN(0, 1),
|
.data16 = {
|
||||||
RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3),
|
RCAR_GP_PIN(0, 0), RCAR_GP_PIN(0, 1),
|
||||||
RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5),
|
RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3),
|
||||||
RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7),
|
RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5),
|
||||||
|
RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7),
|
||||||
|
RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 13),
|
||||||
|
RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 15),
|
||||||
|
RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5),
|
||||||
|
RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
static const unsigned int vin5_data8_mux[] = {
|
static const union vin_data16 vin5_data_mux = {
|
||||||
VI5_DATA0_MARK, VI5_DATA1_MARK,
|
.data16 = {
|
||||||
VI5_DATA2_MARK, VI5_DATA3_MARK,
|
VI5_DATA0_MARK, VI5_DATA1_MARK,
|
||||||
VI5_DATA4_MARK, VI5_DATA5_MARK,
|
VI5_DATA2_MARK, VI5_DATA3_MARK,
|
||||||
VI5_DATA6_MARK, VI5_DATA7_MARK,
|
VI5_DATA4_MARK, VI5_DATA5_MARK,
|
||||||
};
|
VI5_DATA6_MARK, VI5_DATA7_MARK,
|
||||||
static const unsigned int vin5_data10_pins[] = {
|
VI5_DATA8_MARK, VI5_DATA9_MARK,
|
||||||
RCAR_GP_PIN(0, 0), RCAR_GP_PIN(0, 1),
|
VI5_DATA10_MARK, VI5_DATA11_MARK,
|
||||||
RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3),
|
VI5_DATA12_MARK, VI5_DATA13_MARK,
|
||||||
RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5),
|
VI5_DATA14_MARK, VI5_DATA15_MARK,
|
||||||
RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7),
|
},
|
||||||
RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 13),
|
|
||||||
};
|
|
||||||
static const unsigned int vin5_data10_mux[] = {
|
|
||||||
VI5_DATA0_MARK, VI5_DATA1_MARK,
|
|
||||||
VI5_DATA2_MARK, VI5_DATA3_MARK,
|
|
||||||
VI5_DATA4_MARK, VI5_DATA5_MARK,
|
|
||||||
VI5_DATA6_MARK, VI5_DATA7_MARK,
|
|
||||||
VI5_DATA8_MARK, VI5_DATA9_MARK,
|
|
||||||
};
|
|
||||||
static const unsigned int vin5_data12_pins[] = {
|
|
||||||
RCAR_GP_PIN(0, 0), RCAR_GP_PIN(0, 1),
|
|
||||||
RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3),
|
|
||||||
RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5),
|
|
||||||
RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7),
|
|
||||||
RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 13),
|
|
||||||
RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 15),
|
|
||||||
};
|
|
||||||
static const unsigned int vin5_data12_mux[] = {
|
|
||||||
VI5_DATA0_MARK, VI5_DATA1_MARK,
|
|
||||||
VI5_DATA2_MARK, VI5_DATA3_MARK,
|
|
||||||
VI5_DATA4_MARK, VI5_DATA5_MARK,
|
|
||||||
VI5_DATA6_MARK, VI5_DATA7_MARK,
|
|
||||||
VI5_DATA8_MARK, VI5_DATA9_MARK,
|
|
||||||
VI5_DATA10_MARK, VI5_DATA11_MARK,
|
|
||||||
};
|
|
||||||
static const unsigned int vin5_data16_pins[] = {
|
|
||||||
RCAR_GP_PIN(0, 0), RCAR_GP_PIN(0, 1),
|
|
||||||
RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3),
|
|
||||||
RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5),
|
|
||||||
RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7),
|
|
||||||
RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 13),
|
|
||||||
RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 15),
|
|
||||||
RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5),
|
|
||||||
RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
|
|
||||||
};
|
|
||||||
static const unsigned int vin5_data16_mux[] = {
|
|
||||||
VI5_DATA0_MARK, VI5_DATA1_MARK,
|
|
||||||
VI5_DATA2_MARK, VI5_DATA3_MARK,
|
|
||||||
VI5_DATA4_MARK, VI5_DATA5_MARK,
|
|
||||||
VI5_DATA6_MARK, VI5_DATA7_MARK,
|
|
||||||
VI5_DATA8_MARK, VI5_DATA9_MARK,
|
|
||||||
VI5_DATA10_MARK, VI5_DATA11_MARK,
|
|
||||||
VI5_DATA12_MARK, VI5_DATA13_MARK,
|
|
||||||
VI5_DATA14_MARK, VI5_DATA15_MARK,
|
|
||||||
};
|
};
|
||||||
static const unsigned int vin5_sync_pins[] = {
|
static const unsigned int vin5_sync_pins[] = {
|
||||||
/* HSYNC#, VSYNC# */
|
/* HSYNC#, VSYNC# */
|
||||||
|
@ -4468,10 +4430,10 @@ static const struct {
|
||||||
SH_PFC_PIN_GROUP(vin4_field),
|
SH_PFC_PIN_GROUP(vin4_field),
|
||||||
SH_PFC_PIN_GROUP(vin4_clkenb),
|
SH_PFC_PIN_GROUP(vin4_clkenb),
|
||||||
SH_PFC_PIN_GROUP(vin4_clk),
|
SH_PFC_PIN_GROUP(vin4_clk),
|
||||||
SH_PFC_PIN_GROUP(vin5_data8),
|
VIN_DATA_PIN_GROUP(vin5_data, 8),
|
||||||
SH_PFC_PIN_GROUP(vin5_data10),
|
VIN_DATA_PIN_GROUP(vin5_data, 10),
|
||||||
SH_PFC_PIN_GROUP(vin5_data12),
|
VIN_DATA_PIN_GROUP(vin5_data, 12),
|
||||||
SH_PFC_PIN_GROUP(vin5_data16),
|
VIN_DATA_PIN_GROUP(vin5_data, 16),
|
||||||
SH_PFC_PIN_GROUP(vin5_sync),
|
SH_PFC_PIN_GROUP(vin5_sync),
|
||||||
SH_PFC_PIN_GROUP(vin5_field),
|
SH_PFC_PIN_GROUP(vin5_field),
|
||||||
SH_PFC_PIN_GROUP(vin5_clkenb),
|
SH_PFC_PIN_GROUP(vin5_clkenb),
|
||||||
|
|
Loading…
Reference in New Issue