diff options
author | Tom Rini <trini@konsulko.com> | 2021-04-11 14:40:25 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-11 14:40:25 +0300 |
commit | c6a4ee2aaee541c12d290dd25561e771396817cc (patch) | |
tree | dcc1c02b7c2dd1b6834c29317e16eab747558da0 /include | |
parent | 59e84da0b88e4465f15d196bba59f22c906fa50d (diff) | |
parent | 38e18d6392fca9f6809cb3079af3069efc3d181f (diff) | |
download | u-boot-c6a4ee2aaee541c12d290dd25561e771396817cc.tar.xz |
Merge tag 'video-2021-07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-video
- rk3399 eDP support
- pwm backlight without a known period_ns
- add Chrome OS EC PWM driver
- Kconfig SIMPLE_PANEL DM_GPIO dependency
- remove mb862xx driver remnants
- fix KiB format in reserve_video() debug trace
- fix tegra124 sor CSTM LVDS_EN_ENABLE/DISABLE config
- fix line padding calculation for 16 and 24 BPP bitmaps
Diffstat (limited to 'include')
-rw-r--r-- | include/cros_ec.h | 13 | ||||
-rw-r--r-- | include/pwm.h | 8 |
2 files changed, 21 insertions, 0 deletions
diff --git a/include/cros_ec.h b/include/cros_ec.h index eddc23d48f..9396b4d246 100644 --- a/include/cros_ec.h +++ b/include/cros_ec.h @@ -513,6 +513,19 @@ int cros_ec_efs_verify(struct udevice *dev, enum ec_flash_region region); int cros_ec_battery_cutoff(struct udevice *dev, uint8_t flags); /** + * cros_ec_set_pwm_duty() - Set duty cycle of a generic pwm + * + * Note that duty value needs to be passed to the EC as a 16 bit number + * for increased precision. + * + * @param dev CROS-EC device + * @param index Index of the pwm + * @param duty Desired duty cycle, in 0..EC_PWM_MAX_DUTY range. + * @return 0 if OK, -ve on error + */ +int cros_ec_set_pwm_duty(struct udevice *dev, uint8_t index, uint16_t duty); + +/** * cros_ec_read_limit_power() - Check if power is limited by batter/charger * * Sometimes the battery is low and / or the device is connected to a charger diff --git a/include/pwm.h b/include/pwm.h index f9959706ce..668551e4b8 100644 --- a/include/pwm.h +++ b/include/pwm.h @@ -17,6 +17,10 @@ struct pwm_ops { /** * set_config() - Set the PWM configuration * + * Change both the PWM device's period and it's duty period if + * possible. Otherwise, set an appropriate duty period that best + * matches the given period_ns / duty_ns ratio for the device. + * * @dev: PWM device to update * @channel: PWM channel to update * @period_ns: PWM period in nanoseconds @@ -51,6 +55,10 @@ struct pwm_ops { /** * pwm_set_config() - Set the PWM configuration * + * Change both the PWM device's period and it's duty period if + * possible. Otherwise, set an appropriate duty period that best + * matches the given period_ns / duty_ns ratio for the device. + * * @dev: PWM device to update * @channel: PWM channel to update * @period_ns: PWM period in nanoseconds |