ds1307 181 drivers/rtc/rtc-ds1307.c u8 (*do_trickle_setup)(struct ds1307 *, u32, ds1307 189 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 191 drivers/rtc/rtc-ds1307.c const struct chip_desc *chip = &chips[ds1307->type]; ds1307 194 drivers/rtc/rtc-ds1307.c if (ds1307->type == rx_8130) { ds1307 196 drivers/rtc/rtc-ds1307.c ret = regmap_read(ds1307->regmap, RX8130_REG_FLAG, ®flag); ds1307 209 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_read(ds1307->regmap, chip->offset, regs, ds1307 219 drivers/rtc/rtc-ds1307.c if (ds1307->type == m41t0 && ds1307 226 drivers/rtc/rtc-ds1307.c switch (ds1307->type) { ds1307 239 drivers/rtc/rtc-ds1307.c ret = regmap_read(ds1307->regmap, DS1307_REG_CONTROL, &tmp); ds1307 249 drivers/rtc/rtc-ds1307.c ret = regmap_read(ds1307->regmap, DS1340_REG_FLAG, &tmp); ds1307 289 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 290 drivers/rtc/rtc-ds1307.c const struct chip_desc *chip = &chips[ds1307->type]; ds1307 328 drivers/rtc/rtc-ds1307.c switch (ds1307->type) { ds1307 331 drivers/rtc/rtc-ds1307.c regmap_update_bits(ds1307->regmap, DS1307_REG_CONTROL, ds1307 335 drivers/rtc/rtc-ds1307.c regmap_update_bits(ds1307->regmap, DS1340_REG_FLAG, ds1307 353 drivers/rtc/rtc-ds1307.c result = regmap_bulk_write(ds1307->regmap, chip->offset, regs, ds1307 360 drivers/rtc/rtc-ds1307.c if (ds1307->type == rx_8130) { ds1307 362 drivers/rtc/rtc-ds1307.c result = regmap_write(ds1307->regmap, RX8130_REG_FLAG, ds1307 375 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 379 drivers/rtc/rtc-ds1307.c if (!test_bit(HAS_ALARM, &ds1307->flags)) ds1307 383 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_read(ds1307->regmap, DS1339_REG_ALARM1_SECS, ds1307 417 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 422 drivers/rtc/rtc-ds1307.c if (!test_bit(HAS_ALARM, &ds1307->flags)) ds1307 432 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_read(ds1307->regmap, DS1339_REG_ALARM1_SECS, regs, ds1307 459 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_write(ds1307->regmap, DS1339_REG_ALARM1_SECS, regs, ds1307 470 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, DS1337_REG_CONTROL, regs[7]); ds1307 478 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 480 drivers/rtc/rtc-ds1307.c if (!test_bit(HAS_ALARM, &ds1307->flags)) ds1307 483 drivers/rtc/rtc-ds1307.c return regmap_update_bits(ds1307->regmap, DS1337_REG_CONTROL, ds1307 488 drivers/rtc/rtc-ds1307.c static u8 do_trickle_setup_ds1339(struct ds1307 *ds1307, u32 ohms, bool diode) ds1307 504 drivers/rtc/rtc-ds1307.c dev_warn(ds1307->dev, ds1307 513 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_id; ds1307 514 drivers/rtc/rtc-ds1307.c struct mutex *lock = &ds1307->rtc->ops_lock; ds1307 521 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_read(ds1307->regmap, RX8130_REG_EXTENSION, ctl, ds1307 530 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_write(ds1307->regmap, RX8130_REG_EXTENSION, ctl, ds1307 535 drivers/rtc/rtc-ds1307.c rtc_update_irq(ds1307->rtc, 1, RTC_AF | RTC_IRQF); ds1307 545 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 549 drivers/rtc/rtc-ds1307.c if (!test_bit(HAS_ALARM, &ds1307->flags)) ds1307 553 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_read(ds1307->regmap, RX8130_REG_ALARM_MIN, ald, ds1307 559 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_read(ds1307->regmap, RX8130_REG_EXTENSION, ctl, ds1307 587 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 591 drivers/rtc/rtc-ds1307.c if (!test_bit(HAS_ALARM, &ds1307->flags)) ds1307 601 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_read(ds1307->regmap, RX8130_REG_EXTENSION, ctl, ds1307 610 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_write(ds1307->regmap, RX8130_REG_EXTENSION, ctl, ds1307 620 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_write(ds1307->regmap, RX8130_REG_ALARM_MIN, ald, ds1307 630 drivers/rtc/rtc-ds1307.c return regmap_write(ds1307->regmap, RX8130_REG_CONTROL0, ctl[2]); ds1307 635 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 638 drivers/rtc/rtc-ds1307.c if (!test_bit(HAS_ALARM, &ds1307->flags)) ds1307 641 drivers/rtc/rtc-ds1307.c ret = regmap_read(ds1307->regmap, RX8130_REG_CONTROL0, ®); ds1307 650 drivers/rtc/rtc-ds1307.c return regmap_write(ds1307->regmap, RX8130_REG_CONTROL0, reg); ds1307 655 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_id; ds1307 656 drivers/rtc/rtc-ds1307.c struct mutex *lock = &ds1307->rtc->ops_lock; ds1307 662 drivers/rtc/rtc-ds1307.c ret = regmap_read(ds1307->regmap, MCP794XX_REG_ALARM0_CTRL, ®); ds1307 668 drivers/rtc/rtc-ds1307.c ret = regmap_write(ds1307->regmap, MCP794XX_REG_ALARM0_CTRL, reg); ds1307 673 drivers/rtc/rtc-ds1307.c ret = regmap_update_bits(ds1307->regmap, MCP794XX_REG_CONTROL, ds1307 678 drivers/rtc/rtc-ds1307.c rtc_update_irq(ds1307->rtc, 1, RTC_AF | RTC_IRQF); ds1307 688 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 692 drivers/rtc/rtc-ds1307.c if (!test_bit(HAS_ALARM, &ds1307->flags)) ds1307 696 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_read(ds1307->regmap, MCP794XX_REG_CONTROL, regs, ds1307 746 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 750 drivers/rtc/rtc-ds1307.c if (!test_bit(HAS_ALARM, &ds1307->flags)) ds1307 764 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_read(ds1307->regmap, MCP794XX_REG_CONTROL, regs, ds1307 784 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_write(ds1307->regmap, MCP794XX_REG_CONTROL, regs, ds1307 792 drivers/rtc/rtc-ds1307.c return regmap_write(ds1307->regmap, MCP794XX_REG_CONTROL, regs[0]); ds1307 797 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 799 drivers/rtc/rtc-ds1307.c if (!test_bit(HAS_ALARM, &ds1307->flags)) ds1307 802 drivers/rtc/rtc-ds1307.c return regmap_update_bits(ds1307->regmap, MCP794XX_REG_CONTROL, ds1307 809 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 813 drivers/rtc/rtc-ds1307.c regmap_read(ds1307->regmap, M41TXX_REG_CONTROL, &ctrl_reg); ds1307 828 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 843 drivers/rtc/rtc-ds1307.c return regmap_update_bits(ds1307->regmap, M41TXX_REG_CONTROL, ds1307 1086 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_id; ds1307 1087 drivers/rtc/rtc-ds1307.c struct mutex *lock = &ds1307->rtc->ops_lock; ds1307 1091 drivers/rtc/rtc-ds1307.c ret = regmap_read(ds1307->regmap, DS1337_REG_STATUS, &stat); ds1307 1097 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, DS1337_REG_STATUS, stat); ds1307 1099 drivers/rtc/rtc-ds1307.c ret = regmap_update_bits(ds1307->regmap, DS1337_REG_CONTROL, ds1307 1104 drivers/rtc/rtc-ds1307.c rtc_update_irq(ds1307->rtc, 1, RTC_AF | RTC_IRQF); ds1307 1127 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev->parent); ds1307 1137 drivers/rtc/rtc-ds1307.c regmap_update_bits(ds1307->regmap, M41TXX_REG_CONTROL, M41TXX_BIT_FT, ds1307 1147 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev->parent); ds1307 1150 drivers/rtc/rtc-ds1307.c regmap_read(ds1307->regmap, M41TXX_REG_CONTROL, &ctrl_reg); ds1307 1167 drivers/rtc/rtc-ds1307.c static int ds1307_add_frequency_test(struct ds1307 *ds1307) ds1307 1171 drivers/rtc/rtc-ds1307.c switch (ds1307->type) { ds1307 1175 drivers/rtc/rtc-ds1307.c err = rtc_add_group(ds1307->rtc, &rtc_freq_test_attr_group); ds1307 1191 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = priv; ds1307 1192 drivers/rtc/rtc-ds1307.c const struct chip_desc *chip = &chips[ds1307->type]; ds1307 1194 drivers/rtc/rtc-ds1307.c return regmap_bulk_read(ds1307->regmap, chip->nvram_offset + offset, ds1307 1201 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = priv; ds1307 1202 drivers/rtc/rtc-ds1307.c const struct chip_desc *chip = &chips[ds1307->type]; ds1307 1204 drivers/rtc/rtc-ds1307.c return regmap_bulk_write(ds1307->regmap, chip->nvram_offset + offset, ds1307 1210 drivers/rtc/rtc-ds1307.c static u8 ds1307_trickle_init(struct ds1307 *ds1307, ds1307 1219 drivers/rtc/rtc-ds1307.c if (device_property_read_u32(ds1307->dev, "trickle-resistor-ohms", ds1307 1223 drivers/rtc/rtc-ds1307.c if (device_property_read_bool(ds1307->dev, "trickle-diode-disable")) ds1307 1226 drivers/rtc/rtc-ds1307.c return chip->do_trickle_setup(ds1307, ohms, diode); ds1307 1245 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = dev_get_drvdata(dev); ds1307 1250 drivers/rtc/rtc-ds1307.c ret = regmap_bulk_read(ds1307->regmap, DS3231_REG_TEMPERATURE, ds1307 1286 drivers/rtc/rtc-ds1307.c static void ds1307_hwmon_register(struct ds1307 *ds1307) ds1307 1290 drivers/rtc/rtc-ds1307.c if (ds1307->type != ds_3231) ds1307 1293 drivers/rtc/rtc-ds1307.c dev = devm_hwmon_device_register_with_groups(ds1307->dev, ds1307->name, ds1307 1294 drivers/rtc/rtc-ds1307.c ds1307, ds1307 1297 drivers/rtc/rtc-ds1307.c dev_warn(ds1307->dev, "unable to register hwmon device %ld\n", ds1307 1304 drivers/rtc/rtc-ds1307.c static void ds1307_hwmon_register(struct ds1307 *ds1307) ds1307 1324 drivers/rtc/rtc-ds1307.c container_of(clk, struct ds1307, clks[DS3231_CLK_SQW]) ds1307 1326 drivers/rtc/rtc-ds1307.c container_of(clk, struct ds1307, clks[DS3231_CLK_32KHZ]) ds1307 1335 drivers/rtc/rtc-ds1307.c static int ds1337_write_control(struct ds1307 *ds1307, u8 mask, u8 value) ds1307 1337 drivers/rtc/rtc-ds1307.c struct mutex *lock = &ds1307->rtc->ops_lock; ds1307 1341 drivers/rtc/rtc-ds1307.c ret = regmap_update_bits(ds1307->regmap, DS1337_REG_CONTROL, ds1307 1351 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = clk_sqw_to_ds1307(hw); ds1307 1355 drivers/rtc/rtc-ds1307.c ret = regmap_read(ds1307->regmap, DS1337_REG_CONTROL, &control); ds1307 1382 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = clk_sqw_to_ds1307(hw); ds1307 1400 drivers/rtc/rtc-ds1307.c return ds1337_write_control(ds1307, DS1337_BIT_RS1 | DS1337_BIT_RS2, ds1307 1406 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = clk_sqw_to_ds1307(hw); ds1307 1408 drivers/rtc/rtc-ds1307.c return ds1337_write_control(ds1307, DS1337_BIT_INTCN, 0); ds1307 1413 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = clk_sqw_to_ds1307(hw); ds1307 1415 drivers/rtc/rtc-ds1307.c ds1337_write_control(ds1307, DS1337_BIT_INTCN, DS1337_BIT_INTCN); ds1307 1420 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = clk_sqw_to_ds1307(hw); ds1307 1423 drivers/rtc/rtc-ds1307.c ret = regmap_read(ds1307->regmap, DS1337_REG_CONTROL, &control); ds1307 1445 drivers/rtc/rtc-ds1307.c static int ds3231_clk_32khz_control(struct ds1307 *ds1307, bool enable) ds1307 1447 drivers/rtc/rtc-ds1307.c struct mutex *lock = &ds1307->rtc->ops_lock; ds1307 1451 drivers/rtc/rtc-ds1307.c ret = regmap_update_bits(ds1307->regmap, DS1337_REG_STATUS, ds1307 1461 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = clk_32khz_to_ds1307(hw); ds1307 1463 drivers/rtc/rtc-ds1307.c return ds3231_clk_32khz_control(ds1307, true); ds1307 1468 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = clk_32khz_to_ds1307(hw); ds1307 1470 drivers/rtc/rtc-ds1307.c ds3231_clk_32khz_control(ds1307, false); ds1307 1475 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307 = clk_32khz_to_ds1307(hw); ds1307 1478 drivers/rtc/rtc-ds1307.c ret = regmap_read(ds1307->regmap, DS1337_REG_STATUS, &status); ds1307 1503 drivers/rtc/rtc-ds1307.c static int ds3231_clks_register(struct ds1307 *ds1307) ds1307 1505 drivers/rtc/rtc-ds1307.c struct device_node *node = ds1307->dev->of_node; ds1307 1509 drivers/rtc/rtc-ds1307.c onecell = devm_kzalloc(ds1307->dev, sizeof(*onecell), GFP_KERNEL); ds1307 1514 drivers/rtc/rtc-ds1307.c onecell->clks = devm_kcalloc(ds1307->dev, onecell->clk_num, ds1307 1526 drivers/rtc/rtc-ds1307.c if (i == DS3231_CLK_SQW && test_bit(HAS_ALARM, &ds1307->flags)) ds1307 1532 drivers/rtc/rtc-ds1307.c ds1307->clks[i].init = &init; ds1307 1534 drivers/rtc/rtc-ds1307.c onecell->clks[i] = devm_clk_register(ds1307->dev, ds1307 1535 drivers/rtc/rtc-ds1307.c &ds1307->clks[i]); ds1307 1548 drivers/rtc/rtc-ds1307.c static void ds1307_clks_register(struct ds1307 *ds1307) ds1307 1552 drivers/rtc/rtc-ds1307.c if (ds1307->type != ds_3231) ds1307 1555 drivers/rtc/rtc-ds1307.c ret = ds3231_clks_register(ds1307); ds1307 1557 drivers/rtc/rtc-ds1307.c dev_warn(ds1307->dev, "unable to register clock device %d\n", ds1307 1564 drivers/rtc/rtc-ds1307.c static void ds1307_clks_register(struct ds1307 *ds1307) ds1307 1578 drivers/rtc/rtc-ds1307.c struct ds1307 *ds1307; ds1307 1588 drivers/rtc/rtc-ds1307.c ds1307 = devm_kzalloc(&client->dev, sizeof(struct ds1307), GFP_KERNEL); ds1307 1589 drivers/rtc/rtc-ds1307.c if (!ds1307) ds1307 1592 drivers/rtc/rtc-ds1307.c dev_set_drvdata(&client->dev, ds1307); ds1307 1593 drivers/rtc/rtc-ds1307.c ds1307->dev = &client->dev; ds1307 1594 drivers/rtc/rtc-ds1307.c ds1307->name = client->name; ds1307 1596 drivers/rtc/rtc-ds1307.c ds1307->regmap = devm_regmap_init_i2c(client, ®map_config); ds1307 1597 drivers/rtc/rtc-ds1307.c if (IS_ERR(ds1307->regmap)) { ds1307 1598 drivers/rtc/rtc-ds1307.c dev_err(ds1307->dev, "regmap allocation failed\n"); ds1307 1599 drivers/rtc/rtc-ds1307.c return PTR_ERR(ds1307->regmap); ds1307 1602 drivers/rtc/rtc-ds1307.c i2c_set_clientdata(client, ds1307); ds1307 1605 drivers/rtc/rtc-ds1307.c ds1307->type = (enum ds_type) ds1307 1607 drivers/rtc/rtc-ds1307.c chip = &chips[ds1307->type]; ds1307 1610 drivers/rtc/rtc-ds1307.c ds1307->type = id->driver_data; ds1307 1615 drivers/rtc/rtc-ds1307.c ds1307->dev); ds1307 1619 drivers/rtc/rtc-ds1307.c ds1307->type = acpi_id->driver_data; ds1307 1625 drivers/rtc/rtc-ds1307.c trickle_charger_setup = ds1307_trickle_init(ds1307, chip); ds1307 1631 drivers/rtc/rtc-ds1307.c dev_dbg(ds1307->dev, ds1307 1634 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, chip->trickle_charger_reg, ds1307 1652 drivers/rtc/rtc-ds1307.c switch (ds1307->type) { ds1307 1658 drivers/rtc/rtc-ds1307.c err = regmap_bulk_read(ds1307->regmap, DS1337_REG_CONTROL, ds1307 1661 drivers/rtc/rtc-ds1307.c dev_dbg(ds1307->dev, "read error %d\n", err); ds1307 1680 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, DS1337_REG_CONTROL, ds1307 1685 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, DS1337_REG_STATUS, ds1307 1687 drivers/rtc/rtc-ds1307.c dev_warn(ds1307->dev, "SET TIME!\n"); ds1307 1692 drivers/rtc/rtc-ds1307.c err = regmap_bulk_read(ds1307->regmap, ds1307 1695 drivers/rtc/rtc-ds1307.c dev_dbg(ds1307->dev, "read error %d\n", err); ds1307 1702 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, ds1307 1705 drivers/rtc/rtc-ds1307.c dev_warn(ds1307->dev, ds1307 1711 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, ds1307 1714 drivers/rtc/rtc-ds1307.c dev_warn(ds1307->dev, "power-on detected\n"); ds1307 1719 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, ds1307 1722 drivers/rtc/rtc-ds1307.c dev_warn(ds1307->dev, "voltage drop detected\n"); ds1307 1730 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, ds1307 1734 drivers/rtc/rtc-ds1307.c err = regmap_bulk_read(ds1307->regmap, ds1307 1738 drivers/rtc/rtc-ds1307.c dev_dbg(ds1307->dev, "read error %d\n", err); ds1307 1749 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, ds1307 1758 drivers/rtc/rtc-ds1307.c err = regmap_bulk_read(ds1307->regmap, chip->offset, regs, ds1307 1761 drivers/rtc/rtc-ds1307.c dev_dbg(ds1307->dev, "read error %d\n", err); ds1307 1765 drivers/rtc/rtc-ds1307.c if (ds1307->type == mcp794xx && ds1307 1767 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, DS1307_REG_WDAY, ds1307 1773 drivers/rtc/rtc-ds1307.c switch (ds1307->type) { ds1307 1798 drivers/rtc/rtc-ds1307.c regmap_write(ds1307->regmap, chip->offset + DS1307_REG_HOUR, ds1307 1803 drivers/rtc/rtc-ds1307.c device_set_wakeup_capable(ds1307->dev, true); ds1307 1804 drivers/rtc/rtc-ds1307.c set_bit(HAS_ALARM, &ds1307->flags); ds1307 1807 drivers/rtc/rtc-ds1307.c ds1307->rtc = devm_rtc_allocate_device(ds1307->dev); ds1307 1808 drivers/rtc/rtc-ds1307.c if (IS_ERR(ds1307->rtc)) ds1307 1809 drivers/rtc/rtc-ds1307.c return PTR_ERR(ds1307->rtc); ds1307 1812 drivers/rtc/rtc-ds1307.c dev_info(ds1307->dev, ds1307 1815 drivers/rtc/rtc-ds1307.c ds1307->rtc->uie_unsupported = 1; ds1307 1819 drivers/rtc/rtc-ds1307.c err = devm_request_threaded_irq(ds1307->dev, client->irq, NULL, ds1307 1822 drivers/rtc/rtc-ds1307.c ds1307->name, ds1307); ds1307 1825 drivers/rtc/rtc-ds1307.c device_set_wakeup_capable(ds1307->dev, false); ds1307 1826 drivers/rtc/rtc-ds1307.c clear_bit(HAS_ALARM, &ds1307->flags); ds1307 1827 drivers/rtc/rtc-ds1307.c dev_err(ds1307->dev, "unable to request IRQ!\n"); ds1307 1829 drivers/rtc/rtc-ds1307.c dev_dbg(ds1307->dev, "got IRQ %d\n", client->irq); ds1307 1833 drivers/rtc/rtc-ds1307.c ds1307->rtc->ops = chip->rtc_ops ?: &ds13xx_rtc_ops; ds1307 1834 drivers/rtc/rtc-ds1307.c err = ds1307_add_frequency_test(ds1307); ds1307 1838 drivers/rtc/rtc-ds1307.c err = rtc_register_device(ds1307->rtc); ds1307 1850 drivers/rtc/rtc-ds1307.c .priv = ds1307, ds1307 1853 drivers/rtc/rtc-ds1307.c ds1307->rtc->nvram_old_abi = true; ds1307 1854 drivers/rtc/rtc-ds1307.c rtc_nvmem_register(ds1307->rtc, &nvmem_cfg); ds1307 1857 drivers/rtc/rtc-ds1307.c ds1307_hwmon_register(ds1307); ds1307 1858 drivers/rtc/rtc-ds1307.c ds1307_clks_register(ds1307);