由于春节假期,帖子审批以及工程师回复将会有所延迟,敬请谅解.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

请教一个关于omapl138的i2c问题

static int rx8025_get_datetime(struct i2c_client *client, struct rtc_time *tm)
{
    unsigned char date[7];
    int data, err;

    //init rx8025
    i2c_smbus_write_byte_data(client, RX8025_REG_CTRL1,0x20);
    i2c_smbus_write_byte_data(client, RX8025_REG_CTRL2,0x20);
    
    /* Now read time and date */
    data = i2c_smbus_read_byte_data(client, RX8025_REG_SC) & 0x7f;
    if (data < 0) {
        dev_err(&client->dev, "Unable to read second\n");
        return -EIO;
    }
    tm->tm_sec = bcd2bin(data);
    data = i2c_smbus_read_byte_data(client, RX8025_REG_MN) & 0x7f;
    if (data < 0) {
        dev_err(&client->dev, "Unable to read min\n");
        return -EIO;
    }
    tm->tm_min = bcd2bin(data);
    data = i2c_smbus_read_byte_data(client, RX8025_REG_HR);
    if (data < 0) {
        dev_err(&client->dev, "Unable to read hour\n");
        return -EIO;
    }

我加载了一个rtc设备的驱动后,这样的提示是什么原因导致的呢?Input/output error