rtc-rv3032.c (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) rtc-rv3032.c (c4b12f89f5aefe559522e4e41528a6c719fcdcdb)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * RTC driver for the Micro Crystal RV3032
4 *
5 * Copyright (C) 2020 Micro Crystal SA
6 *
7 * Alexandre Belloni <alexandre.belloni@bootlin.com>
8 *

--- 916 unchanged lines hidden (view full) ---

925 if (ret < 0)
926 return ret;
927
928 rv3032->rtc = devm_rtc_allocate_device(&client->dev);
929 if (IS_ERR(rv3032->rtc))
930 return PTR_ERR(rv3032->rtc);
931
932 if (client->irq > 0) {
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * RTC driver for the Micro Crystal RV3032
4 *
5 * Copyright (C) 2020 Micro Crystal SA
6 *
7 * Alexandre Belloni <alexandre.belloni@bootlin.com>
8 *

--- 916 unchanged lines hidden (view full) ---

925 if (ret < 0)
926 return ret;
927
928 rv3032->rtc = devm_rtc_allocate_device(&client->dev);
929 if (IS_ERR(rv3032->rtc))
930 return PTR_ERR(rv3032->rtc);
931
932 if (client->irq > 0) {
933 unsigned long irqflags = IRQF_TRIGGER_LOW;
934
935 if (dev_fwnode(&client->dev))
936 irqflags = 0;
937
933 ret = devm_request_threaded_irq(&client->dev, client->irq,
934 NULL, rv3032_handle_irq,
938 ret = devm_request_threaded_irq(&client->dev, client->irq,
939 NULL, rv3032_handle_irq,
935 IRQF_TRIGGER_LOW | IRQF_ONESHOT,
940 irqflags | IRQF_ONESHOT,
936 "rv3032", rv3032);
937 if (ret) {
938 dev_warn(&client->dev, "unable to request IRQ, alarms disabled\n");
939 client->irq = 0;
940 }
941 }
942 if (!client->irq)
943 clear_bit(RTC_FEATURE_ALARM, rv3032->rtc->features);

--- 52 unchanged lines hidden ---
941 "rv3032", rv3032);
942 if (ret) {
943 dev_warn(&client->dev, "unable to request IRQ, alarms disabled\n");
944 client->irq = 0;
945 }
946 }
947 if (!client->irq)
948 clear_bit(RTC_FEATURE_ALARM, rv3032->rtc->features);

--- 52 unchanged lines hidden ---