diff options
Diffstat (limited to 'drivers/pinctrl/pinconf-generic.c')
| -rw-r--r-- | drivers/pinctrl/pinconf-generic.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c index 55a0ebe830a..29ff77f90fc 100644 --- a/drivers/pinctrl/pinconf-generic.c +++ b/drivers/pinctrl/pinconf-generic.c @@ -48,6 +48,7 @@ static struct pin_config_item conf_items[] = {  	PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_DRAIN, "output drive open drain", NULL),  	PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_SOURCE, "output drive open source", NULL),  	PCONFDUMP(PIN_CONFIG_DRIVE_STRENGTH, "output drive strength", "mA"), +	PCONFDUMP(PIN_CONFIG_INPUT_ENABLE, "input enabled", NULL),  	PCONFDUMP(PIN_CONFIG_INPUT_SCHMITT_ENABLE, "input schmitt enabled", NULL),  	PCONFDUMP(PIN_CONFIG_INPUT_SCHMITT, "input schmitt trigger", NULL),  	PCONFDUMP(PIN_CONFIG_INPUT_DEBOUNCE, "input debounce", "usec"), @@ -160,13 +161,17 @@ static struct pinconf_generic_dt_params dt_params[] = {  	{ "drive-open-drain", PIN_CONFIG_DRIVE_OPEN_DRAIN, 0 },  	{ "drive-open-source", PIN_CONFIG_DRIVE_OPEN_SOURCE, 0 },  	{ "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 }, +	{ "input-enable", PIN_CONFIG_INPUT_ENABLE, 1 }, +	{ "input-disable", PIN_CONFIG_INPUT_ENABLE, 0 },  	{ "input-schmitt-enable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 1 },  	{ "input-schmitt-disable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 0 },  	{ "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 }, +	{ "power-source", PIN_CONFIG_POWER_SOURCE, 0 },  	{ "low-power-enable", PIN_CONFIG_LOW_POWER_MODE, 1 },  	{ "low-power-disable", PIN_CONFIG_LOW_POWER_MODE, 0 },  	{ "output-low", PIN_CONFIG_OUTPUT, 0, },  	{ "output-high", PIN_CONFIG_OUTPUT, 1, }, +	{ "slew-rate", PIN_CONFIG_SLEW_RATE, 0},  };  /** @@ -224,13 +229,12 @@ int pinconf_generic_parse_dt_config(struct device_node *np,  	 * Now limit the number of configs to the real number of  	 * found properties.  	 */ -	*configs = kzalloc(ncfg * sizeof(unsigned long), GFP_KERNEL); +	*configs = kmemdup(cfg, ncfg * sizeof(unsigned long), GFP_KERNEL);  	if (!*configs) {  		ret = -ENOMEM;  		goto out;  	} -	memcpy(*configs, cfg, ncfg * sizeof(unsigned long));  	*nconfigs = ncfg;  out:  | 
