Lines Matching +full:software +full:- +full:locked

11  * This program is free software; you can redistribute it and/or modify
13 * published by the Free Software Foundation.
40 * from this software without specific prior written permission.
42 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
52 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
100 bool locked; member
129 if (!aux_entry->locked) { in soc_dts_enable()
136 pr_info("DTS is locked. Cannot enable DTS\n"); in soc_dts_enable()
137 ret = -EPERM; in soc_dts_enable()
157 if (!aux_entry->locked) { in soc_dts_disable()
165 pr_info("DTS is locked. Cannot disable DTS\n"); in soc_dts_disable()
166 ret = -EPERM; in soc_dts_disable()
186 * Thermal Sensor Programmable Trip Point Register has 8-bit in get_trip_temp()
192 temp -= QRK_DTS_TEMP_BASE; in get_trip_temp()
206 if (aux_entry->locked) { in update_trip_temp()
207 ret = -EPERM; in update_trip_temp()
218 * As Quark X1000 data-sheet does not provide any recommendation in update_trip_temp()
226 * Thermal Sensor Programmable Trip Point Register has 8-bit in update_trip_temp()
251 switch (trip->type) { in sys_set_trip_temp()
261 return -EINVAL; in sys_set_trip_temp()
282 * Thermal Sensor Temperature Register has 8-bit field in sys_get_curr_temp()
287 *temp = out - QRK_DTS_TEMP_BASE; in sys_get_curr_temp()
316 if (!aux_entry->locked) { in free_soc_dts()
320 aux_entry->store_dts_enable); in free_soc_dts()
324 aux_entry->store_ptps); in free_soc_dts()
327 thermal_zone_device_unregister(aux_entry->tzone); in free_soc_dts()
341 err = -ENOMEM; in alloc_soc_dts()
342 return ERR_PTR(-ENOMEM); in alloc_soc_dts()
345 /* Check if DTS register is locked */ in alloc_soc_dts()
351 aux_entry->locked = !!(out & QRK_DTS_LOCK_BIT); in alloc_soc_dts()
353 /* Store DTS default state if DTS registers are not locked */ in alloc_soc_dts()
354 if (!aux_entry->locked) { in alloc_soc_dts()
358 &aux_entry->store_dts_enable); in alloc_soc_dts()
365 &aux_entry->store_ptps); in alloc_soc_dts()
379 aux_entry->tzone = thermal_zone_device_register_with_trips("quark_dts", in alloc_soc_dts()
385 if (IS_ERR(aux_entry->tzone)) { in alloc_soc_dts()
386 err = PTR_ERR(aux_entry->tzone); in alloc_soc_dts()
390 err = thermal_zone_device_enable(aux_entry->tzone); in alloc_soc_dts()
397 thermal_zone_device_unregister(aux_entry->tzone); in alloc_soc_dts()
412 return -ENODEV; in intel_quark_thermal_init()