mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-30 08:07:59 +00:00
button: qcom-pmic: add support for pmk8350 button configs
Finally add the entries for the qcom,pmk8350-pwrkey and qcom,pmk8350-resin found on PMICs used with SM8350 and later SoCs. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
This commit is contained in:
parent
e3abf220f1
commit
2cb8aebfd2
1 changed files with 15 additions and 0 deletions
|
@ -36,6 +36,8 @@ struct qcom_pmic_btn_priv {
|
||||||
#define PON_INT_RT_STS 0x10
|
#define PON_INT_RT_STS 0x10
|
||||||
#define PON_KPDPWR_N_SET 0
|
#define PON_KPDPWR_N_SET 0
|
||||||
#define PON_RESIN_N_SET 1
|
#define PON_RESIN_N_SET 1
|
||||||
|
#define PON_GEN3_RESIN_N_SET 6
|
||||||
|
#define PON_GEN3_KPDPWR_N_SET 7
|
||||||
|
|
||||||
static enum button_state_t qcom_pwrkey_get_state(struct udevice *dev)
|
static enum button_state_t qcom_pwrkey_get_state(struct udevice *dev)
|
||||||
{
|
{
|
||||||
|
@ -69,6 +71,18 @@ static const struct qcom_pmic_btn_data qcom_pmic_btn_data_table[] = {
|
||||||
.code = KEY_DOWN,
|
.code = KEY_DOWN,
|
||||||
.label = "vol_down",
|
.label = "vol_down",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.compatible = "qcom,pmk8350-pwrkey",
|
||||||
|
.status_bit = PON_GEN3_KPDPWR_N_SET,
|
||||||
|
.code = KEY_ENTER,
|
||||||
|
.label = "pwrkey",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.compatible = "qcom,pmk8350-resin",
|
||||||
|
.status_bit = PON_GEN3_RESIN_N_SET,
|
||||||
|
.code = KEY_DOWN,
|
||||||
|
.label = "vol_down",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct qcom_pmic_btn_data *button_qcom_pmic_match(ofnode node)
|
static const struct qcom_pmic_btn_data *button_qcom_pmic_match(ofnode node)
|
||||||
|
@ -179,6 +193,7 @@ static const struct udevice_id qcom_pwrkey_ids[] = {
|
||||||
{ .compatible = "qcom,pm8916-pon" },
|
{ .compatible = "qcom,pm8916-pon" },
|
||||||
{ .compatible = "qcom,pm8941-pon" },
|
{ .compatible = "qcom,pm8941-pon" },
|
||||||
{ .compatible = "qcom,pm8998-pon" },
|
{ .compatible = "qcom,pm8998-pon" },
|
||||||
|
{ .compatible = "qcom,pmk8350-pon" },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue