Lines Matching +full:chan +full:- +full:name
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
50 pwmbus_add_child(device_t dev, u_int order, const char *name, int unit) in pwmbus_add_child() argument
55 child = device_add_child_ordered(dev, order, name, unit); in pwmbus_add_child()
76 device_get_nameunit(device_get_parent(dev)), ivars->pi_channel); in pwmbus_child_location()
94 resource_int_value(dname, dunit, "channel", &ivars->pi_channel); in pwmbus_hinted_child()
106 rv += printf(" channel %u", ivars->pi_channel); in pwmbus_print_child()
120 ivars->pi_channel); in pwmbus_probe_nomatch()
134 *(u_int *)result = ivars->pi_channel; in pwmbus_read_ivar()
160 u_int chan; in pwmbus_attach() local
163 sc->dev = dev; in pwmbus_attach()
166 if (PWMBUS_CHANNEL_COUNT(parent, &sc->nchannels) != 0 || in pwmbus_attach()
167 sc->nchannels == 0) { in pwmbus_attach()
168 device_printf(sc->dev, "No channels on parent %s\n", in pwmbus_attach()
174 for (chan = 0; chan < sc->nchannels; ++chan) { in pwmbus_attach()
175 if ((child = pwmbus_add_child(sc->dev, 0, "pwmc", -1)) == NULL) { in pwmbus_attach()
177 "for channel %u\n", chan); in pwmbus_attach()
181 ivars->pi_channel = chan; in pwmbus_attach()
207 pwmbus_channel_config(device_t dev, u_int chan, u_int period, u_int duty) in pwmbus_channel_config() argument
209 return (PWMBUS_CHANNEL_CONFIG(device_get_parent(dev), chan, period, duty)); in pwmbus_channel_config()
213 pwmbus_channel_get_config(device_t dev, u_int chan, u_int *period, u_int *duty) in pwmbus_channel_get_config() argument
215 return (PWMBUS_CHANNEL_GET_CONFIG(device_get_parent(dev), chan, period, duty)); in pwmbus_channel_get_config()
219 pwmbus_channel_get_flags(device_t dev, u_int chan, uint32_t *flags) in pwmbus_channel_get_flags() argument
221 return (PWMBUS_CHANNEL_GET_FLAGS(device_get_parent(dev), chan, flags)); in pwmbus_channel_get_flags()
225 pwmbus_channel_enable(device_t dev, u_int chan, bool enable) in pwmbus_channel_enable() argument
227 return (PWMBUS_CHANNEL_ENABLE(device_get_parent(dev), chan, enable)); in pwmbus_channel_enable()
231 pwmbus_channel_set_flags(device_t dev, u_int chan, uint32_t flags) in pwmbus_channel_set_flags() argument
233 return (PWMBUS_CHANNEL_SET_FLAGS(device_get_parent(dev), chan, flags)); in pwmbus_channel_set_flags()
237 pwmbus_channel_is_enabled(device_t dev, u_int chan, bool *enable) in pwmbus_channel_is_enabled() argument
239 return (PWMBUS_CHANNEL_IS_ENABLED(device_get_parent(dev), chan, enable)); in pwmbus_channel_is_enabled()