On 29.02.2016 21:58, Laxman Dewangan wrote:
+ .alarm_pending_status_reg = MAX77620_RTC_ALARM_PENDING_STATUS_REG,
Just skip the alarm_pending_status_reg (so it will be 0x0) and check for
non-zero value later?
It might be a little bit non consistent approach to how we map RTC
registers (REG_RTC_NONE)... so I don't have strong feelings about this.
+ if (info->drv_data->rtc_irq_from_platform) {It may return -ERRNO. What happens then?
+ struct platform_device *pdev = to_platform_device(info->dev);
+
+ info->rtc_irq = platform_get_irq(pdev, 0);
I am thinking that having compatible for each device which it supports is better.
+ } else {There shouldn't be "max20024-rtc". This is exactly the same as
+ info->rtc_irq = parent_i2c->irq;
+ }
info->regmap = dev_get_regmap(parent, NULL);
if (!info->regmap) {
@@ -802,6 +840,8 @@ static SIMPLE_DEV_PM_OPS(max77686_rtc_pm_ops,
static const struct platform_device_id rtc_id[] = {
{ "max77686-rtc", .driver_data = (kernel_ulong_t)&max77686_drv_data, },
{ "max77802-rtc", .driver_data = (kernel_ulong_t)&max77802_drv_data, },
+ { "max77620-rtc", .driver_data = (kernel_ulong_t)&max77620_drv_data, },
+ { "max20024-rtc", .driver_data = (kernel_ulong_t)&max77620_drv_data, },
"max77620-rtc" so re-use existing id. No point of duplicating device
names for 100% compatible devices.