Lines Matching +full:ec +full:- +full:pwm
1 // SPDX-License-Identifier: GPL-2.0+
10 * Fan control is provided via pwm interface in the range [0-255].
11 * Old AMD boards use [0-100] as range in the EC, the written value is
13 * AOK ZOE are not scaled but have the same EC layout.
55 /* Fan reading and PWM */
57 #define OXP_SENSOR_PWM_ENABLE_REG 0x4A /* PWM enable is 1 register long */
58 #define OXP_SENSOR_PWM_REG 0x4B /* PWM reading is 1 register long */
61 * Older boards have different values and EC registers
117 DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
124 DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
131 DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
139 /* Helper functions to handle EC read/write */
147 return -EBUSY; in read_from_ec()
159 return -EBUSY; in read_from_ec()
169 return -EBUSY; in write_to_ec()
174 return -EBUSY; in write_to_ec()
196 return -EINVAL; in tt_toggle_enable()
217 return -EINVAL; in tt_toggle_disable()
230 return attr->mode; in tt_toggle_is_visible()
275 return -EINVAL; in tt_toggle_show()
287 /* PWM enable/disable functions */
356 return -EOPNOTSUPP; in oxp_platform_read()
370 return -EINVAL; in oxp_platform_write()
373 return -EINVAL; in oxp_platform_write()
396 return -EOPNOTSUPP; in oxp_platform_write()
399 /* Known sensors in the OXP EC controllers */
403 HWMON_CHANNEL_INFO(pwm,
437 struct device *dev = &pdev->dev; in oxp_platform_probe()
448 .name = "oxp-platform",
464 * Intel boards seem to have different EC registers and values to in oxp_platform_init()
469 return -ENODEV; in oxp_platform_init()
471 board = (enum oxp_board)(unsigned long)dmi_entry->driver_data; in oxp_platform_init()
492 MODULE_DESCRIPTION("Platform driver that handles EC sensors of OneXPlayer devices");