Skip to contentSkip to conversation

pinctrl: pinctrl-single: add debugfs pin h/w state info

PATCH In review Matt Porter 2 participants 2 messages Sep 26, 2012 – Sep 27, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: pinctrl-single: add debugfs pin h/w state info

Adds support for displaying the individual pin h/w config state.

---
 drivers/pinctrl/pinctrl-single.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/pinctrl/pinctrl-single.c +9 -1
index aabecfa..726a729 100644
@@ -246,7 +246,15 @@ static void pcs_pin_dbg_show(struct pinctrl_dev *pctldev,
 					struct seq_file *s,
 					unsigned offset)
 {
-	seq_printf(s, " " DRIVER_NAME);
+	struct pcs_device *pcs;
+	unsigned val;
+
+	pcs = pinctrl_dev_get_drvdata(pctldev);
+
+	val = pcs->read(pcs->base + offset);
+	val &= pcs->fmask;
+
+	seq_printf(s, "%08x %s " , val, DRIVER_NAME);
 }
 
 static void pcs_dt_free_map(struct pinctrl_dev *pctldev,
Signature · 1 line
1.7.9.5