[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230217145731.3018148-2-angelo@amarulasolutions.com>
Date: Fri, 17 Feb 2023 15:57:29 +0100
From: Angelo Compagnucci <angelo.compagnucci@...il.com>
To: Angelo Compagnucci <angelo@...rulasolutions.com>
Cc: linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 2/3] misc: servo-pwm: Add sysfs entries to control motor angle
Servo motor can be moved between 0 and degrees angle.
Add 'angle' sysfs attribute:
*read*: Current motor position.
*write*: Moves the motor to the position.
Add 'degrees' sysfs attribute:
*read*: how many degrees the motor can move
Signed-off-by: Angelo Compagnucci <angelo@...rulasolutions.com>
---
.../ABI/testing/sysfs-driver-servo-pwm | 20 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 21 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-driver-servo-pwm
diff --git a/Documentation/ABI/testing/sysfs-driver-servo-pwm b/Documentation/ABI/testing/sysfs-driver-servo-pwm
new file mode 100644
index 000000000000..9c4d897073fa
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-servo-pwm
@@ -0,0 +1,20 @@
+What: /sys/devices/platform/servo*/angle
+Date: Feb 2023
+Contact: Angelo Compagnucci <angelo@...rulasolutions.com>
+Description:
+ (RW) read or write servo motor position angle.
+ Servo motor can move between 0 and max degrees angle.
+ As soon the vale is written, the motor will move to the selected
+ angle. Reading the value gives the motor position.
+Users: any user space application which wants to move the servo
+ motor position.
+
+What: /sys/devices/platform/servo*/degrees
+Date: Feb 2023
+Contact: Angelo Compagnucci <angelo@...rulasolutions.com>
+Description:
+ (RO) read the servo motor movement degrees.
+ Servo motor can move between 0 and max degrees angle.
+ Reading the value gives the motor max degrees angle supported.
+Users: any user space application which wants to know the max degrees
+ angle motor supports.
diff --git a/MAINTAINERS b/MAINTAINERS
index 8f4af64deb1b..356daea0861d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8741,6 +8741,7 @@ GENERIC PWM SERVO DRIVER
M: "Angelo Compagnucci" <angelo@...rulasolutions.com>
L: linux-pwm@...r.kernel.org
S: Maintained
+F: Documentation/ABI/testing/sysfs-driver-servo-pwm
F: drivers/misc/servo-pwm.c
GENERIC RESISTIVE TOUCHSCREEN ADC DRIVER
--
2.34.1
Powered by blists - more mailing lists