All of lore.kernel.org
 help / color / mirror / Atom feed
From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Angelo Compagnucci <angelo@amarulasolutions.com>,
	linux-pwm@vger.kernel.org (open list:GENERIC PWM SERVO DRIVER),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v3 2/3] misc: servo-pwm: Add sysfs entries to control motor angle
Date: Fri, 17 Feb 2023 17:10:36 +0100	[thread overview]
Message-ID: <20230217161038.3130053-2-angelo@amarulasolutions.com> (raw)
In-Reply-To: <20230217161038.3130053-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>
---
v2:
* Added ABI in testing
v3:
* No changes

 .../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


  reply	other threads:[~2023-02-17 16:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 16:10 [PATCH v3 1/3] misc: servo-pwm: driver for controlling servo motors via PWM Angelo Compagnucci
2023-02-17 16:10 ` Angelo Compagnucci [this message]
2023-02-17 16:10 ` [PATCH v3 3/3] dt-bindings: misc: servo-pwm: Add new bindings for servo-pwm Angelo Compagnucci
2023-02-17 17:29   ` Rob Herring
2023-02-18 10:16   ` Krzysztof Kozlowski
2023-02-17 21:12 ` [PATCH v3 1/3] misc: servo-pwm: driver for controlling servo motors via PWM kernel test robot
2023-02-17 21:22 ` kernel test robot
2023-02-20 11:40 ` Thierry Reding
2023-02-20 11:46   ` Angelo Compagnucci
2023-07-15 19:17 ` Uwe Kleine-König

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=20230217161038.3130053-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.