BugLink: https://bugs.launchpad.net/bugs/1813877
Leverage the scalar status command to determinate whether the driver
should be loaded or not.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
mutex_init(&dell_pdata->brightness_mutex);
if (!dell_uart_get_scalar_status(dell_pdata)) {
- udelay(50);
- /* try another command to make sure there is no scalar IC */
- if (dell_uart_show_firmware_ver(dell_pdata) <= 0) {
- pr_debug("Scalar is not in charge of brightness adjustment.\n");
- kzfree(dell_pdata);
- return -1;
- }
+ pr_debug("Scalar is not in charge of brightness adjustment.\n");
+ kzfree(dell_pdata);
+ return -1;
}
+ dell_uart_show_firmware_ver(dell_pdata);
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_PLATFORM;