mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-02 06:35:36 +00:00
Implement the ofw_bus_get_node method in aw_pwm(4) so that ofw_pwmbus can
find its metadata for instantiating children.
This commit is contained in:
parent
b43e2c8b56
commit
0a06f11da3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349131
|
@ -223,6 +223,17 @@ aw_pwm_detach(device_t dev)
|
|||
return (0);
|
||||
}
|
||||
|
||||
static phandle_t
|
||||
aw_pwm_get_node(device_t bus, device_t dev)
|
||||
{
|
||||
|
||||
/*
|
||||
* Share our controller node with our pwmbus child; it instantiates
|
||||
* devices by walking the children contained within our node.
|
||||
*/
|
||||
return ofw_bus_get_node(bus);
|
||||
}
|
||||
|
||||
static int
|
||||
aw_pwm_channel_count(device_t dev, u_int *nchannel)
|
||||
{
|
||||
|
@ -350,6 +361,9 @@ static device_method_t aw_pwm_methods[] = {
|
|||
DEVMETHOD(device_attach, aw_pwm_attach),
|
||||
DEVMETHOD(device_detach, aw_pwm_detach),
|
||||
|
||||
/* ofw_bus interface */
|
||||
DEVMETHOD(ofw_bus_get_node, aw_pwm_get_node),
|
||||
|
||||
/* pwmbus interface */
|
||||
DEVMETHOD(pwmbus_channel_count, aw_pwm_channel_count),
|
||||
DEVMETHOD(pwmbus_channel_config, aw_pwm_channel_config),
|
||||
|
|
Loading…
Reference in a new issue