#ifndef _PINCTRL_SOPHGO_CV18XX_H
#define _PINCTRL_SOPHGO_CV18XX_H
#include <linux/bits.h>
#include <linux/bitfield.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinconf.h>
enum cv1800_pin_io_type { … };
#define CV1800_PINCONF_AREA_SYS …
#define CV1800_PINCONF_AREA_RTC …
struct cv1800_pinmux { … };
struct cv1800_pinmux2 { … };
struct cv1800_pinconf { … };
#define CV1800_PIN_HAVE_MUX2 …
#define CV1800_PIN_IO_TYPE …
#define CV1800_PIN_FLAG_IO_TYPE(type) …
struct cv1800_pin { … };
#define PIN_POWER_STATE_1V8 …
#define PIN_POWER_STATE_3V3 …
struct cv1800_vddio_cfg_ops { … };
struct cv1800_pinctrl_data { … };
static inline enum cv1800_pin_io_type cv1800_pin_io_type(struct cv1800_pin *pin)
{
return FIELD_GET(CV1800_PIN_IO_TYPE, pin->flags);
};
int cv1800_pinctrl_probe(struct platform_device *pdev);
#define CV1800_FUNC_PIN(_id, _power_domain, _type, \
_mux_area, _mux_offset, _mux_func_max) …
#define CV1800_GENERAL_PIN(_id, _power_domain, _type, \
_mux_area, _mux_offset, _mux_func_max, \
_conf_area, _conf_offset) …
#define CV1800_GENERATE_PIN_MUX2(_id, _power_domain, _type, \
_mux_area, _mux_offset, _mux_func_max, \
_mux2_area, _mux2_offset, \
_mux2_func_max, \
_conf_area, _conf_offset) …
#endif