1. 16 Aug, 2023 2 commits
    • Linus Walleij's avatar
      rtc: ds2404: Convert to GPIO descriptors · d890cfc2
      Linus Walleij authored
      This converts the DS2404 to use GPIO descriptors instead of
      hard-coded global GPIO numbers.
      
      The platform data can be deleted because there are no in-tree
      users and it only contained GPIO numbers which are now
      passed using descriptor tables (or device tree or ACPI).
      
      The driver was rewritten to use a state container for the
      device driver state (struct ds2404 *chip) and pass that
      around instead of using a global singleton storage for the
      GPIO handles.
      
      When declaring GPIO descriptor tables or other hardware
      descriptions for the RTC driver, implementers should take care
      to flag the RESET line as active low, such as by using the
      GPIOD_ACTIVE_LOW flag in the descriptor table.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Link: https://lore.kernel.org/r/20230807-descriptors-rtc-v1-1-ce0f9187576e@linaro.orgSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      d890cfc2
    • Nathan Chancellor's avatar
      rtc: stm32: Use NOIRQ_SYSTEM_SLEEP_PM_OPS() · 2cf2a1ac
      Nathan Chancellor authored
      After the switch to SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and a subsequent
      fix, stm32_rtc_{suspend,resume}() are unused when CONFIG_PM_SLEEP is not
      set because SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() is a no-op in that
      configuration:
      
        drivers/rtc/rtc-stm32.c:904:12: error: 'stm32_rtc_resume' defined but not used [-Werror=unused-function]
          904 | static int stm32_rtc_resume(struct device *dev)
              |            ^~~~~~~~~~~~~~~~
        drivers/rtc/rtc-stm32.c:894:12: error: 'stm32_rtc_suspend' defined but not used [-Werror=unused-function]
          894 | static int stm32_rtc_suspend(struct device *dev)
              |            ^~~~~~~~~~~~~~~~~
        cc1: all warnings being treated as errors
      
      The non-"SET_" version of this macro, NOIRQ_SYSTEM_SLEEP_PM_OPS(), is
      designed to handle this situation by only assigning the callbacks when
      CONFIG_PM_SLEEP is set while allowing the functions to appear used to
      the compiler. Switch to that macro to resolve the warnings. There is no
      functional change with this, as SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() is
      defined using NOIRQ_SYSTEM_SLEEP_PM_OPS() when CONFIG_PM_SLEEP is set.
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20230815-rtc-stm32-unused-pm-funcs-v1-1-82eb8e02d903@kernel.orgSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      2cf2a1ac
  2. 15 Aug, 2023 12 commits
  3. 10 Aug, 2023 3 commits
  4. 27 Jul, 2023 23 commits