History log of /src/sys/dev/i2c/ds1307.c |
Revision | | Date | Author | Comments |
1.42 |
| 07-Sep-2025 |
thorpej | Change todr_chip_handle::cookie -> todr_chip_handle::todr_dev, and make it a device_t. Upcoming functional changes will require the device_t associated with a TODR device.
Change todr_chip_handle::bus_cookie -> todr_chip_handle::todr_devaux. Nothing was using the old field, but I decided to keep it around just in cause something needs it in the future.
And with these largely mechanical yet semantically meaningful changes, thus spake the Oracle: "Welcome to NetBSD 11.99.2."
|
1.41 |
| 07-Sep-2025 |
thorpej | Remove unnecessary NULL-initialization of TODR handle fields.
|
1.40 |
| 24-Jan-2023 |
mlelstv | Don't panic with invalid user data, just return an error.
|
1.39 |
| 03-Aug-2021 |
andvar | Fix various typos in comments. Also add missing NetBSD RCS Id in some of these files.
|
1.38 |
| 27-Jan-2021 |
thorpej | Use DEVICE_COMPAT_EOL.
|
1.37 |
| 25-Jan-2021 |
thorpej | Since we're using designated initialisers for compat data, we should use a completely empty initializer for the sentinel.
|
1.36 |
| 18-Jan-2021 |
thorpej | Change the device_compatible_match() function to only perform the match. Introduce a device_compatible_lookup() function to return an entry based on the same matching criteria (a'la of_search_compatible()).
Update iic_compatible_match() to reflect the above change, and introduce iic_compatible_lookup(). This pattern is less awkward to use.
|
1.35 |
| 17-Jan-2021 |
thorpej | Change the device_compatible_entry struct to have a union of a scalar value (uintptr_t value) and a pointer value (const void *data), rather than just "uintptr_t data". This eliminates the need for drivers to cast this value, and doesn't lose const'ness of pointers assigned to the field.
Update all of the users of this field to use the correct set of designated initialisers for each specific case.
|
1.34 |
| 02-Jan-2020 |
thorpej | branches: 1.34.8; No need to use I2C_F_POLL here.
|
1.33 |
| 29-Sep-2019 |
macallan | appease -Werror=stack-protector by avoiding variable sized arrays Now this builds and works on sparc64
|
1.32 |
| 29-Sep-2019 |
macallan | add another matchstring for the ds1307 found in Sun Fire V210 ( and probably V240 )
|
1.31 |
| 20-Dec-2018 |
macallan | make DSRTC_FLAG_YEAR_START_2K settable by device property
|
1.30 |
| 14-Dec-2018 |
macallan | add options DSRTC_YEAR_START_2K for machines which use 2000 and not 1970 as base to count years from, like Iyonix. While there apply the offset when writing to the clock as well.
|
1.29 |
| 26-Jun-2018 |
thorpej | branches: 1.29.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.28 |
| 26-Jun-2018 |
thorpej | Change device_compatible_match() and iic_compatible_match() to return the weighted match value and take an optional compatible-entry pointer, rather than the other way around.
|
1.27 |
| 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.26 |
| 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.
In addition to the above: - Add support for direct-config matching this driver based on "compatible" properties. - Address-only matching is now done based on the specific addresses the requested model supports. - "compatible" property can specify to the driver which model is to be used, so that using config "flags" directives aren't required in the direct-config case.
XXX More changes coming that require re-factoring some other code.
|
1.25 |
| 28-Oct-2017 |
riastradh | branches: 1.25.2; Kill some more extern struct cfdriver declarations.
Down with externs in .c!
|
1.24 |
| 18-Oct-2016 |
aymeric | add support for the MCP7940 based Pi Face Real Time Clock
|
1.23 |
| 04-Oct-2016 |
kiyohara | Add DS1340.
|
1.22 |
| 05-Apr-2016 |
bouyer | branches: 1.22.2; Fix DS1672 suppport: need to provide dm_ch_reg to avoid a KASSERT on write. For consistency set dm_ch_value too, even if it's unused.
|
1.21 |
| 20-Nov-2014 |
christos | branches: 1.21.2; use the inline bcdtobin and bintobcd directly instead through a macro.
|
1.20 |
| 13-Oct-2014 |
martin | Initialize a variable that gcc thinks might be used uninitialized.
|
1.19 |
| 12-Oct-2014 |
macallan | - support DS3231 ( more or less a DS3232 without NVRAM it seems ) - support the DS3231's temperature sensor
|
1.18 |
| 25-Jul-2014 |
dholland | branches: 1.18.2; Add d_discard to all struct cdevsw instances I could find.
All have been set to "nodiscard"; some should get a real implementation.
|
1.17 |
| 16-Mar-2014 |
dholland | branches: 1.17.2; Change (mostly mechanically) every cdevsw/bdevsw I can find to use designated initializers.
I have not built every extant kernel so I have probably broken at least one build; however I've also found and fixed some wrong cdevsw/bdevsw entries so even if so I think we come out ahead.
|
1.16 |
| 25-Jul-2012 |
matt | branches: 1.16.2; 1.16.4; Clean up error messages. Tidy some logic.
|
1.15 |
| 23-Feb-2012 |
matt | Rework this driver to support other dsrtc than just the DS1307. Support both BCD and 32-bit binary type RTCs. Supports DS1339, DS1672, and DS3232. To select variant, put the module # in flags in the the config file. dsrtc at iic0 addr 0x69 flags 1339 If the flags is not supplied, a 1307 is assumed (compatible).
|
1.14 |
| 07-Jan-2012 |
phx | Fixed 12/24h mode. Bit 6 from the hours register indicates 12h mode. Do not overwrite the control register (0x07) with random contents.
|
1.13 |
| 28-May-2011 |
phx | branches: 1.13.4; 1.13.8; Add direct config support for all devices used by sandpoint.
|
1.12 |
| 08-Jun-2008 |
tsutsui | branches: 1.12.20; 1.12.26; Replace device_lookup() with device_lookup_private() to get softc after device_t/softc split. PR kern/38885 from Jonathan A. Kollasch.
|
1.11 |
| 04-May-2008 |
xtraeme | branches: 1.11.2; device_t/softc split and other related cosmetic changes.
|
1.10 |
| 06-Apr-2008 |
cegger | branches: 1.10.2; 1.10.4; use aprint_*_dev and device_xname
|
1.9 |
| 11-Dec-2007 |
lukem | branches: 1.9.8; use __KERNEL_RCSID()
|
1.8 |
| 12-Jan-2007 |
cube | branches: 1.8.20; 1.8.28; 1.8.30; 1.8.32; Add missing initializers in cdevsw structs.
|
1.7 |
| 09-Sep-2006 |
gdamore | Convert to MI clock_ymdhms versions of todr calls.
|
1.6 |
| 04-Sep-2006 |
gdamore | branches: 1.6.2; Remove unused todr_setcal/todr_getcal and all the assorted stub implementations.
|
1.5 |
| 29-Mar-2006 |
thorpej | Use device_private().
|
1.4 |
| 13-Dec-2005 |
abs | branches: 1.4.4; 1.4.6; 1.4.8; 1.4.10; 1.4.12; Update some missed _close() and _open() functions from 'struct proc *p' to 'struct lwp *l'.
|
1.3 |
| 11-Dec-2005 |
christos | merge ktrace-lwp.
|
1.2 |
| 04-Jun-2005 |
he | branches: 1.2.2; Fix the various todr_gettime() and todr_settime() fallouts from -Wcast-qual differently, by instead changing the signatore of those "functions" to take a "volatile struct timeval*" instead of a "struct timeval*". Many places, these functions are called with &time, and time is declared as volatile in <sys/kernel.h>. This way we can get rid of all the ugly casts which now also triggered warnings, and caused more code to be added to work around the problem.
Reviewed by thorpej.
|
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 |
| 10-Nov-2005 |
skrll | Sync with HEAD. Here we go again...
|
1.1.4.4 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.1.4.3 |
| 18-Sep-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 ds1307.c was added on branch ktrace-lwp on 2004-08-03 10:46:05 +0000
|
1.2.2.4 |
| 21-Jan-2008 |
yamt | sync with head
|
1.2.2.3 |
| 26-Feb-2007 |
yamt | sync with head.
|
1.2.2.2 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.2.2.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.4.12.1 |
| 31-Mar-2006 |
tron | Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
|
1.4.10.1 |
| 19-Apr-2006 |
elad | sync with head.
|
1.4.8.2 |
| 14-Sep-2006 |
yamt | sync with head.
|
1.4.8.1 |
| 01-Apr-2006 |
yamt | sync with head.
|
1.4.6.1 |
| 22-Apr-2006 |
simonb | Sync with head.
|
1.4.4.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.6.2.2 |
| 01-Feb-2007 |
ad | Sync with head.
|
1.6.2.1 |
| 18-Nov-2006 |
ad | Sync with head.
|
1.8.32.1 |
| 13-Dec-2007 |
bouyer | Sync with HEAD
|
1.8.30.1 |
| 11-Dec-2007 |
yamt | sync with head.
|
1.8.28.1 |
| 26-Dec-2007 |
ad | Sync with head.
|
1.8.20.1 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.9.8.2 |
| 29-Jun-2008 |
mjf | Sync with HEAD.
|
1.9.8.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.10.4.2 |
| 04-May-2009 |
yamt | sync with head.
|
1.10.4.1 |
| 16-May-2008 |
yamt | sync with head.
|
1.10.2.2 |
| 17-Jun-2008 |
yamt | sync with head.
|
1.10.2.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.11.2.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.12.26.1 |
| 06-Jun-2011 |
jruoho | Sync with HEAD.
|
1.12.20.1 |
| 31-May-2011 |
rmind | sync with head
|
1.13.8.2 |
| 24-Feb-2012 |
mrg | sync to -current.
|
1.13.8.1 |
| 18-Feb-2012 |
mrg | merge to -current.
|
1.13.4.3 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.13.4.2 |
| 30-Oct-2012 |
yamt | sync with head
|
1.13.4.1 |
| 17-Apr-2012 |
yamt | sync with head
|
1.16.4.1 |
| 18-May-2014 |
rmind | sync with head
|
1.16.2.2 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.16.2.1 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.17.2.1 |
| 10-Aug-2014 |
tls | Rebase.
|
1.18.2.1 |
| 14-Apr-2015 |
snj | Pull up following revision(s) (requested by nonaka in ticket #672): sys/dev/i2c/ds1307.c: revisions 1.19, 1.20 sys/dev/i2c/ds1307reg.h: revision 1.5 - support DS3231 ( more or less a DS3232 without NVRAM it seems ) - support the DS3231's temperature sensor -- Initialize a variable that gcc thinks might be used uninitialized.
|
1.21.2.2 |
| 05-Dec-2016 |
skrll | Sync with HEAD
|
1.21.2.1 |
| 22-Apr-2016 |
skrll | Sync with HEAD
|
1.22.2.1 |
| 04-Nov-2016 |
pgoyette | Sync with HEAD
|
1.25.2.3 |
| 26-Dec-2018 |
pgoyette | Sync with HEAD, resolve a few conflicts
|
1.25.2.2 |
| 28-Jul-2018 |
pgoyette | Sync with HEAD
|
1.25.2.1 |
| 25-Jun-2018 |
pgoyette | Sync with HEAD
|
1.29.2.3 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.29.2.2 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.29.2.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.34.8.1 |
| 03-Apr-2021 |
thorpej | Sync with HEAD.
|