1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2016 Google, Inc
7 #define LOG_CATEGORY UCLASS_PWM
13 int pwm_set_invert(struct udevice *dev, uint channel, bool polarity)
15 struct pwm_ops *ops = pwm_get_ops(dev);
20 return ops->set_invert(dev, channel, polarity);
23 int pwm_set_config(struct udevice *dev, uint channel, uint period_ns,
26 struct pwm_ops *ops = pwm_get_ops(dev);
31 return ops->set_config(dev, channel, period_ns, duty_ns);
34 int pwm_set_enable(struct udevice *dev, uint channel, bool enable)
36 struct pwm_ops *ops = pwm_get_ops(dev);
41 return ops->set_enable(dev, channel, enable);
44 UCLASS_DRIVER(pwm) = {