no-OS
Loading...
Searching...
No Matches
iio_lm75.c File Reference

IIO Source file of LM75 Driver. More...

#include <errno.h>
#include "iio_lm75.h"
#include "no_os_alloc.h"
#include "no_os_util.h"
Include dependency graph for iio_lm75.c:

Macros

#define DEFINE_LM75_CH_ATTR(_name, _priv)
 

Functions

int iio_lm75_init (struct iio_lm75 **iio_lm75pp, struct lm75_dev *dev)
 Allocate and initialize resources used by LM75 IIO driver.
 
int iio_lm75_remove (struct iio_lm75 *iio_lm75)
 Release resources used by LM75 IIO driver back to system.
 

Detailed Description

IIO Source file of LM75 Driver.

Author
Niel Acuna (niel..nosp@m.acun.nosp@m.a@ana.nosp@m.log..nosp@m.com)

Copyright 2026(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Macro Definition Documentation

◆ DEFINE_LM75_CH_ATTR

#define DEFINE_LM75_CH_ATTR ( _name,
_priv )
Value:
{\
.name = _name, \
.priv = _priv, \
.show = lm75_ch_attr_show, \
.store = lm75_ch_attr_store, \
}

Function Documentation

◆ iio_lm75_init()

int iio_lm75_init ( struct iio_lm75 ** iio_lm75pp,
struct lm75_dev * dev )

Allocate and initialize resources used by LM75 IIO driver.

Parameters
[out]iio_lm75pppointer to lm75 iio device descriptor pointer.
[in]devlm75 device descriptor.
Returns
0 on success
-EINVAL if any one parameter is NULL
-ENOMEM when memory allocation failed

◆ iio_lm75_remove()

int iio_lm75_remove ( struct iio_lm75 * iio_lm75)

Release resources used by LM75 IIO driver back to system.

Parameters
[in]iio_lm75lm75 iio device descriptor.
Returns
0 on success
-EINVAL if iio_lm75 is NULL