From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: Angelo Compagnucci <angelo@amarulasolutions.com>
Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/3] misc: servo-pwm: Add sysfs entries to control motor angle
Date: Fri, 17 Feb 2023 15:57:29 +0100 [thread overview]
Message-ID: <20230217145731.3018148-2-angelo@amarulasolutions.com> (raw)
In-Reply-To: <20230217145731.3018148-1-angelo@amarulasolutions.com>
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@amarulasolutions.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@amarulasolutions.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@amarulasolutions.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@amarulasolutions.com>
L: linux-pwm@vger.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
next prev parent reply other threads:[~2023-02-17 14:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 14:57 [PATCH v2 1/3] misc: servo-pwm: driver for controlling servo motors via PWM Angelo Compagnucci
2023-02-17 14:57 ` Angelo Compagnucci [this message]
2023-02-17 14:57 ` [PATCH v2 3/3] dt-bindings: leds: servo-pwm: Add new bindings for servo-pwm Angelo Compagnucci
2023-02-17 15:22 ` Rob Herring
2023-02-17 23:23 ` Rob Herring
2023-02-17 15:36 ` [PATCH v2 1/3] misc: servo-pwm: driver for controlling servo motors via PWM Greg Kroah-Hartman
2023-02-17 15:41 ` Angelo Compagnucci
[not found] ` <CA+_SqVYMZ7MErNr-HrbHj-=Q-5u1PizHQ_6TFkTOxB5=E8+9Dg@mail.gmail.com>
2023-02-17 15:48 ` Greg Kroah-Hartman
2023-02-17 16:12 ` Angelo Compagnucci
2023-02-17 15:50 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230217145731.3018148-2-angelo@amarulasolutions.com \
--to=angelo.compagnucci@gmail.com \
--cc=angelo@amarulasolutions.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox