Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/alipm.c
RevisionDateAuthorComments
 1.14  15-Sep-2025  thorpej Encapsulate what's needed to attach an I2C bus into a iicbus_attach()
inline.
 1.13  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.12  24-Apr-2021  thorpej branches: 1.12.2; 1.12.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.11  22-Dec-2019  thorpej branches: 1.11.10;
Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.10  18-Mar-2012  martin branches: 1.10.40;
Split device_t
 1.9  11-Mar-2012  pgoyette Since there are no RW_READERs for the device's rw_lock, convert it to a
mutex and reduce the overhead.

Also, even if we're polling, we need to use the lock to control access to
the bus, otherwise we get anomolous results.

(These same changes were made several weeks ago to other drivers; I
missed this one.)
 1.8  10-Feb-2011  hannken branches: 1.8.4; 1.8.8;
Make the SMbus Send/Receive functions work.

If cmdlen = 0 and len = 1 use the XXX_HC_CMD_BYTE protocol, send
data through XXX_SMB_HCMD or receive data from XXX_SMB_HD0.

Ok: Paul Goyette
 1.7  11-Mar-2010  mrg branches: 1.7.2; 1.7.4; 1.7.6;
various aprint_* fixes.
 1.6  12-May-2009  cegger branches: 1.6.2;
use device_private().
"looks good" ad@
XXX for the device_t/softc split, please check the driver that no cases have been missed.
 1.5  11-May-2009  cegger use device_xname()
 1.4  06-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.3  18-Mar-2009  cegger branches: 1.3.2;
bzero -> memset
 1.2  03-Feb-2009  pgoyette branches: 1.2.2;
Update the i2c_exec() functions to handle quick_read/quick_write protocol.

Although interface routines i2c_smbus_*() exist, nothing in NetBSD actually
uses them yet.
 1.1  29-Oct-2008  jkunz branches: 1.1.6; 1.1.8; 1.1.10;
Ported alipm(4) and admtemp(4) from OpenBSD.
 1.1.10.4  28-Apr-2009  skrll Sync with HEAD.
 1.1.10.3  03-Mar-2009  skrll Sync with HEAD.
 1.1.10.2  19-Jan-2009  skrll Sync with HEAD.
 1.1.10.1  29-Oct-2008  skrll file alipm.c was added on branch nick-hppapmap on 2009-01-19 13:18:24 +0000
 1.1.8.2  17-Jan-2009  mjf Sync with HEAD.
 1.1.8.1  29-Oct-2008  mjf file alipm.c was added on branch mjf-devfs2 on 2009-01-17 13:28:59 +0000
 1.1.6.2  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.1.6.1  29-Oct-2008  haad file alipm.c was added on branch haad-dm on 2008-12-13 01:14:34 +0000
 1.2.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.2.4  11-Aug-2010  yamt sync with head.
 1.3.2.3  16-May-2009  yamt sync with head
 1.3.2.2  04-May-2009  yamt sync with head.
 1.3.2.1  18-Mar-2009  yamt file alipm.c was added on branch yamt-nfs-mp on 2009-05-04 08:12:54 +0000
 1.6.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.7.6.1  17-Feb-2011  bouyer Sync with HEAD
 1.7.4.1  06-Jun-2011  jruoho Sync with HEAD.
 1.7.2.1  05-Mar-2011  rmind sync with head
 1.8.8.1  05-Apr-2012  mrg sync to latest -current.
 1.8.4.1  17-Apr-2012  yamt sync with head
 1.10.40.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.11.10.1  23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.12.8.1  04-Aug-2021  thorpej Adapt to CFARGS().
 1.12.2.1  14-May-2021  thorpej Pass along our devhandle to the iic bus instance.

RSS XML Feed