blob: 07f2eae9baeadfd996ab40e021f3ad7da4ecd380 [file] [log] [blame]
Ramon Friedad970512018-05-16 12:13:40 +03001/* 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 Connollyb009e7e2023-11-14 12:55:40 +00008#ifndef _PINCTRL_QCOM_H
9#define _PINCTRL_QCOM_H
Ramon Friedad970512018-05-16 12:13:40 +030010
Caleb Connollya5764ae2023-11-14 12:55:42 +000011#include <asm/types.h>
12#include <mach/gpio.h>
13
Simon Glass401d1c42020-10-30 21:38:53 -060014struct udevice;
Ramon Friedad970512018-05-16 12:13:40 +030015
16struct msm_pinctrl_data {
Caleb Connollya5764ae2023-11-14 12:55:42 +000017 struct msm_pin_data pin_data;
Ramon Friedad970512018-05-16 12:13:40 +030018 int functions_count;
19 const char *(*get_function_name)(struct udevice *dev,
20 unsigned int selector);
21 unsigned int (*get_function_mux)(unsigned int selector);
22 const char *(*get_pin_name)(struct udevice *dev,
23 unsigned int selector);
24};
25
26struct pinctrl_function {
27 const char *name;
28 int val;
29};
30
Caleb Connollyb009e7e2023-11-14 12:55:40 +000031extern struct pinctrl_ops msm_pinctrl_ops;
32
33int msm_pinctrl_bind(struct udevice *dev);
Ramon Friedad970512018-05-16 12:13:40 +030034
35#endif