FreeBSD kernel IICBUS device code
adm1030.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/systm.h>
#include <sys/module.h>
#include <sys/callout.h>
#include <sys/conf.h>
#include <sys/cpu.h>
#include <sys/ctype.h>
#include <sys/kernel.h>
#include <sys/kthread.h>
#include <sys/limits.h>
#include <sys/reboot.h>
#include <sys/rman.h>
#include <sys/sysctl.h>
#include <sys/unistd.h>
#include <machine/bus.h>
#include <machine/md_var.h>
#include <dev/iicbus/iicbus.h>
#include <dev/iicbus/iiconf.h>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_bus.h>
#include <powerpc/powermac/powermac_thermal.h>
Include dependency graph for adm1030.c:

Go to the source code of this file.

Data Structures

struct  adm1030_softc
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int adm1030_probe (device_t)
 
static int adm1030_attach (device_t)
 
static void adm1030_start (void *xdev)
 
static int adm1030_write_byte (device_t dev, uint32_t addr, uint8_t reg, uint8_t buf)
 
static int adm1030_set (struct adm1030_softc *fan, int pwm)
 
static int adm1030_sysctl (SYSCTL_HANDLER_ARGS)
 
 DRIVER_MODULE (adm1030, iicbus, adm1030_driver, adm1030_devclass, 0, 0)
 

Variables

static device_method_t adm1030_methods []
 
static driver_t adm1030_driver
 
static devclass_t adm1030_devclass
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ adm1030_attach()

static int adm1030_attach ( device_t  dev)
static

Definition at line 151 of file adm1030.c.

References adm1030_start(), adm1030_sysctl(), dev, and adm1030_softc::enum_hook.

Here is the call graph for this function:

◆ adm1030_probe()

static int adm1030_probe ( device_t  dev)
static

Definition at line 120 of file adm1030.c.

References dev, adm1030_softc::sc_addr, and adm1030_softc::sc_dev.

◆ adm1030_set()

static int adm1030_set ( struct adm1030_softc fan,
int  pwm 
)
static

Definition at line 207 of file adm1030.c.

References adm1030_write_byte(), adm1030_softc::sc_addr, adm1030_softc::sc_dev, and adm1030_softc::sc_pwm.

Referenced by adm1030_start(), and adm1030_sysctl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adm1030_start()

static void adm1030_start ( void *  xdev)
static

Definition at line 180 of file adm1030.c.

References adm1030_set(), adm1030_write_byte(), dev, adm1030_softc::enum_hook, adm1030_softc::fan, adm1030_softc::sc_addr, and adm1030_softc::sc_dev.

Referenced by adm1030_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adm1030_sysctl()

static int adm1030_sysctl ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 223 of file adm1030.c.

References adm1030_set(), and adm1030_softc::sc_pwm.

Referenced by adm1030_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adm1030_write_byte()

static int adm1030_write_byte ( device_t  dev,
uint32_t  addr,
uint8_t  reg,
uint8_t  buf 
)
static

Definition at line 93 of file adm1030.c.

References addr, buf, dev, IIC_M_WR, iicbus_transfer(), and iic_msg::len.

Referenced by adm1030_set(), and adm1030_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DRIVER_MODULE()

DRIVER_MODULE ( adm1030  ,
iicbus  ,
adm1030_driver  ,
adm1030_devclass  ,
,
 
)

Variable Documentation

◆ adm1030_devclass

devclass_t adm1030_devclass
static

Definition at line 88 of file adm1030.c.

◆ adm1030_driver

driver_t adm1030_driver
static
Initial value:
= {
"adm1030",
sizeof(struct adm1030_softc)
}
static device_method_t adm1030_methods[]
Definition: adm1030.c:75

Definition at line 82 of file adm1030.c.

◆ adm1030_methods

device_method_t adm1030_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, adm1030_probe),
DEVMETHOD(device_attach, adm1030_attach),
{0, 0},
}
static int adm1030_probe(device_t)
Definition: adm1030.c:120
static int adm1030_attach(device_t)
Definition: adm1030.c:151

Definition at line 75 of file adm1030.c.