diff mbox

pinctrl: sort dt_params array in the same order as pin_config_param

Message ID 1442766419-3983-1-git-send-email-yamada.masahiro@socionext.com
State New
Headers show

Commit Message

Masahiro Yamada Sept. 20, 2015, 4:26 p.m. UTC
Sort this array in the same order as enum pin_config_param and
conf_items array for consistency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/pinctrl/pinconf-generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bjorn Andersson Sept. 23, 2015, 4:39 a.m. UTC | #1
On Sun 20 Sep 09:26 PDT 2015, Masahiro Yamada wrote:

> Sort this array in the same order as enum pin_config_param and
> conf_items array for consistency.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
>  drivers/pinctrl/pinconf-generic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
> index e63ad9f..f0bc8bb 100644
> --- a/drivers/pinctrl/pinconf-generic.c
> +++ b/drivers/pinctrl/pinconf-generic.c
> @@ -166,11 +166,11 @@ static const struct pinconf_generic_params dt_params[] = {
>  	{ "input-schmitt-disable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 0 },
>  	{ "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
>  	{ "power-source", PIN_CONFIG_POWER_SOURCE, 0 },
> +	{ "slew-rate", PIN_CONFIG_SLEW_RATE, 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},

I would like to see these alphabetically sorted instead and looking at
most of the entries that's already the case.

The order of the lists in this file the order doesn't matter, so that's
easy. There's some potential implications of renumbering the enum, but I
think it's worth keeping them sorted as well.

Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij Sept. 24, 2015, 4:40 p.m. UTC | #2
On Tue, Sep 22, 2015 at 9:39 PM, Bjorn Andersson
<bjorn.andersson@sonymobile.com> wrote:
> On Sun 20 Sep 09:26 PDT 2015, Masahiro Yamada wrote:

>> +     { "slew-rate", PIN_CONFIG_SLEW_RATE, 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},
>
> I would like to see these alphabetically sorted instead and looking at
> most of the entries that's already the case.
>
> The order of the lists in this file the order doesn't matter, so that's
> easy. There's some potential implications of renumbering the enum, but I
> think it's worth keeping them sorted as well.

I agree. Dropping this for a better fix, patches accepted :)

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index e63ad9f..f0bc8bb 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -166,11 +166,11 @@  static const struct pinconf_generic_params dt_params[] = {
 	{ "input-schmitt-disable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 0 },
 	{ "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
 	{ "power-source", PIN_CONFIG_POWER_SOURCE, 0 },
+	{ "slew-rate", PIN_CONFIG_SLEW_RATE, 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},
 };
 
 /**