Ramon Fried | e43d8e7 | 2018-05-16 12:13:40 +0300 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Qualcomm Pin control |
| 4 | * |
| 5 | * (C) Copyright 2018 Ramon Fried <ramon.fried@gmail.com> |
| 6 | * |
| 7 | */ |
Caleb Connolly | 506eb53 | 2023-11-14 12:55:40 +0000 | [diff] [blame] | 8 | #ifndef _PINCTRL_QCOM_H |
| 9 | #define _PINCTRL_QCOM_H |
Ramon Fried | e43d8e7 | 2018-05-16 12:13:40 +0300 | [diff] [blame] | 10 | |
Caleb Connolly | fabb897 | 2023-11-14 12:55:42 +0000 | [diff] [blame] | 11 | #include <asm/types.h> |
| 12 | #include <mach/gpio.h> |
| 13 | |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 14 | struct udevice; |
Ramon Fried | e43d8e7 | 2018-05-16 12:13:40 +0300 | [diff] [blame] | 15 | |
| 16 | struct msm_pinctrl_data { |
Caleb Connolly | fabb897 | 2023-11-14 12:55:42 +0000 | [diff] [blame] | 17 | struct msm_pin_data pin_data; |
Ramon Fried | e43d8e7 | 2018-05-16 12:13:40 +0300 | [diff] [blame] | 18 | int functions_count; |
| 19 | const char *(*get_function_name)(struct udevice *dev, |
| 20 | unsigned int selector); |
Volodymyr Babchuk | c4cc979 | 2024-03-11 21:33:46 +0000 | [diff] [blame] | 21 | unsigned int (*get_function_mux)(unsigned int pin, |
| 22 | unsigned int selector); |
Ramon Fried | e43d8e7 | 2018-05-16 12:13:40 +0300 | [diff] [blame] | 23 | const char *(*get_pin_name)(struct udevice *dev, |
| 24 | unsigned int selector); |
| 25 | }; |
| 26 | |
| 27 | struct pinctrl_function { |
| 28 | const char *name; |
| 29 | int val; |
| 30 | }; |
| 31 | |
Caleb Connolly | 506eb53 | 2023-11-14 12:55:40 +0000 | [diff] [blame] | 32 | extern struct pinctrl_ops msm_pinctrl_ops; |
| 33 | |
| 34 | int msm_pinctrl_bind(struct udevice *dev); |
Ramon Fried | e43d8e7 | 2018-05-16 12:13:40 +0300 | [diff] [blame] | 35 | |
| 36 | #endif |