[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkda96Gwz7HFP5-KyiijRTafznwK+OKNxHFzk4j9pQ6A5ag@mail.gmail.com>
Date: Wed, 29 May 2013 17:36:36 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: James Hogan <james.hogan@...tec.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Grant Likely <grant.likely@...retlab.ca>,
Rob Herring <rob.herring@...xeda.com>,
Rob Landley <rob@...dley.net>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"devicetree-discuss@...ts.ozlabs.org"
<devicetree-discuss@...ts.ozlabs.org>
Subject: Re: [PATCH v2 8/9] pinctrl-tz1090-pdc: add TZ1090 PDC pinctrl driver
On Fri, May 24, 2013 at 6:21 PM, James Hogan <james.hogan@...tec.com> wrote:
> +++ b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt
> +Optional subnode-properties:
> +- function: A string containing the name of the function to mux to the pin or
> + group. Valid values for function names are listed below, including which
> + pingroups can be muxed to them.
> +- tristate: Flag, put pin into high impedance state.
> +- pull-up: Flag, pull pin high.
> +- pull-down: Flag: pull pin low.
> +- bus-hold: Flag, weak latch last value on tristate bus.
> +- schmitt: Integer, enable or disable Schmitt trigger mode for the pins.
> + 0: no hysteresis
> + 1: schmitt trigger
> +- slew-rate: Integer, control slew rate of pins.
> + 0: slow (half frequency)
> + 1: fast
> +- drive-strength: Integer, control drive strength of pins in mA.
> + 2: 2mA
> + 4: 4mA
> + 8: 8mA
> + 12: 12mA
> +- power-on-start: Integer, power on start value of pins
> + 0: weak pull-down disabled
> + 1: weak pull-down for invalid power
Like on the first pinctrl patch, this needs to be genercized and moved to
the core, you're even adding code duplication between two drivers here,
so we really need to do something about it.
(...)
> +/* Describes pinconf properties/flags available from device tree */
> +static const struct cfg_param {
> + const char *property;
> + enum pin_config_param param;
> + bool flag;
> +} cfg_params[] = {
> + {"tristate", PIN_CONFIG_BIAS_HIGH_IMPEDANCE, true},
> + {"pull-up", PIN_CONFIG_BIAS_PULL_UP, true},
> + {"pull-down", PIN_CONFIG_BIAS_PULL_DOWN, true},
> + {"bus-hold", PIN_CONFIG_BIAS_BUS_HOLD, true},
> + {"power-on-start", PIN_CONFIG_LOW_POWER_MODE, true},
> + {"schmitt", PIN_CONFIG_INPUT_SCHMITT_ENABLE, true},
> + {"slew-rate", PIN_CONFIG_SLEW_RATE, false},
> + {"drive-strength", PIN_CONFIG_DRIVE_STRENGTH, false},
> +
> +};
Like this is looking very familiar.
Apart from that is it looking nice.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists