diff options
author | John Crispin <blogic@openwrt.org> | 2013-02-01 07:05:03 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-02-05 10:17:25 -0500 |
commit | c58bdc36bc111cf3d8f1a27b68899ea3caf2e12b (patch) | |
tree | cf5cbf4ea0beea7482fd669faade5102174f25e8 /drivers/pinctrl | |
parent | 77ef406272095691e84c85bebef0b225b5096e8d (diff) |
pinctrl/lantiq: add functionality to falcon_pinconf_dbg_show
The current code only has a stub for falcon_pinconf_dbg_show.
This patch adds proper functionality.
Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-falcon.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-falcon.c b/drivers/pinctrl/pinctrl-falcon.c index c5a986855e17..4a0d54a08890 100644 --- a/drivers/pinctrl/pinctrl-falcon.c +++ b/drivers/pinctrl/pinctrl-falcon.c | |||
@@ -315,6 +315,37 @@ static int falcon_pinconf_set(struct pinctrl_dev *pctrldev, | |||
315 | static void falcon_pinconf_dbg_show(struct pinctrl_dev *pctrldev, | 315 | static void falcon_pinconf_dbg_show(struct pinctrl_dev *pctrldev, |
316 | struct seq_file *s, unsigned offset) | 316 | struct seq_file *s, unsigned offset) |
317 | { | 317 | { |
318 | unsigned long config; | ||
319 | struct pin_desc *desc; | ||
320 | |||
321 | struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctrldev); | ||
322 | int port = PORT(offset); | ||
323 | |||
324 | seq_printf(s, " (port %d) mux %d -- ", port, | ||
325 | pad_r32(info->membase[port], LTQ_PADC_MUX(PORT_PIN(offset)))); | ||
326 | |||
327 | config = LTQ_PINCONF_PACK(LTQ_PINCONF_PARAM_PULL, 0); | ||
328 | if (!falcon_pinconf_get(pctrldev, offset, &config)) | ||
329 | seq_printf(s, "pull %d ", | ||
330 | (int)LTQ_PINCONF_UNPACK_ARG(config)); | ||
331 | |||
332 | config = LTQ_PINCONF_PACK(LTQ_PINCONF_PARAM_DRIVE_CURRENT, 0); | ||
333 | if (!falcon_pinconf_get(pctrldev, offset, &config)) | ||
334 | seq_printf(s, "drive-current %d ", | ||
335 | (int)LTQ_PINCONF_UNPACK_ARG(config)); | ||
336 | |||
337 | config = LTQ_PINCONF_PACK(LTQ_PINCONF_PARAM_SLEW_RATE, 0); | ||
338 | if (!falcon_pinconf_get(pctrldev, offset, &config)) | ||
339 | seq_printf(s, "slew-rate %d ", | ||
340 | (int)LTQ_PINCONF_UNPACK_ARG(config)); | ||
341 | |||
342 | desc = pin_desc_get(pctrldev, offset); | ||
343 | if (desc) { | ||
344 | if (desc->gpio_owner) | ||
345 | seq_printf(s, " owner: %s", desc->gpio_owner); | ||
346 | } else { | ||
347 | seq_printf(s, " not registered"); | ||
348 | } | ||
318 | } | 349 | } |
319 | 350 | ||
320 | static void falcon_pinconf_group_dbg_show(struct pinctrl_dev *pctrldev, | 351 | static void falcon_pinconf_group_dbg_show(struct pinctrl_dev *pctrldev, |