1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2016 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
11 int pwm_set_invert(struct udevice *dev, uint channel, bool polarity)
13 struct pwm_ops *ops = pwm_get_ops(dev);
18 return ops->set_invert(dev, channel, polarity);
21 int pwm_set_config(struct udevice *dev, uint channel, uint period_ns,
24 struct pwm_ops *ops = pwm_get_ops(dev);
29 return ops->set_config(dev, channel, period_ns, duty_ns);
32 int pwm_set_enable(struct udevice *dev, uint channel, bool enable)
34 struct pwm_ops *ops = pwm_get_ops(dev);
39 return ops->set_enable(dev, channel, enable);
42 UCLASS_DRIVER(pwm) = {