mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
58ef4ece1e
The PMIC GLINK service runs on one of the co-processors of some modern Qualcomm platforms and implements USB-C and battery managements. It uses a message based protocol over GLINK for communication with the OS, hence the name. The driver implemented provides the rpmsg device for communication and uses auxiliary bus to spawn off individual devices in respective subsystem. The auxiliary devices are spawned off from a platform_device, so that the drm_bridge is available early, to allow the DisplayPort driver to probe even before the remoteproc has spun up. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org> # SM8350 PDX215 Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-MTP & SM8450-HDK Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230201041853.1934355-3-quic_bjorande@quicinc.com
32 lines
751 B
C
32 lines
751 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2022, Linaro Ltd
|
|
*/
|
|
#ifndef __SOC_QCOM_PMIC_GLINK_H__
|
|
#define __SOC_QCOM_PMIC_GLINK_H__
|
|
|
|
struct pmic_glink;
|
|
struct pmic_glink_client;
|
|
|
|
#define PMIC_GLINK_OWNER_BATTMGR 32778
|
|
#define PMIC_GLINK_OWNER_USBC 32779
|
|
#define PMIC_GLINK_OWNER_USBC_PAN 32780
|
|
|
|
#define PMIC_GLINK_REQ_RESP 1
|
|
#define PMIC_GLINK_NOTIFY 2
|
|
|
|
struct pmic_glink_hdr {
|
|
__le32 owner;
|
|
__le32 type;
|
|
__le32 opcode;
|
|
};
|
|
|
|
int pmic_glink_send(struct pmic_glink_client *client, void *data, size_t len);
|
|
|
|
struct pmic_glink_client *devm_pmic_glink_register_client(struct device *dev,
|
|
unsigned int id,
|
|
void (*cb)(const void *, size_t, void *),
|
|
void (*pdr)(void *, int),
|
|
void *priv);
|
|
|
|
#endif
|