#include <linux/device.h>
#include <linux/of.h>
#include <linux/pse-pd/pse.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
static DEFINE_MUTEX(pse_list_mutex);
static LIST_HEAD(pse_controller_list);
struct pse_control { … };
static int of_load_single_pse_pi_pairset(struct device_node *node,
struct pse_pi *pi,
int pairset_num)
{ … }
static int of_load_pse_pi_pairsets(struct device_node *node,
struct pse_pi *pi,
int npairsets)
{ … }
static void pse_release_pis(struct pse_controller_dev *pcdev)
{ … }
static int of_load_pse_pis(struct pse_controller_dev *pcdev)
{ … }
static int pse_pi_is_enabled(struct regulator_dev *rdev)
{ … }
static int pse_pi_enable(struct regulator_dev *rdev)
{ … }
static int pse_pi_disable(struct regulator_dev *rdev)
{ … }
static int _pse_pi_get_voltage(struct regulator_dev *rdev)
{ … }
static int pse_pi_get_voltage(struct regulator_dev *rdev)
{ … }
static int _pse_ethtool_get_status(struct pse_controller_dev *pcdev,
int id,
struct netlink_ext_ack *extack,
struct pse_control_status *status);
static int pse_pi_get_current_limit(struct regulator_dev *rdev)
{ … }
static int pse_pi_set_current_limit(struct regulator_dev *rdev, int min_uA,
int max_uA)
{ … }
static const struct regulator_ops pse_pi_ops = …;
static int
devm_pse_pi_regulator_register(struct pse_controller_dev *pcdev,
char *name, int id)
{ … }
int pse_controller_register(struct pse_controller_dev *pcdev)
{ … }
EXPORT_SYMBOL_GPL(…);
void pse_controller_unregister(struct pse_controller_dev *pcdev)
{ … }
EXPORT_SYMBOL_GPL(…);
static void devm_pse_controller_release(struct device *dev, void *res)
{ … }
int devm_pse_controller_register(struct device *dev,
struct pse_controller_dev *pcdev)
{ … }
EXPORT_SYMBOL_GPL(…);
static void __pse_control_release(struct kref *kref)
{ … }
static void __pse_control_put_internal(struct pse_control *psec)
{ … }
void pse_control_put(struct pse_control *psec)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct pse_control *
pse_control_get_internal(struct pse_controller_dev *pcdev, unsigned int index)
{ … }
static int of_pse_match_pi(struct pse_controller_dev *pcdev,
struct device_node *np)
{ … }
static int psec_id_xlate(struct pse_controller_dev *pcdev,
const struct of_phandle_args *pse_spec)
{ … }
struct pse_control *of_pse_control_get(struct device_node *node)
{ … }
EXPORT_SYMBOL_GPL(…);
static int _pse_ethtool_get_status(struct pse_controller_dev *pcdev,
int id,
struct netlink_ext_ack *extack,
struct pse_control_status *status)
{ … }
int pse_ethtool_get_status(struct pse_control *psec,
struct netlink_ext_ack *extack,
struct pse_control_status *status)
{ … }
EXPORT_SYMBOL_GPL(…);
static int pse_ethtool_c33_set_config(struct pse_control *psec,
const struct pse_control_config *config)
{ … }
static int pse_ethtool_podl_set_config(struct pse_control *psec,
const struct pse_control_config *config)
{ … }
int pse_ethtool_set_config(struct pse_control *psec,
struct netlink_ext_ack *extack,
const struct pse_control_config *config)
{ … }
EXPORT_SYMBOL_GPL(…);
int pse_ethtool_set_pw_limit(struct pse_control *psec,
struct netlink_ext_ack *extack,
const unsigned int pw_limit)
{ … }
EXPORT_SYMBOL_GPL(…);
bool pse_has_podl(struct pse_control *psec)
{ … }
EXPORT_SYMBOL_GPL(…);
bool pse_has_c33(struct pse_control *psec)
{ … }
EXPORT_SYMBOL_GPL(…);