Commit 5ab4909d authored by Linus Walleij's avatar Linus Walleij
Browse files

Merge tag 'intel-pinctrl-v6.3-1' of...

Merge tag 'intel-pinctrl-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel

intel-pinctrl for v6.3-1

* Add ~4kOhm bias support to Intel pin control drivers
* Convert Intel pin control drivers to use INTEL_COMMUNITY_*()
* Add struct pinfunction and use it in Intel pin control drivers
* Make pin control documentation up to date
* Miscellaneous cleanups

The following is an automated git shortlog grouped by driver:

pinctrl:
 - Proofreading and updating the documentation accordingly
 - Proofreading and updating the documentation (part 2)

alderlake:
 -  Replace ADL_COMMUNITY() by INTEL_COMMUNITY_GPPS()

baytrail:
 -  Convert to use new memeber in struct intel_function

broxton:
 -  Replace BXT_COMMUNITY() by INTEL_COMMUNITY_SIZE()

cannonlake:
 -  Replace CNL_COMMUNITY() by INTEL_COMMUNITY_GPPS()

cedarfork:
 -  Replace CDF_COMMUNITY() by INTEL_COMMUNITY_GPPS()

cherryview:
 -  Convert to use new memeber in struct intel_function

denverton:
 -  Replace DNV_COMMUNITY() by INTEL_COMMUNITY_GPPS()

elkhartlake:
 -  Replace EHL_COMMUNITY() by INTEL_COMMUNITY_GPPS()

emmitsburg:
 -  Replace EBG_COMMUNITY() by INTEL_COMMUNITY_GPPS()

geminilake:
 -  Replace GLK_COMMUNITY() by INTEL_COMMUNITY_SIZE()

icelake:
 -  Replace ICL_COMMUNITY() by INTEL_COMMUNITY_GPPS()

intel:
 -  Get rid of unused members in struct intel_function
 -  Make use of struct pinfunction and PINCTRL_PINFUNCTION()
 -  Define maximum pad number in the group
 -  Use same order of bit fields for PADCFG2
 -  Add ~4k bias support
 -  Add definitions to all possible biases
 -  Deduplicate some code in intel_config_set_pull()
 -  Add default case to intel_config_set_pull()
 -  Convert to generic_handle_domain_irq()
 -  Always use gpp_num_padown_regs in the main driver
 -  Introduce INTEL_COMMUNITY_*() to unify community macros

Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro:
 - Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro

jasperlake:
 -  Replace JSL_COMMUNITY() by INTEL_COMMUNITY_GPPS()

lakefield:
 -  Replace LKF_COMMUNITY() by INTEL_COMMUNITY_GPPS()

lewisburg:
 -  Replace LBG_COMMUNITY() by INTEL_COMMUNITY_SIZE()

lynxpoint:
 -  Convert to use new memeber in struct intel_function

merrifield:
 -  Convert to use new memeber in struct intel_function

meteorlake:
 -  Replace MTL_COMMUNITY() by INTEL_COMMUNITY_GPPS()

moorefield:
 -  Convert to use new memeber in struct intel_function

sunrisepoint:
 -  Replace SPT_COMMUNITY() by INTEL_COMMUNITY_*()

tigerlake:
 -  Replace TGL_COMMUNITY() by INTEL_COMMUNITY_GPPS()
parents 19a2c394 88f8ac47
Loading
Loading
Loading
Loading
+243 −255

File changed.

Preview size limit exceeded, changes collapsed.

+2 −16
Original line number Diff line number Diff line
@@ -34,25 +34,11 @@
		.gpio_base = (g),			\
	}

#define ADL_COMMUNITY(b, s, e, g, v)				\
	{							\
		.barno = (b),					\
		.padown_offset = ADL_##v##_PAD_OWN,		\
		.padcfglock_offset = ADL_##v##_PADCFGLOCK,	\
		.hostown_offset = ADL_##v##_HOSTSW_OWN,		\
		.is_offset = ADL_##v##_GPI_IS,			\
		.ie_offset = ADL_##v##_GPI_IE,			\
		.pin_base = (s),				\
		.npins = ((e) - (s) + 1),			\
		.gpps = (g),					\
		.ngpps = ARRAY_SIZE(g),				\
	}

