13ce53722SRobert Mustacchi /* 23ce53722SRobert Mustacchi * This file and its contents are supplied under the terms of the 33ce53722SRobert Mustacchi * Common Development and Distribution License ("CDDL"), version 1.0. 43ce53722SRobert Mustacchi * You may only use this file in accordance with the terms of version 53ce53722SRobert Mustacchi * 1.0 of the CDDL. 63ce53722SRobert Mustacchi * 73ce53722SRobert Mustacchi * A full copy of the text of the CDDL should have accompanied this 83ce53722SRobert Mustacchi * source. A copy of the CDDL is also available via the Internet at 93ce53722SRobert Mustacchi * http://www.illumos.org/license/CDDL. 103ce53722SRobert Mustacchi */ 113ce53722SRobert Mustacchi 123ce53722SRobert Mustacchi /* 133ce53722SRobert Mustacchi * Copyright 2020 Oxide Computer Company 143ce53722SRobert Mustacchi */ 153ce53722SRobert Mustacchi 163ce53722SRobert Mustacchi #ifndef _SYS_KSENSOR_IMPL_H 173ce53722SRobert Mustacchi #define _SYS_KSENSOR_IMPL_H 183ce53722SRobert Mustacchi 193ce53722SRobert Mustacchi /* 203ce53722SRobert Mustacchi * ksensor implementation glue. 213ce53722SRobert Mustacchi */ 223ce53722SRobert Mustacchi 233ce53722SRobert Mustacchi #include <sys/sensors.h> 243ce53722SRobert Mustacchi 253ce53722SRobert Mustacchi #ifdef __cplusplus 263ce53722SRobert Mustacchi extern "C" { 273ce53722SRobert Mustacchi #endif 283ce53722SRobert Mustacchi 293ce53722SRobert Mustacchi /* 303ce53722SRobert Mustacchi * Routine for the kernel to initalize the subsystem. 313ce53722SRobert Mustacchi */ 323ce53722SRobert Mustacchi extern void ksensor_init(void); 333ce53722SRobert Mustacchi 343ce53722SRobert Mustacchi /* 353ce53722SRobert Mustacchi * Operations vectors. 363ce53722SRobert Mustacchi */ 373ce53722SRobert Mustacchi extern int ksensor_op_kind(id_t, sensor_ioctl_kind_t *); 38*1045e13aSRobert Mustacchi extern int ksensor_op_scalar(id_t, sensor_ioctl_scalar_t *); 393ce53722SRobert Mustacchi 403ce53722SRobert Mustacchi /* 413ce53722SRobert Mustacchi * Registration callbacks. 423ce53722SRobert Mustacchi */ 433ce53722SRobert Mustacchi typedef int (*ksensor_create_f)(id_t, const char *, const char *); 443ce53722SRobert Mustacchi typedef void (*ksensor_remove_f)(id_t, const char *); 453ce53722SRobert Mustacchi extern int ksensor_register(dev_info_t *, ksensor_create_f, ksensor_remove_f); 463ce53722SRobert Mustacchi extern void ksensor_unregister(dev_info_t *); 473ce53722SRobert Mustacchi 483ce53722SRobert Mustacchi #ifdef __cplusplus 493ce53722SRobert Mustacchi } 503ce53722SRobert Mustacchi #endif 513ce53722SRobert Mustacchi 523ce53722SRobert Mustacchi #endif /* _SYS_KSENSOR_IMPL_H */ 53