Lines Matching refs:channel

63 	pwm_channel_t	channel;  member
103 rv = pwm_get_by_ofw_propidx(dev, node, "pwms", 0, &sc->channel); in pwm_backlight_attach()
133 sc->channel->duty = sc->channel->period * sc->levels[sc->default_level] / 100; in pwm_backlight_attach()
138 device_printf(dev, "Configured period time: %ju\n", (uintmax_t)sc->channel->period); in pwm_backlight_attach()
139 device_printf(dev, "Default duty cycle: %ju\n", (uintmax_t)sc->channel->duty); in pwm_backlight_attach()
143 PWMBUS_CHANNEL_GET_CONFIG(sc->channel->dev, in pwm_backlight_attach()
144 sc->channel->channel, in pwm_backlight_attach()
145 (unsigned int *)&sc->channel->period, in pwm_backlight_attach()
146 (unsigned int *)&sc->channel->duty); in pwm_backlight_attach()
147 if (sc->channel->duty > sc->channel->period) in pwm_backlight_attach()
148 sc->channel->duty = sc->channel->period; in pwm_backlight_attach()
150 device_printf(dev, "Configured period time: %ju\n", (uintmax_t)sc->channel->period); in pwm_backlight_attach()
151 device_printf(dev, "Default duty cycle: %ju\n", (uintmax_t)sc->channel->duty); in pwm_backlight_attach()
156 sc->channel->enabled = true; in pwm_backlight_attach()
157 PWMBUS_CHANNEL_CONFIG(sc->channel->dev, sc->channel->channel, in pwm_backlight_attach()
158 sc->channel->period, sc->channel->duty); in pwm_backlight_attach()
159 PWMBUS_CHANNEL_ENABLE(sc->channel->dev, sc->channel->channel, in pwm_backlight_attach()
160 sc->channel->enabled); in pwm_backlight_attach()
163 sc->channel->period / sc->channel->duty); in pwm_backlight_attach()
224 sc->channel->duty = sc->channel->period * in pwm_backlight_update_status()
229 sc->channel->duty = sc->channel->period * in pwm_backlight_update_status()
232 sc->channel->enabled = true; in pwm_backlight_update_status()
233 PWMBUS_CHANNEL_CONFIG(sc->channel->dev, sc->channel->channel, in pwm_backlight_update_status()
234 sc->channel->period, sc->channel->duty); in pwm_backlight_update_status()
235 PWMBUS_CHANNEL_ENABLE(sc->channel->dev, sc->channel->channel, in pwm_backlight_update_status()
236 sc->channel->enabled); in pwm_backlight_update_status()
268 props->brightness = sc->channel->duty * 100 / sc->channel->period; in pwm_backlight_get_status()