#define ADL_N_COMMUNITY(b, s, e, g)			\
	ADL_COMMUNITY(b, s, e, g, N)
	INTEL_COMMUNITY_GPPS(b, s, e, g, ADL_N)

#define ADL_S_COMMUNITY(b, s, e, g)			\
	ADL_COMMUNITY(b, s, e, g, S)
	INTEL_COMMUNITY_GPPS(b, s, e, g, ADL_S)

/* Alder Lake-N */
static const struct pinctrl_pin_desc adln_pins[] = {
+5 −5
Original line number Diff line number Diff line
@@ -637,18 +637,18 @@ static const char *byt_get_function_name(struct pinctrl_dev *pctldev,
{
	struct intel_pinctrl *vg = pinctrl_dev_get_drvdata(pctldev);

	return vg->soc->functions[selector].name;
	return vg->soc->functions[selector].func.name;
}

static int byt_get_function_groups(struct pinctrl_dev *pctldev,
				   unsigned int selector,
				   const char * const **groups,
				   unsigned int *num_groups)
				   unsigned int *ngroups)
{
	struct intel_pinctrl *vg = pinctrl_dev_get_drvdata(pctldev);

	*groups		= vg->soc->functions[selector].groups;
	*num_groups	= vg->soc->functions[selector].ngroups;
	*groups		= vg->soc->functions[selector].func.groups;
	*ngroups	= vg->soc->functions[selector].func.ngroups;

	return 0;
}
@@ -722,7 +722,7 @@ static int byt_set_mux(struct pinctrl_dev *pctldev, unsigned int func_selector,

	if (group.modes)
		byt_set_group_mixed_mux(vg, group, group.modes);
	else if (!strcmp(func.name, "gpio"))
	else if (!strcmp(func.func.name, "gpio"))
		byt_set_group_simple_mux(vg, group, BYT_DEFAULT_GPIO_MUX);
	else
		byt_set_group_simple_mux(vg, group, group.mode);
+11 −20
Original line number Diff line number Diff line
@@ -20,17 +20,8 @@
#define BXT_GPI_IS	0x100
#define BXT_GPI_IE	0x110

#define BXT_COMMUNITY(s, e)				\
	{						\
		.padown_offset = BXT_PAD_OWN,		\
		.padcfglock_offset = BXT_PADCFGLOCK,	\
		.hostown_offset = BXT_HOSTSW_OWN,	\
		.is_offset = BXT_GPI_IS,		\
		.ie_offset = BXT_GPI_IE,		\
		.gpp_size = 32,                         \
		.pin_base = (s),			\
		.npins = ((e) - (s) + 1),		\
	}
#define BXT_COMMUNITY(b, s, e)				\
	INTEL_COMMUNITY_SIZE(b, s, e, 32, 4, BXT)

/* BXT */
static const struct pinctrl_pin_desc bxt_north_pins[] = {
@@ -172,7 +163,7 @@ static const struct intel_function bxt_north_functions[] = {
};

static const struct intel_community bxt_north_communities[] = {
	BXT_COMMUNITY(0, 82),
	BXT_COMMUNITY(0, 0, 82),
};

static const struct intel_pinctrl_soc_data bxt_north_soc_data = {
@@ -289,7 +280,7 @@ static const struct intel_function bxt_northwest_functions[] = {
};

static const struct intel_community bxt_northwest_communities[] = {
	BXT_COMMUNITY(0, 71),
	BXT_COMMUNITY(0, 0, 71),
};

static const struct intel_pinctrl_soc_data bxt_northwest_soc_data = {
@@ -396,7 +387,7 @@ static const struct intel_function bxt_west_functions[] = {
};

static const struct intel_community bxt_west_communities[] = {
	BXT_COMMUNITY(0, 41),
	BXT_COMMUNITY(0, 0, 41),
};

static const struct intel_pinctrl_soc_data bxt_west_soc_data = {
@@ -472,7 +463,7 @@ static const struct intel_function bxt_southwest_functions[] = {
};

static const struct intel_community bxt_southwest_communities[] = {
	BXT_COMMUNITY(0, 30),
	BXT_COMMUNITY(0, 0, 30),
};

static const struct intel_pinctrl_soc_data bxt_southwest_soc_data = {
@@ -511,7 +502,7 @@ static const struct pinctrl_pin_desc bxt_south_pins[] = {
};

static const struct intel_community bxt_south_communities[] = {
	BXT_COMMUNITY(0, 19),
	BXT_COMMUNITY(0, 0, 19),
};

static const struct intel_pinctrl_soc_data bxt_south_soc_data = {
@@ -650,7 +641,7 @@ static const struct intel_function apl_north_functions[] = {
};

static const struct intel_community apl_north_communities[] = {
	BXT_COMMUNITY(0, 77),
	BXT_COMMUNITY(0, 0, 77),
};

static const struct intel_pinctrl_soc_data apl_north_soc_data = {
@@ -770,7 +761,7 @@ static const struct intel_function apl_northwest_functions[] = {
};

static const struct intel_community apl_northwest_communities[] = {
	BXT_COMMUNITY(0, 76),
	BXT_COMMUNITY(0, 0, 76),
};

static const struct intel_pinctrl_soc_data apl_northwest_soc_data = {
@@ -880,7 +871,7 @@ static const struct intel_function apl_west_functions[] = {
};

static const struct intel_community apl_west_communities[] = {
	BXT_COMMUNITY(0, 46),
	BXT_COMMUNITY(0, 0, 46),
};

static const struct intel_pinctrl_soc_data apl_west_soc_data = {
@@ -972,7 +963,7 @@ static const struct intel_function apl_southwest_functions[] = {
};

static const struct intel_community apl_southwest_communities[] = {
	BXT_COMMUNITY(0, 42),
	BXT_COMMUNITY(0, 0, 42),
};

static const struct intel_pinctrl_soc_data apl_southwest_soc_data = {
+11 −20
Original line number Diff line number Diff line
@@ -15,12 +15,17 @@

#include "pinctrl-intel.h"

#define CNL_PAD_OWN		0x020
#define CNL_PADCFGLOCK		0x080
#define CNL_LP_PAD_OWN		0x020
#define CNL_LP_PADCFGLOCK	0x080
#define CNL_LP_HOSTSW_OWN	0x0b0
#define CNL_LP_GPI_IS		0x100
#define CNL_LP_GPI_IE		0x120

#define CNL_H_PAD_OWN		0x020
#define CNL_H_PADCFGLOCK	0x080
#define CNL_H_HOSTSW_OWN	0x0c0
#define CNL_GPI_IS		0x100
#define CNL_GPI_IE		0x120
#define CNL_H_GPI_IS		0x100
#define CNL_H_GPI_IE		0x120

#define CNL_GPP(r, s, e, g)				\
	{						\
@@ -30,25 +35,11 @@
		.gpio_base = (g),			\
	}

#define CNL_COMMUNITY(b, s, e, g, v)			\
	{						\
		.barno = (b),				\
		.padown_offset = CNL_PAD_OWN,		\
		.padcfglock_offset = CNL_PADCFGLOCK,	\
		.hostown_offset = CNL_##v##_HOSTSW_OWN,	\
		.is_offset = CNL_GPI_IS,		\
		.ie_offset = CNL_GPI_IE,		\
		.pin_base = (s),			\
		.npins = ((e) - (s) + 1),		\
		.gpps = (g),				\
		.ngpps = ARRAY_SIZE(g),			\
	}

#define CNL_LP_COMMUNITY(b, s, e, g)			\
	CNL_COMMUNITY(b, s, e, g, LP)
	INTEL_COMMUNITY_GPPS(b, s, e, g, CNL_LP)

#define CNL_H_COMMUNITY(b, s, e, g)			\
	CNL_COMMUNITY(b, s, e, g, H)
	INTEL_COMMUNITY_GPPS(b, s, e, g, CNL_H)

/* Cannon Lake-H */
static const struct pinctrl_pin_desc cnlh_pins[] = {
Loading