19d60b9c9SKarol Herbst /* 29d60b9c9SKarol Herbst * Copyright 2017 Karol Herbst 39d60b9c9SKarol Herbst * 49d60b9c9SKarol Herbst * Permission is hereby granted, free of charge, to any person obtaining a 59d60b9c9SKarol Herbst * copy of this software and associated documentation files (the "Software"), 69d60b9c9SKarol Herbst * to deal in the Software without restriction, including without limitation 79d60b9c9SKarol Herbst * the rights to use, copy, modify, merge, publish, distribute, sublicense, 89d60b9c9SKarol Herbst * and/or sell copies of the Software, and to permit persons to whom the 99d60b9c9SKarol Herbst * Software is furnished to do so, subject to the following conditions: 109d60b9c9SKarol Herbst * 119d60b9c9SKarol Herbst * The above copyright notice and this permission notice shall be included in 129d60b9c9SKarol Herbst * all copies or substantial portions of the Software. 139d60b9c9SKarol Herbst * 149d60b9c9SKarol Herbst * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 159d60b9c9SKarol Herbst * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 169d60b9c9SKarol Herbst * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 179d60b9c9SKarol Herbst * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 189d60b9c9SKarol Herbst * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 199d60b9c9SKarol Herbst * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 209d60b9c9SKarol Herbst * OTHER DEALINGS IN THE SOFTWARE. 219d60b9c9SKarol Herbst * 229d60b9c9SKarol Herbst * Authors: Karol Herbst 239d60b9c9SKarol Herbst */ 249d60b9c9SKarol Herbst #include "priv.h" 259d60b9c9SKarol Herbst 269d60b9c9SKarol Herbst static const struct nvkm_therm_func 279d60b9c9SKarol Herbst gm200_therm = { 289d60b9c9SKarol Herbst .init = g84_therm_init, 299d60b9c9SKarol Herbst .fini = g84_therm_fini, 309d60b9c9SKarol Herbst .temp_get = g84_temp_get, 319d60b9c9SKarol Herbst .program_alarms = nvkm_therm_program_alarms_polling, 329d60b9c9SKarol Herbst }; 339d60b9c9SKarol Herbst 349d60b9c9SKarol Herbst int 359d60b9c9SKarol Herbst gm200_therm_new(struct nvkm_device *device, int index, 369d60b9c9SKarol Herbst struct nvkm_therm **ptherm) 379d60b9c9SKarol Herbst { 389d60b9c9SKarol Herbst return nvkm_therm_new_(&gm200_therm, device, index, ptherm); 399d60b9c9SKarol Herbst } 40