From: Gyungoh Yoo<jack.yoo@xxxxxxxxxxxx>
+static int max8907_irq_set_wake(struct irq_data *data, unsigned int on)
+{
+ /* Everything happens in max8907_irq_sync_unlock */
+
+ if (device_may_wakeup(chip->dev))
+ enable_irq_wake(i2c->irq);
+ else
+ disable_irq(i2c->irq);
+ max8907->i2c_rtc = i2c_new_dummy(i2c->adapter, MAX8907_RTC_I2C_ADDR);the argiment should be max8907->i2c_rtc rather than i2c here.
+ if (!max8907->i2c_rtc) {
+ ret = -ENOMEM;
+ goto err_dummy_rtc;
+ }
+ i2c_set_clientdata(max8907->i2c_rtc, max8907);
+ max8907->regmap_rtc = devm_regmap_init_i2c(i2c,
+&max8907_regmap_rtc_config);