mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ANDROID: fix bad revert of "FROMLIST: pwm: Convert period and duty cycle to u64"
This fixes a bad revert of a FROMLIST patch which got upstreamed in a
slightly different form.
This makes the code match upstream.
Fixes: fd0cd97281 ("Revert "FROMLIST: pwm: Convert period and duty cycle to u64"")
Change-Id: Ic5e7289d9cbf2c93e0982d02c7d3a79ebffa06b8
Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
@@ -1929,11 +1929,10 @@ static int pwm_setup_backlight(struct intel_connector *connector,
|
||||
return retval;
|
||||
}
|
||||
|
||||
panel->backlight.min = 0; /* 0% */
|
||||
panel->backlight.max = 100; /* 100% */
|
||||
panel->backlight.level = DIV_ROUND_UP(
|
||||
pwm_get_duty_cycle(panel->backlight.pwm) * 100,
|
||||
CRC_PMIC_PWM_PERIOD_NS);
|
||||
level = DIV_ROUND_UP(pwm_get_duty_cycle(panel->backlight.pwm) * 100,
|
||||
CRC_PMIC_PWM_PERIOD_NS);
|
||||
panel->backlight.level =
|
||||
intel_panel_compute_brightness(connector, level);
|
||||
panel->backlight.enabled = panel->backlight.level != 0;
|
||||
|
||||
drm_info(&dev_priv->drm, "Using %s PWM for LCD backlight control\n",
|
||||
|
||||
@@ -241,7 +241,7 @@ static int ir_rx51_probe(struct platform_device *dev)
|
||||
}
|
||||
|
||||
/* Use default, in case userspace does not set the carrier */
|
||||
ir_rx51.freq = DIV_ROUND_CLOSEST(pwm_get_period(pwm), NSEC_PER_SEC);
|
||||
ir_rx51.freq = DIV_ROUND_CLOSEST_ULL(pwm_get_period(pwm), NSEC_PER_SEC);
|
||||
pwm_put(pwm);
|
||||
|
||||
hrtimer_init(&ir_rx51.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
|
||||
Reference in New Issue
Block a user