* [PATCH v3 0/3] am335x: set pinmux registers from pins debug file
@ 2021-05-20 20:27 Dario Binacchi
2021-05-20 20:27 ` [PATCH v3 1/3] docs/pinctrl: update `pins' description under debugfs Dario Binacchi
2021-05-25 0:18 ` [PATCH v3 0/3] am335x: set pinmux registers from pins debug file Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Dario Binacchi @ 2021-05-20 20:27 UTC (permalink / raw)
To: linux-kernel
Cc: Dario Binacchi, Tony Lindgren, Drew Fustini, Linus Walleij,
Andy Shevchenko, Haojian Zhuang, Jonathan Corbet,
linux-arm-kernel, linux-doc, linux-gpio, linux-omap
The patch was born from the need to change the slew rate of the LCD pins
of a custom AM335x board during EMC tests. The AM335x, as described in a
note in section 9.1 of its reference manual [1], is unable to write
pinmux registers from user space. The series now makes it possible to
write these registers from the pins debug file.
[1] https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf
Changes in v3:
- Use strncpy_from_user() instead of copy_from_user().
- Do not shadow the error code returned by kstrtouint().
- Change pin_dbg_set() interface (char *buf --> unsigned int val).
- Describe pin_dbg_set().
- Remove CONFIG_DEV_MEM dependency.
- Change pcs_pin_dbg_set() interface (char *buf -> unsigned int val).
Changes in v2:
- Remove CONFIG_SOC_AM33XX dependency.
Dario Binacchi (3):
docs/pinctrl: update `pins' description under debugfs
pinctrl: core: configure pinmux from pins debug file
pinctrl: single: set pinmux from pins debug file
Documentation/driver-api/pin-control.rst | 3 ++
drivers/pinctrl/core.c | 63 +++++++++++++++++++++++-
drivers/pinctrl/pinctrl-single.c | 13 +++++
include/linux/pinctrl/pinctrl.h | 4 ++
4 files changed, 81 insertions(+), 2 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v3 1/3] docs/pinctrl: update `pins' description under debugfs
2021-05-20 20:27 [PATCH v3 0/3] am335x: set pinmux registers from pins debug file Dario Binacchi
@ 2021-05-20 20:27 ` Dario Binacchi
2021-05-25 0:18 ` [PATCH v3 0/3] am335x: set pinmux registers from pins debug file Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Dario Binacchi @ 2021-05-20 20:27 UTC (permalink / raw)
To: linux-kernel
Cc: Dario Binacchi, Tony Lindgren, Drew Fustini, Linus Walleij,
Andy Shevchenko, Jonathan Corbet, linux-doc, linux-gpio
Optionally the `pins' file created inside the `/sys/kernel/debug/pinctrl'
subdirectory of each pin controller device now allows you to set the
mux register of a pin.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
---
(no changes since v1)
Documentation/driver-api/pin-control.rst | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/driver-api/pin-control.rst b/Documentation/driver-api/pin-control.rst
index e2474425fb0c..3d8192fa45a3 100644
--- a/Documentation/driver-api/pin-control.rst
+++ b/Documentation/driver-api/pin-control.rst
@@ -1447,6 +1447,9 @@ controller device containing these files:
- ``pins``: prints a line for each pin registered on the pin controller. The
pinctrl driver may add additional information such as register contents.
+ Optionally writes the mux register for the selected pin.
+ e.g. to write the value 0x73 in the mux register of pin 19:
+ echo 19 0x73 >/sys/kernel/debug/pinctrl/pins
- ``gpio-ranges``: print ranges that map gpio lines to pins on the controller
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3 0/3] am335x: set pinmux registers from pins debug file
2021-05-20 20:27 [PATCH v3 0/3] am335x: set pinmux registers from pins debug file Dario Binacchi
2021-05-20 20:27 ` [PATCH v3 1/3] docs/pinctrl: update `pins' description under debugfs Dario Binacchi
@ 2021-05-25 0:18 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2021-05-25 0:18 UTC (permalink / raw)
To: Dario Binacchi
Cc: linux-kernel, Tony Lindgren, Drew Fustini, Andy Shevchenko,
Haojian Zhuang, Jonathan Corbet, Linux ARM,
Linux Doc Mailing List, open list:GPIO SUBSYSTEM, Linux-OMAP
On Thu, May 20, 2021 at 10:27 PM Dario Binacchi <dariobin@libero.it> wrote:
> The patch was born from the need to change the slew rate of the LCD pins
> of a custom AM335x board during EMC tests. The AM335x, as described in a
> note in section 9.1 of its reference manual [1], is unable to write
> pinmux registers from user space. The series now makes it possible to
> write these registers from the pins debug file.
I am going to hold this series back pending more discussion on the ABI
and whether it is useful.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-25 0:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 20:27 [PATCH v3 0/3] am335x: set pinmux registers from pins debug file Dario Binacchi
2021-05-20 20:27 ` [PATCH v3 1/3] docs/pinctrl: update `pins' description under debugfs Dario Binacchi
2021-05-25 0:18 ` [PATCH v3 0/3] am335x: set pinmux registers from pins debug file Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).