blob: 49b7bfbc00102ae6ff40ee0d07b63c38ad7eca5a [file] [log] [blame]
Ramon Friede43d8e72018-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 Connolly506eb532023-11-14 12:55:40 +00008#ifndef _PINCTRL_QCOM_H
9#define _PINCTRL_QCOM_H
Ramon Friede43d8e72018-05-16 12:13:40 +030010
Caleb Connollyfabb8972023-11-14 12:55:42 +000011#include <asm/types.h>
12#include <mach/gpio.h>
13
Simon Glass3ba929a2020-10-30 21:38:53 -060014struct udevice;
Ramon Friede43d8e72018-05-16 12:13:40 +030015
16struct msm_pinctrl_data {
Caleb Connollyfabb8972023-11-14 12:55:42 +000017 struct msm_pin_data pin_data;
Ramon Friede43d8e72018-05-16 12:13:40 +030018 int functions_count;
19 const char *(*get_function_name)(struct udevice *dev,
20 unsigned int selector);
Volodymyr Babchukc4cc9792024-03-11 21:33:46 +000021 unsigned int (*get_function_mux)(unsigned int pin,
22 unsigned int selector);
Ramon Friede43d8e72018-05-16 12:13:40 +030023 const char *(*get_pin_name)(struct udevice *dev,
24 unsigned int selector);
25};
26
27struct pinctrl_function {
28 const char *name;
29 int val;
30};
31
Caleb Connolly506eb532023-11-14 12:55:40 +000032extern struct pinctrl_ops msm_pinctrl_ops;
33
34int msm_pinctrl_bind(struct udevice *dev);
Ramon Friede43d8e72018-05-16 12:13:40 +030035
36#endif