]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Restructure the pwm device hirearchy and interfaces.
authorian <ian@FreeBSD.org>
Sat, 15 Jun 2019 22:25:39 +0000 (22:25 +0000)
committerian <ian@FreeBSD.org>
Sat, 15 Jun 2019 22:25:39 +0000 (22:25 +0000)
commit1be17a16532e46997665083897fc226ff99eed08
tree9f4d7ea58dc840503890c007ab7307ca9d7c034b
parenta85aaf0d112d25ac6efe6c7e60f2872ebba18024
Restructure the pwm device hirearchy and interfaces.

The pwm and pwmbus interfaces were nearly identical, this merges them into a
single pwmbus interface.  The pwmbus driver now implements the pwmbus
interface by simply passing all calls through to its parent (the hardware
driver).  The channel_count method moves from pwm to pwmbus, and the
get_bus method is deleted (just no longer needed).

The net effect is that the interface for doing pwm stuff is now the same
regardless of whether you're a child of pwmbus, or some random driver
elsewhere in the hierarchy that is bypassing the pwmbus layer and is talking
directly to the hardware driver via cross-hierarchy connections established
using fdt data.

The pwmc driver is now a child of pwmbus, instead of being its sibling
(that's why the get_bus method is no longer needed; pwmc now gets the
device_t of the bus using device_get_parent()).
sys/arm/allwinner/aw_pwm.c
sys/conf/files
sys/dev/pwm/ofw_pwm.c
sys/dev/pwm/pwm_if.m [deleted file]
sys/dev/pwm/pwmbus.c
sys/dev/pwm/pwmbus.h
sys/dev/pwm/pwmbus_if.m
sys/dev/pwm/pwmc.c