lkml.org 
[lkml]   [2013]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 8/9] pinctrl-tz1090-pdc: add TZ1090 PDC pinctrl driver
From
On Fri, May 24, 2013 at 6:21 PM, James Hogan <james.hogan@imgtec.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


\
 
 \ /
  Last update: 2013-05-29 20:01    [W:0.171 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site