diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2023-08-07 10:31:06 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2023-08-17 01:55:56 +0300 |
commit | d890cfc25fe9421ffdff3a9ea678172addb36762 (patch) | |
tree | f8b1ece0727a55fed5785d892c5e54b9c8a53d10 /include/linux/platform_data | |
parent | 2cf2a1acc6ebdffc6363de9156db8737f33c1803 (diff) | |
download | linux-d890cfc25fe9421ffdff3a9ea678172addb36762.tar.xz |
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>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r-- | include/linux/platform_data/rtc-ds2404.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/include/linux/platform_data/rtc-ds2404.h b/include/linux/platform_data/rtc-ds2404.h deleted file mode 100644 index 22c53825528f..000000000000 --- a/include/linux/platform_data/rtc-ds2404.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ds2404.h - platform data structure for the DS2404 RTC. - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 2012 Sven Schnelle <svens@stackframe.org> - */ - -#ifndef __LINUX_DS2404_H -#define __LINUX_DS2404_H - -struct ds2404_platform_data { - - unsigned int gpio_rst; - unsigned int gpio_clk; - unsigned int gpio_dq; -}; -#endif |