mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: devel@driverdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ian Abbott <abbotti@mev.co.uk>,
	H Hartley Sweeten <hsweeten@visionengravers.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] staging: comedi: comedi.h: remove SDF_MODE0 etc.
Date: Tue,  9 Feb 2016 15:17:24 +0000	[thread overview]
Message-ID: <1455031044-20653-6-git-send-email-abbotti@mev.co.uk> (raw)
In-Reply-To: <1455031044-20653-1-git-send-email-abbotti@mev.co.uk>

The macros `SDF_MODE0`, `SDF_MODE1`, `SDF_MODE2`, `SDF_MODE3`, and
`SDF_MODE4` are COMEDI subdevice flags originally associated with the
obsolete (and no longer present) COMEDI "trigger" functionality.  They
have been of no use since COMEDI release 0.7.61 back in November 2001.
Since they were going spare, a couple of them have been aliased as
`SDF_PWM_COUNTER` and `SDF_PWM_HBRIDGE` to mean other things.  Remove
the obsolete macros and redefine `SDF_PWM_COUNTER` and `SDF_PWM_HBRIDGE`
as equivalent numeric values.

Some code distributed with the userspace COMEDILIB library uses the
`SDF_MODE0` etc. flags to display the fact that they are set, but
COMEDILIB uses and installs its own, compatible version of "comedi.h"
anyway so isn't affected by their removal from the kernel copy.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/comedi.h | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h
index c562be8..aa7263c 100644
--- a/drivers/staging/comedi/comedi.h
+++ b/drivers/staging/comedi/comedi.h
@@ -183,11 +183,8 @@
 #define SDF_MAXDATA	0x0010	/* maxdata depends on channel */
 #define SDF_FLAGS	0x0020	/* flags depend on channel */
 #define SDF_RANGETYPE	0x0040	/* range type depends on channel */
-#define SDF_MODE0	0x0080	/* can do mode 0 */
-#define SDF_MODE1	0x0100	/* can do mode 1 */
-#define SDF_MODE2	0x0200	/* can do mode 2 */
-#define SDF_MODE3	0x0400	/* can do mode 3 */
-#define SDF_MODE4	0x0800	/* can do mode 4 */
+#define SDF_PWM_COUNTER 0x0080	/* PWM can automatically switch off */
+#define SDF_PWM_HBRIDGE 0x0100	/* PWM is signed (H-bridge) */
 #define SDF_CMD		0x1000	/* can do commands (deprecated) */
 #define SDF_SOFT_CALIBRATED	0x2000 /* subdevice uses software calibration */
 #define SDF_CMD_WRITE		0x4000 /* can do output commands */
@@ -210,9 +207,6 @@
 #define SDF_RUNNING	0x08000000	/* subdevice is acquiring data */
 #define SDF_LSAMPL	0x10000000	/* subdevice uses 32-bit samples */
 #define SDF_PACKED	0x20000000	/* subdevice can do packed DIO */
-/* re recycle these flags for PWM */
-#define SDF_PWM_COUNTER SDF_MODE0	/* PWM can automatically switch off */
-#define SDF_PWM_HBRIDGE SDF_MODE1	/* PWM is signed (H-bridge) */
 
 /* subdevice types */
 
@@ -730,17 +724,9 @@ struct comedi_krange {
  *
  * %SDF_RANGETYPE - range types are channel-specific.
  *
- * %SDF_MODE0 (aliased as %SDF_PWM_COUNTER) - the subdevice can do mode 0 (?)
- * or PWM can switch off automatically.
+ * %SDF_PWM_COUNTER - PWM can switch off automatically.
  *
- * %SDF_MODE1 (aliased as %SDF_PWM_HBRIDGE) - the subdevice can do mode 1 (?)
- * or PWM is signed (H-bridge).
- *
- * %SDF_MODE2 - the subdevice can do mode 2 (?).
- *
- * %SDF_MODE3 - the subdevice can do mode 3 (?).
- *
- * %SDF_MODE4 - the subdevice can do mode 4 (?).
+ * %SDF_PWM_HBRIDGE - or PWM is signed (H-bridge).
  *
  * %SDF_CMD - the subdevice supports asynchronous commands.
  *
-- 
2.7.0

      parent reply	other threads:[~2016-02-09 15:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 15:17 [PATCH 0/5] staging: comedi: comedi.h: kernel-doc and remove cruft Ian Abbott
2016-02-09 15:17 ` [PATCH 1/5] staging: comedi: comedi.h: tweak start of header comment Ian Abbott
2016-02-09 15:17 ` [PATCH 2/5] staging: comedi: comedi.h: add kernel-doc to common enums Ian Abbott
2016-02-09 15:17 ` [PATCH 3/5] staging: comedi: comedi.h: add kernel-doc comments to struct types Ian Abbott
2016-02-09 15:17 ` [PATCH 4/5] staging: comedi: comedi.h: remove struct comedi_trig Ian Abbott
2016-02-09 15:17 ` Ian Abbott [this message]

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=1455031044-20653-6-git-send-email-abbotti@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®