Home | History | Annotate | Download | only in i2c
History log of /src/sys/dev/i2c/lm75.c
RevisionDateAuthorComments
 1.50  03-Oct-2025  thorpej Use device_{get,set}prop_string() for sensor names.
 1.49  21-Sep-2025  thorpej Get the sensor descriptive information from our device properties
dictionary, rather than from a secondary dictionary passed in the
i2c_attach_args (this secondary dictionary is deprecated and going
away).
 1.48  25-Aug-2025  macallan DS75 has extra resolution bits, let's use them
 1.47  02-Jan-2025  skrll KNF (whitespace)
 1.46  02-Jan-2025  skrll Trailing whitespace.
 1.45  21-Jun-2021  christos branches: 1.45.6; 1.45.16;
fix proplib deprecation
 1.44  13-Jun-2021  mlelstv iic_acquire_bus can fail.
 1.43  21-May-2021  macallan don't prop_object_retain(NULL)
 1.42  01-Mar-2021  rin branches: 1.42.4; 1.42.6;
Use lmtemp(4) as entropy source.
 1.41  06-Feb-2021  thorpej - Add some additional compat strings from the DT bindings.
- Use device_compatible_entry::value to hold the device type, and generally
tidy up device type selection.
 1.40  30-Jan-2021  thorpej If we're going to keep a reference on the "props" dictionary from
the i2c_attach_args, we should retain it.
 1.39  27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.38  25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.37  17-Jan-2021  thorpej Use designated initializers and a consistent termination style in
compat_data[].
 1.36  21-Aug-2020  macallan branches: 1.36.2;
get sensor name from properties, remove macppc-specific OF support
 1.35  23-Dec-2019  thorpej No need to use I2C_F_POLL here.
 1.34  20-Feb-2019  macallan moar match string
 1.33  26-Jun-2018  thorpej branches: 1.33.2;
In my quest to make device_compatible_entry (and associated goo)
super-general, it turns out I also made it a little to cumbersome
to use (if my tired fingers are any indication). So, this is a
course-correction -- one string per entry (like of_compat_data,
which it will soon replace), and remove the over-verbose macros.
 1.32  18-Jun-2018  thorpej - Rename iic_compat_match() to iic_compatible_match() and change it
to use the new device_compatible_match() routine. A pointer to
the matching device_compatible_entry is returned if a match is
found.
- Adjust iic_use_direct_match() accordingly.
- i2c drivers now provide device_compatible_entry tables when performing
direct-config matching.
- In the dsrtc driver, take advantage of this new capability to greatly
simplify model selection.

