acerhdf.c (5d7bd8aa7c35873f448d60ffbd996cfa151d2a11) acerhdf.c (f5e50bf4d3ef0aba4d5414c9ed51fa4a02e2ed12)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * acerhdf - A driver which monitors the temperature
4 * of the aspire one netbook, turns on/off the fan
5 * as soon as the upper/lower threshold is reached.
6 *
7 * (C) 2009 - Peter Kaestle peter (a) piie.net
8 * http://piie.net

--- 399 unchanged lines hidden (view full) ---

408}
409
410/*
411 * set operation mode;
412 * enabled: the thermal layer of the kernel takes care about
413 * the temperature and the fan.
414 * disabled: the BIOS takes control of the fan.
415 */
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * acerhdf - A driver which monitors the temperature
4 * of the aspire one netbook, turns on/off the fan
5 * as soon as the upper/lower threshold is reached.
6 *
7 * (C) 2009 - Peter Kaestle peter (a) piie.net
8 * http://piie.net

--- 399 unchanged lines hidden (view full) ---

408}
409
410/*
411 * set operation mode;
412 * enabled: the thermal layer of the kernel takes care about
413 * the temperature and the fan.
414 * disabled: the BIOS takes control of the fan.
415 */
416static int acerhdf_set_mode(struct thermal_zone_device *thermal,
417 enum thermal_device_mode mode)
416static int acerhdf_change_mode(struct thermal_zone_device *thermal,
417 enum thermal_device_mode mode)
418{
419 if (mode == THERMAL_DEVICE_DISABLED && kernelmode)
420 acerhdf_revert_to_bios_mode();
421 else if (mode == THERMAL_DEVICE_ENABLED && !kernelmode)
422 acerhdf_enable_kernelmode();
423
424 return 0;
425}

--- 42 unchanged lines hidden (view full) ---

468 return 0;
469}
470
471/* bind callback functions to thermalzone */
472static struct thermal_zone_device_ops acerhdf_dev_ops = {
473 .bind = acerhdf_bind,
474 .unbind = acerhdf_unbind,
475 .get_temp = acerhdf_get_ec_temp,
418{
419 if (mode == THERMAL_DEVICE_DISABLED && kernelmode)
420 acerhdf_revert_to_bios_mode();
421 else if (mode == THERMAL_DEVICE_ENABLED && !kernelmode)
422 acerhdf_enable_kernelmode();
423
424 return 0;
425}

--- 42 unchanged lines hidden (view full) ---

468 return 0;
469}
470
471/* bind callback functions to thermalzone */
472static struct thermal_zone_device_ops acerhdf_dev_ops = {
473 .bind = acerhdf_bind,
474 .unbind = acerhdf_unbind,
475 .get_temp = acerhdf_get_ec_temp,
476 .set_mode = acerhdf_set_mode,
476 .change_mode = acerhdf_change_mode,
477 .get_trip_type = acerhdf_get_trip_type,
478 .get_trip_hyst = acerhdf_get_trip_hyst,
479 .get_trip_temp = acerhdf_get_trip_temp,
480 .get_crit_temp = acerhdf_get_crit_temp,
481};
482
483
484/*

--- 342 unchanged lines hidden ---
477 .get_trip_type = acerhdf_get_trip_type,
478 .get_trip_hyst = acerhdf_get_trip_hyst,
479 .get_trip_temp = acerhdf_get_trip_temp,
480 .get_crit_temp = acerhdf_get_crit_temp,
481};
482
483
484/*

--- 342 unchanged lines hidden ---