View | Details | Raw Unified | Return to bug 223642
Collapse All | Expand All

(-)ds3231.c (-3 / +3 lines)
Lines 429-438 Link Here
429
	}
429
	}
430
	/* Ack any pending alarm interrupt. */
430
	/* Ack any pending alarm interrupt. */
431
	if (ds3231_status_write(sc, 1, 1) != 0)
431
	if (ds3231_status_write(sc, 1, 1) != 0)
432
		return;
432
		device_printf(sc->sc_dev,"WARNING: Can't Ack pending alarm interrupts\n");
433
	/* Always enable the oscillator. */
433
	/* Always enable the oscillator. */
434
	if (ds3231_ctrl_write(sc) != 0)
434
	if (ds3231_ctrl_write(sc) != 0)
435
		return;
435
		device_printf(sc->sc_dev,"WARNING: Can't enable the oscillator.\n");
436
436
437
	/* Temperature. */
437
	/* Temperature. */
438
	SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temperature",
438
	SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temperature",
Lines 568-574 Link Here
568
	data[DS3231_MINS]    = TOBCD(ct.min);
568
	data[DS3231_MINS]    = TOBCD(ct.min);
569
	data[DS3231_HOUR]    = TOBCD(ct.hour) | pmflags;
569
	data[DS3231_HOUR]    = TOBCD(ct.hour) | pmflags;
570
	data[DS3231_DATE]    = TOBCD(ct.day);
570
	data[DS3231_DATE]    = TOBCD(ct.day);
571
	data[DS3231_WEEKDAY] = ct.dow;
571
	data[DS3231_WEEKDAY] = ct.dow + 1;
572
	data[DS3231_MONTH]   = TOBCD(ct.mon);
572
	data[DS3231_MONTH]   = TOBCD(ct.mon);
573
	data[DS3231_YEAR]    = TOBCD(ct.year % 100);
573
	data[DS3231_YEAR]    = TOBCD(ct.year % 100);
574
	if (sc->sc_last_c)
574
	if (sc->sc_last_c)

Return to bug 223642