diff options
author | Vic (Chun-Ju) Yang <victoryang@chromium.org> | 2013-11-28 15:56:56 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-12-02 04:54:23 +0000 |
commit | d69d0166eebdcfe7cf2545765a65b7c22c7d197c (patch) | |
tree | 096e5dec4ad67e089b7c8613610fad752905959f /chip/mec1322/pwm_chip.h | |
parent | 3f02192460f5c647f6539de161e36d5b4392567b (diff) | |
download | chrome-ec-d69d0166eebdcfe7cf2545765a65b7c22c7d197c.tar.gz |
mec1322: Add PWM driver
This adds a PWM driver, which now generates 30KHz PWM output. Note that
this is different from fan control module driver.
BUG=chrome-os-partner:24107
TEST=Set GPIO136 to PWM1. Attach logic analyzer to monitor its output.
- Set to active high and 30%, see 30% duty PWM at ~29.1KHz.
- Set to active low and 20%, see 80% duty PWM at ~29.1KHz.
BRANCH=None
Change-Id: I5f1001d5a4701e19fa87c4cabfd4ae5ae7ccb30c
Signed-off-by: Vic (Chun-Ju) Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/178391
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'chip/mec1322/pwm_chip.h')
-rw-r--r-- | chip/mec1322/pwm_chip.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chip/mec1322/pwm_chip.h b/chip/mec1322/pwm_chip.h new file mode 100644 index 0000000000..7c59b1004f --- /dev/null +++ b/chip/mec1322/pwm_chip.h @@ -0,0 +1,21 @@ +/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* MEC1322-specific PWM module for Chrome EC */ +#ifndef __CROS_EC_MEC1322_PWM_H +#define __CROS_EC_MEC1322_PWM_H + +/* Data structure to define PWM channels. */ +struct pwm_t { + /* PWM Channel ID */ + int channel; + + /* PWM channel flags. See include/pwm.h */ + uint32_t flags; +}; + +extern const struct pwm_t pwm_channels[]; + +#endif /* __CROS_EC_MEC1322_PWM_H */ |