(I'm coming for you next, of_compat_data...)
 1.31  16-Jun-2018  thorpej More cleanup to i2c autoconfiguration:

- Get all of the drivers onto the new match quality constants.
- Introduce a new helper function, iic_use_direct_match(), that has
all of the logic for direct-config matching. If it returns true,
the driver returns the match result (which may be 0). If it returns
false, the driver does indirect-config matching.
- iic_compat_match() now returns a weighted match quality; matches to
lower-indexed "compatible" device property are more-specific matches,
and return a better match quality accordingly.
 1.30  01-Oct-2017  macallan branches: 1.30.2;
attach to ds1775 which was already more or less supported as DS75
also, get sensor name/location from OpenFirmware if we know how
 1.29  11-Jan-2016  jdc Don't use I2C_F_POLL when getting/setting limits.
Save/restore the correct values for LM77.
 1.28  03-Jan-2016  jdc Add display and setting of chip temperature limit(s) for envsys(4).
 1.27  01-Jan-2016  jdc Read the Tos limit from the chip, instead of assuming 80'C, in case
firmware has altered it. Make the *decode functions return temperatures
in either uK or C for envsys and sysctl, respectively.
 1.26  27-Sep-2015  phx Direct config: Only match via the list of compatible hardware when we have
such a list available (ia_ncompat > 0). Otherwise fall back to matching
the device name with ia_name.
 1.25  27-Oct-2012  chs branches: 1.25.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.24  02-Jun-2012  dsl branches: 1.24.2;
Add some pre-processor magic to verify that the type of the data item
passed to sysctl_createv() actually matches the declared type for
the item itself.
In the places where the caller specifies a function and a structure
address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
 1.23  09-Nov-2011  macallan Support setting the temperature threshold for the LM75's alarm/interrupt
output. Some hardware ( I'm looking at you, Gdium ) abuses it to control
a fan.
 1.22  20-Jun-2011  pgoyette branches: 1.22.2;
Initialize sensor state before registering.

XXX Still need to fix i2c/ibmhawk.c
 1.21  28-Feb-2010  martin branches: 1.21.8;
Add direct config support for a few devices
 1.20  09-Jan-2009  briggs branches: 1.20.4;
According to the datasheet, temperatures on the LM75 are kept in
0.5 degC-precision the most-significant 9 bits of a 16-bit register.
Interpret them as such and simplify the conversion.
 1.19  06-Apr-2008  cegger branches: 1.19.4; 1.19.12;
use aprint_*_dev and device_xname
 1.18  04-Apr-2008  xtraeme Split device_t/softc and other related cosmetic changes.
 1.17  11-Dec-2007  lukem branches: 1.17.8;
use __KERNEL_RCSID()
 1.16  16-Nov-2007  xtraeme branches: 1.16.2; 1.16.4; 1.16.6;
Extend the envsys2 API (one more time, sorry) as defined in:

http://mail-index.netbsd.org/tech-kern/2007/11/09/0001.html

sysmon_envsys_create() and sysmon_envsys_destroy() were added to
create/destroy sysmon_envsys objects (and its TAILQ/LIST for sensors/events).

sysmon_envsys_sensor_attach() and sysmon_envsys_sensor_detach() were
added to attach/detach sensors to a specified sysmon_envsys device.

The events framework is now per device and configurable via the
ENVSYS_SETDICTIONARY ioctl or /etc/envsys.conf and envstat(8).

Update all users and documentation to reflect these changes.
 1.15  02-Sep-2007  xtraeme branches: 1.15.4; 1.15.6;
typo: ENVSYS_FVALID -> ENVSYS_SVALID.
 1.14  13-Jul-2007  xtraeme branches: 1.14.2; 1.14.6; 1.14.8;
Forgot to set the description in the sensor.
 1.13  04-Jul-2007  xtraeme There's no need to set the "envsys-description" property in the
driver's dictionary anymore, because with envsys2 you can change
descriptions.
 1.12  01-Jul-2007  xtraeme Imported envsys 2, a brief description of the new features:
(Part 2: drivers)

* Support for detachable sensors.
* Cleaned up the API for simplicity and efficiency.
* Ability to send capacity/critical/warning events to powerd(8).
* Adapted all the code to the new locking order.
* Compatibility with the old envsys API: the ENVSYS_GTREINFO
and ENVSYS_GTREDATA ioctl(2)s are supported.
* Added support for a 'dictionary based communication channel' between
sysmon_power(9) and powerd(8), that means there is no 32 bytes event
size restriction anymore.
* Binary compatibility with old envstat(8) and powerd(8) via COMPAT_40.
* All drivers with the n^2 gtredata bug were fixed, PR kern/36226.

Tested by:

blymn: smsc(4).
bouyer: ipmi(4), mfi(4).
kefren: ug(4).
njoly: viaenv(4), adt7463.c.
riz: owtemp(4).
xtraeme: acpiacad(4), acpibat(4), acpitz(4), aiboost(4), it(4), lm(4).
 1.11  10-Jul-2006  thorpej branches: 1.11.14; 1.11.16;
Put appropriate prefixes on property names to reduce chances of name
collisions.
 1.10  12-Jun-2006  kiyohara branches: 1.10.2;
It necessary to mask to validate bits.
 1.9  17-May-2006  kiyohara branches: 1.9.2;
Support LM77 Temperature.
 1.8  05-May-2006  thorpej Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
 1.7  04-Apr-2006  riz Correct a couple of typos in comments ("Hook info" -> "Hook into",
"prescision"->"precision")
 1.6  29-Mar-2006  thorpej Use device_private().
 1.5  29-Mar-2006  thorpej Use device_cfdata().
 1.4  18-Feb-2006  thorpej branches: 1.4.2; 1.4.4; 1.4.6;
- Don't expose dev_propdb directly -- provide devprop_*() wrappers instead.
- Rework the ARMADILLO / epe device properties interaction so that it actually
associates the MAC address property with the epe device instance.
 1.3  11-Dec-2005  christos branches: 1.3.2; 1.3.4; 1.3.6;
merge ktrace-lwp.
 1.2  03-Aug-2004  scw branches: 1.2.12;
Support the DS75; a variant of the LM75 but with a slightly different
data format.
 1.1  30-Sep-2003  thorpej branches: 1.1.4;
New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc. Primarily written by Steve Woodford,
with some modification by me.
 1.1.4.5  21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.4  18-Sep-2004  skrll Sync with HEAD.
 1.1.4.3  12-Aug-2004  skrll Sync with HEAD.
 1.1.4.2  03-Aug-2004  skrll Sync with HEAD
 1.1.4.1  30-Sep-2003  skrll file lm75.c was added on branch ktrace-lwp on 2004-08-03 10:46:06 +0000
 1.2.12.5  21-Jan-2008  yamt sync with head
 1.2.12.4  07-Dec-2007  yamt sync with head
 1.2.12.3  03-Sep-2007  yamt sync with head.
 1.2.12.2  30-Dec-2006  yamt sync with head.
 1.2.12.1  21-Jun-2006  yamt sync with head.
 1.3.6.2  01-Jun-2006  kardel Sync with head.
 1.3.6.1  22-Apr-2006  simonb Sync with head.
 1.3.4.1  09-Sep-2006  rpaulo sync with head
 1.3.2.1  18-Feb-2006  yamt sync with head.
 1.4.6.2  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.4.6.1  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.4.4.2  11-May-2006  elad sync with head
 1.4.4.1  19-Apr-2006  elad sync with head.
 1.4.2.5  11-Aug-2006  yamt sync with head
 1.4.2.4  26-Jun-2006  yamt sync with head.
 1.4.2.3  24-May-2006  yamt sync with head.
 1.4.2.2  11-Apr-2006  yamt sync with head
 1.4.2.1  01-Apr-2006  yamt sync with head.
 1.9.2.1  19-Jun-2006  chap Sync with head.
 1.10.2.1  13-Jul-2006  gdamore Merge from HEAD.
 1.11.16.1  11-Jul-2007  mjf Sync with head.
 1.11.14.2  09-Oct-2007  ad Sync with head.
 1.11.14.1  15-Jul-2007  ad Sync with head.
 1.14.8.2  09-Jan-2008  matt sync with HEAD
 1.14.8.1  06-Nov-2007  matt sync with HEAD
 1.14.6.2  21-Nov-2007  joerg Sync with HEAD.
 1.14.6.1  03-Sep-2007  jmcneill Sync with HEAD.
 1.14.2.1  03-Sep-2007  skrll Sync with HEAD.
 1.15.6.2  27-Dec-2007  mjf Sync with HEAD.
 1.15.6.1  19-Nov-2007  mjf Sync with HEAD.
 1.15.4.1  18-Nov-2007  bouyer Sync with HEAD
 1.16.6.1  13-Dec-2007  bouyer Sync with HEAD
 1.16.4.1  11-Dec-2007  yamt sync with head.
 1.16.2.1  26-Dec-2007  ad Sync with head.
 1.17.8.2  17-Jan-2009  mjf Sync with HEAD.
 1.17.8.1  02-Jun-2008  mjf Sync with HEAD.
 1.19.12.1  19-Jan-2009  skrll Sync with HEAD.
 1.19.4.2  11-Mar-2010  yamt sync with head
 1.19.4.1  04-May-2009  yamt sync with head.
 1.20.4.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.21.8.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.22.2.2  30-Oct-2012  yamt sync with head
 1.22.2.1  10-Nov-2011  yamt sync with head
 1.24.2.2  03-Dec-2017  jdolecek update from HEAD
 1.24.2.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.14.2  19-Mar-2016  skrll Sync with HEAD
 1.25.14.1  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.30.2.2  28-Jul-2018  pgoyette Sync with HEAD
 1.30.2.1  25-Jun-2018  pgoyette Sync with HEAD
 1.33.2.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.33.2.1  10-Jun-2019  christos Sync with HEAD
 1.36.2.1  03-Apr-2021  thorpej Sync with HEAD.
 1.42.6.1  31-May-2021  cjep sync with head
 1.42.4.2  01-Aug-2021  thorpej Sync with HEAD.
 1.42.4.1  17-Jun-2021  thorpej Sync w/ HEAD.
 1.45.16.1  02-Aug-2025  perseant Sync with HEAD
 1.45.6.1  10-Sep-2021  thorpej Remove unnecessary references to i2c_attach_args::ia_prop and mark the ones
that remain as XXX.

RSS XML Feed