linux/drivers/rtc/rtc-ds1685.c
/**
 * ds1685_rtc_get_ssn - retrieve the silicon serial number.
 * @rtc: pointer to the ds1685 rtc structure.
 * @ssn: u8 array to hold the bits of the silicon serial number.
 *
 * This number starts at 0x40, and is 8-bytes long, ending at 0x47. The
 * first byte is the model number, the next six bytes are the serial number
 * digits, and the final byte is a CRC check byte.  Together, they form the
 * silicon serial number.
 *
 * These values are stored in bank1, so ds1685_rtc_switch_to_bank1 must be
 * called first before calling this function, else data will be read out of
 * the bank0 NVRAM.  Be sure to call ds1685_rtc_switch_to_bank0 when done.
 */
retrieve the silicon serial number.
@rtc: pointer to the ds1685 rtc structure.
@ssn: u8 array to hold the bits of the silicon serial number.

This number starts at 0x40, and is 8-bytes long, ending at 0x47. The
first byte is the model number, the next six bytes are the serial number
digits, and the final byte is a CRC check byte.  Together, they form the
silicon serial number.

These values are stored in bank1, so ds1685_rtc_switch_to_bank1 must be
called first before calling this function, else data will be read out of
the bank0 NVRAM.  Be sure to call ds1685_rtc_switch_to_bank0 when done.
retrieve the silicon serial number . @rtc : pointer to the ds1685 rtc structure . @ssn : u8 array to hold the bits of the silicon serial number . This number starts at 0x40 and is 8 - bytes long ending at 0x47 . The first byte is the model number the next six bytes are the serial number digits and the final byte is a CRC check byte . Together they form the silicon serial number . These values are stored in bank1 so ds1685_rtc_switch_to_bank1 must be called first before calling this function else data will be read out of the bank0 NVRAM . Be sure to call ds1685_rtc_switch_to_bank0 when done .
static inline void
ds1685_rtc_get_ssn(struct ds1685_priv *rtc, u8 *ssn)
{
	ssn[0] = rtc->read(rtc, RTC_BANK1_SSN_MODEL);
	ssn[1] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_1);
	ssn[2] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_2);
	ssn[3] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_3);
	ssn[4] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_4);
	ssn[5] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_5);
	ssn[6] = rtc->read(rtc, RTC_BANK1_SSN_BYTE_6);
	ssn[7] = rtc->read(rtc, RTC_BANK1_SSN_CRC);
}
static inline void ds1685_rtc_get_ssn ( struct ds1685_priv * rtc , u8 * ssn ) { ssn [ 0 ] = rtc -> read ( rtc , RTC_BANK1_SSN_MODEL ) ; ssn [ 1 ] = rtc -> read ( rtc , RTC_BANK1_SSN_BYTE_1 ) ; ssn [ 2 ] = rtc -> read ( rtc , RTC_BANK1_SSN_BYTE_2 ) ; ssn [ 3 ] = rtc -> read ( rtc , RTC_BANK1_SSN_BYTE_3 ) ; ssn [ 4 ] = rtc -> read ( rtc , RTC_BANK1_SSN_BYTE_4 ) ; ssn [ 5 ] = rtc -> read ( rtc , RTC_BANK1_SSN_BYTE_5 ) ; ssn [ 6 ] = rtc -> read ( rtc , RTC_BANK1_SSN_BYTE_6 ) ; ssn [ 7 ] = rtc -> read ( rtc , RTC_BANK1_SSN_CRC ) ; }
ds1685_rtc_get_ssn - retrieve the silicon serial number.
ds1685_rtc_get_ssn - retrieve the silicon serial number .