rtc: ds2404: Convert to GPIO descriptors
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 7 Aug 2023 07:31:06 +0000 (09:31 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 16 Aug 2023 22:55:56 +0000 (00:55 +0200)
commitd890cfc25fe9421ffdff3a9ea678172addb36762
treef8b1ece0727a55fed5785d892c5e54b9c8a53d10
parent2cf2a1acc6ebdffc6363de9156db8737f33c1803
rtc: ds2404: Convert to GPIO descriptors

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: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230807-descriptors-rtc-v1-1-ce0f9187576e@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-ds2404.c
include/linux/platform_data/rtc-ds2404.h [deleted file]