logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

superio, superio_devid, superio_dev_disable, superio_dev_enable, superio_dev_enabled, superio_find_dev,

Authors

       This manual page was written by Andriy Gapon avg@FreeBSD.org

Debian                                          October 11, 2019                                      SUPERIO(9)

Description

       The  superio set of functions are used for managing Super I/O devices.  The functions provide support for
       raw configuration access, locating devices, device information, and device configuration.

   Thecontrollerinterface
       The superio_vendor() function is used to get a vendor of the Super I/O controller dev.   Possible  return
       values are SUPERIO_VENDOR_ITE and SUPERIO_VENDOR_NUVOTON.

       The superio_devid() function is used to get a device ID of the Super I/O controller dev.

       The superio_revid() function is used to get a revision ID of the Super I/O controller dev.

       The  superio_find_dev()  function  is used to find a device on the superio(4) bus, specified by dev, that
       has the requested type and logical device number.  Either of those, but not  both,  can  be  a  wildcard.
       Supported  types are SUPERIO_DEV_GPIO, SUPERIO_DEV_HWM, and SUPERIO_DEV_WDT.  The wildcard value for type
       is SUPERIO_DEV_NONE.  The wildcard value for ldn is -1.

   Thedeviceinterface
       The superio_read() function is used to read data from the Super I/O configuration register of the  device
       dev.

       The  superio_write() function is used to write data to the Super I/O configuration register of the device
       dev.

       The superio_dev_enable(), superio_dev_disable(), and superio_dev_enabled() functions are used to  enable,
       disable,  or  check  status of the device dev.  The mask parameter selects sub-functions of a device that
       supports them.  For devices that do not have sub-functions, mask should be set to 1.

   Theaccessorinterface
       The superio_get_dma() is used to get a DMA channel number configured for the device dev.

       The superio_get_iobase() is used to get a base I/O port configured for the device dev.   The  device  may
       expose additional or alternative configuration access via the I/O ports.

       The superio_get_irq() is used to get an interrupt number configured for the device dev.

       The superio_get_ldn() is used to get a Logical Device Number of the device dev.

       The superio_get_type() is used to get a type of the device dev.

Name

       superio,  superio_devid,  superio_dev_disable, superio_dev_enable, superio_dev_enabled, superio_find_dev,
       superio_get_dma, superio_get_iobase, superio_get_irq,  superio_get_ldn,  superio_get_type,  superio_read,
       superio_revid, superio_vendor, superio_write — Super I/O bus interface

See Also

superio(4), device(9), driver(9)

Synopsis

#include<sys/bus.h>#include<dev/superio/superio.h>uint16_tsuperio_devid(device_tdev);

       voidsuperio_dev_disable(device_tdev, uint8_tmask);

       voidsuperio_dev_enable(device_tdev, uint8_tmask);

       boolsuperio_dev_enabled(device_tdev, uint8_tmask);

       device_tsuperio_find_dev(device_tdev, superio_dev_type_ttype, intldn);

       uint8_tsuperio_get_dma(device_tdev);

       uint16_tsuperio_get_iobase(device_tdev);

       uint8_tsuperio_get_irq(device_tdev);

       uint8_tsuperio_get_ldn(device_tdev);

       superio_dev_type_tsuperio_get_type(device_tdev);

       uint8_tsuperio_read(device_tdev, uint8_treg);

       uint8_tsuperio_revid(device_tdev);

       superio_vendor_tsuperio_vendor(device_tdev);

       voidsuperio_write(device_tdev, uint8_treg, uint8_tval);

See Also