Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102551181
D29139.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D29139.diff
View Options
diff --git a/share/man/man9/pwmbus.9 b/share/man/man9/pwmbus.9
--- a/share/man/man9/pwmbus.9
+++ b/share/man/man9/pwmbus.9
@@ -22,7 +22,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 21, 2019
+.Dd March 9, 2021
.Dt PWMBUS 9
.Os
.Sh NAME
@@ -40,19 +40,19 @@
.Cd "device pwm"
.In "pwmbus_if.h"
.Ft int
-.Fn PWMBUS_CHANNEL_CONFIG "device_t bus" "int channel" "uint64_t period" "uint64_t duty"
+.Fn PWMBUS_CHANNEL_CONFIG "device_t bus" "u_int channel" "u_int period" "u_int duty"
.Ft int
-.Fn PWMBUS_CHANNEL_COUNT "device_t bus" "int channel" "int *nchannel"
+.Fn PWMBUS_CHANNEL_COUNT "device_t bus" "u_int *nchannel"
.Ft int
-.Fn PWMBUS_CHANNEL_ENABLE "device_t bus" "int channel" "bool enable"
+.Fn PWMBUS_CHANNEL_ENABLE "device_t bus" "u_int channel" "bool enable"
.Ft int
-.Fn PWMBUS_CHANNEL_GET_CONFIG "device_t bus" "int channel" "uint64_t *period" "uint64_t *duty"
+.Fn PWMBUS_CHANNEL_GET_CONFIG "device_t bus" "u_int channel" "u_int *period" "u_int *duty"
.Ft int
-.Fn PWMBUS_CHANNEL_GET_FLAGS "device_t bus" "int channel" "uint32_t *flags"
+.Fn PWMBUS_CHANNEL_GET_FLAGS "device_t bus" "u_int channel" "uint32_t *flags"
.Ft int
-.Fn PWMBUS_CHANNEL_IS_ENABLED "device_t bus" "int channel" "bool *enabled"
+.Fn PWMBUS_CHANNEL_IS_ENABLED "device_t bus" "u_int channel" "bool *enabled"
.Ft int
-.Fn PWMBUS_CHANNEL_SET_FLAGS "device_t bus" "int channel" "uint32_t flags"
+.Fn PWMBUS_CHANNEL_SET_FLAGS "device_t bus" "u_int channel" "uint32_t flags"
.Sh DESCRIPTION
The PWMBUS (Pulse-Width Modulation) interface allows a device driver to
register to a global bus so other devices in the kernel can use them in a
@@ -76,7 +76,7 @@
details on channels that share resources.
.Sh INTERFACE
.Bl -tag -width indent
-.It Fn PWMBUS_CHANNEL_CONFIG "device_t bus" "int channel" "uint64_t period" "uint64_t duty"
+.It Fn PWMBUS_CHANNEL_CONFIG "device_t bus" "u_int channel" "u_int period" "u_int duty"
Configure the period and duty (in nanoseconds) in the PWM controller on the bus
for the specified channel.
Returns 0 on success or
@@ -85,19 +85,19 @@
.Er EBUSY
if the PWMBUS controller is in use and does not support changing the value on
the fly.
-.It Fn PWMBUS_CHANNEL_COUNT "device_t bus" "int *nchannel"
+.It Fn PWMBUS_CHANNEL_COUNT "device_t bus" "u_int *nchannel"
Get the number of channels supported by the controller.
-.It Fn PWMBUS_CHANNEL_ENABLE "device_t bus" "int channel" "bool enable"
+.It Fn PWMBUS_CHANNEL_ENABLE "device_t bus" "u_int channel" "bool enable"
Enable the PWM channel.
-.It Fn PWMBUS_CHANNEL_GET_CONFIG "device_t bus" "int channel" "uint64_t *period" "uint64_t *duty"
+.It Fn PWMBUS_CHANNEL_GET_CONFIG "device_t bus" "u_int channel" "u_int *period" "u_int *duty"
Get the current configuration of the period and duty for the specified channel.
-.It Fn PWMBUS_CHANNEL_GET_FLAGS "device_t bus" "int channel" "uint32_t *flags"
+.It Fn PWMBUS_CHANNEL_GET_FLAGS "device_t bus" "u_int channel" "uint32_t *flags"
Get the current flags for the channel.
If the driver or controller
does not support this, a default method returns a flags value of zero.
-.It Fn PWMBUS_CHANNEL_IS_ENABLED "device_t bus" "int channel" "bool *enable"
+.It Fn PWMBUS_CHANNEL_IS_ENABLED "device_t bus" "u_int channel" "bool *enable"
Test whether the PWM channel is enabled.
-.It Fn PWMBUS_CHANNEL_SET_FLAGS "device_t bus" "int channel" "uint32_t flags"
+.It Fn PWMBUS_CHANNEL_SET_FLAGS "device_t bus" "u_int channel" "uint32_t flags"
Set the flags of the channel (such as inverted polarity).
If the driver or controller does not support this a do-nothing default method
is used.
diff --git a/sys/dev/pwm/pwmbus_if.m b/sys/dev/pwm/pwmbus_if.m
--- a/sys/dev/pwm/pwmbus_if.m
+++ b/sys/dev/pwm/pwmbus_if.m
@@ -33,14 +33,14 @@
CODE {
static int
- pwm_default_set_flags(device_t dev, u_int channel, uint32_t flags)
+ pwm_default_set_flags(device_t bus, u_int channel, uint32_t flags)
{
return (EOPNOTSUPP);
}
static int
- pwm_default_get_flags(device_t dev, u_int channel, uint32_t *flags)
+ pwm_default_get_flags(device_t bus, u_int channel, uint32_t *flags)
{
*flags = 0;
@@ -55,8 +55,8 @@
METHOD int channel_config {
device_t bus;
u_int channel;
- unsigned int period;
- unsigned int duty;
+ u_int period;
+ u_int duty;
};
#
@@ -66,8 +66,8 @@
METHOD int channel_get_config {
device_t bus;
u_int channel;
- unsigned int *period;
- unsigned int *duty;
+ u_int *period;
+ u_int *duty;
};
#
@@ -83,7 +83,7 @@
# Get the flags
#
METHOD int channel_get_flags {
- device_t dev;
+ device_t bus;
u_int channel;
uint32_t *flags;
} DEFAULT pwm_default_get_flags;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 14, 10:57 PM (8 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14634847
Default Alt Text
D29139.diff (4 KB)
Attached To
Mode
D29139: share/man/man9/pwmbus.9 fix types in arguments
Attached
Detach File
Event Timeline
Log In to Comment