diff options
Diffstat (limited to 'drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c')
| -rw-r--r-- | drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c index 3aee6835a2de..7970fa6e1557 100644 --- a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c +++ b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c @@ -13,6 +13,7 @@ #include <linux/regmap.h> #include <linux/seq_file.h> #include <linux/slab.h> +#include <linux/string_choices.h> #include <linux/pinctrl/pinconf-generic.h> #include <linux/pinctrl/pinconf.h> @@ -336,7 +337,7 @@ static int pm8xxx_pin_config_get(struct pinctrl_dev *pctldev, case PIN_CONFIG_INPUT_ENABLE: arg = pin->input; break; - case PIN_CONFIG_OUTPUT: + case PIN_CONFIG_LEVEL: arg = pin->output_value; break; case PIN_CONFIG_POWER_SOURCE: @@ -391,7 +392,7 @@ static int pm8xxx_pin_config_set(struct pinctrl_dev *pctldev, case PIN_CONFIG_INPUT_ENABLE: pin->input = true; break; - case PIN_CONFIG_OUTPUT: + case PIN_CONFIG_LEVEL: pin->output = true; pin->output_value = !!arg; break; @@ -510,14 +511,15 @@ static int pm8xxx_mpp_get(struct gpio_chip *chip, unsigned offset) return ret; } -static void pm8xxx_mpp_set(struct gpio_chip *chip, unsigned offset, int value) +static int pm8xxx_mpp_set(struct gpio_chip *chip, unsigned int offset, + int value) { struct pm8xxx_mpp *pctrl = gpiochip_get_data(chip); struct pm8xxx_pin_data *pin = pctrl->desc.pins[offset].drv_data; pin->output_value = !!value; - pm8xxx_mpp_update(pctrl, pin); + return pm8xxx_mpp_update(pctrl, pin); } static int pm8xxx_mpp_of_xlate(struct gpio_chip *chip, @@ -576,8 +578,7 @@ static void pm8xxx_mpp_dbg_show_one(struct seq_file *s, seq_puts(s, "out "); if (!pin->paired) { - seq_puts(s, pin->output_value ? - "high" : "low"); + seq_puts(s, str_high_low(pin->output_value)); } else { seq_puts(s, pin->output_value ? "inverted" : "follow"); @@ -589,8 +590,7 @@ static void pm8xxx_mpp_dbg_show_one(struct seq_file *s, if (pin->output) { seq_printf(s, "out %s ", aout_lvls[pin->aout_level]); if (!pin->paired) { - seq_puts(s, pin->output_value ? - "high" : "low"); + seq_puts(s, str_high_low(pin->output_value)); } else { seq_puts(s, pin->output_value ? "inverted" : "follow"); @@ -605,8 +605,7 @@ static void pm8xxx_mpp_dbg_show_one(struct seq_file *s, seq_printf(s, "dtest%d", pin->dtest); } else { if (!pin->paired) { - seq_puts(s, pin->output_value ? - "high" : "low"); + seq_puts(s, str_high_low(pin->output_value)); } else { seq_puts(s, pin->output_value ? "inverted" : "follow"); @@ -949,7 +948,7 @@ static struct platform_driver pm8xxx_mpp_driver = { .of_match_table = pm8xxx_mpp_of_match, }, .probe = pm8xxx_mpp_probe, - .remove_new = pm8xxx_mpp_remove, + .remove = pm8xxx_mpp_remove, }; module_platform_driver(pm8xxx_mpp_driver); |
