linux-4.14.90-dev/linux-4.14.90/drivers/rtc/rtc-ds1685.c
/**
 * ds1685_rtc_print_regs - helper function to print register values.
 * @hex: hex byte to convert into binary bits.
 * @dest: destination char array.
 *
 * This is basically a hex->binary function, just with extra spacing between
 * the digits.  It only works on 1-byte values (8 bits).
 */
helper function to print register values.
@hex: hex byte to convert into binary bits.
@dest: destination char array.

This is basically a hex->binary function, just with extra spacing between
the digits.  It only works on 1-byte values (8 bits).
helper function to print register values . @hex : hex byte to convert into binary bits . @dest : destination char array . This is basically a hex - > binary function just with extra spacing between the digits . It only works on 1 - byte values ( 8 bits ) .
static char*
ds1685_rtc_print_regs(u8 hex, char *dest)
{
	u32 i, j;
	char *tmp = dest;
	for (i = 0; i < NUM_BITS; i++) {
		*tmp++ = ((hex & 0x80) != 0 ? '1' : '0');
		for (j = 0; j < NUM_SPACES; j++)
			*tmp++ = ' ';
		hex <<= 1;
	}
	*tmp++ = '\0';
	return dest;
}
static char * ds1685_rtc_print_regs ( u8 hex , char * dest ) { u32 i , j ; char * tmp = dest ; for ( i = 0 ; i < NUM_BITS ; i ++ ) { * tmp ++ = ( ( hex & 0x80 ) != 0 ? ' ' : ' ' ) ; for ( j = 0 ; j < NUM_SPACES ; j ++ ) * tmp ++ = ' ' ; hex <<= 1 ; } * tmp ++ = ' \0 ' ; return dest ; }
ds1685_rtc_print_regs - helper function to print register values.
ds1685_rtc_print_regs - helper function to print register values .