a new code adopted from https://github.com/Xilinx/linux-xlnx/drivers/misc/si570.c