Message ID | 20250331-qcom-phones-v4-5-f52e57d3b8c6@linaro.org |
---|---|
State | New |
Headers | show |
Series | Better smartphone support (Qualcomm) | expand |
On 31/03/2025 14:23, Caleb Connolly wrote: > Boards using gpio-keys for volume buttons label them "Volume Down", > let's match that here, and make the power button nicer too. > > This simplifies configuring button_cmds in a board-agnostic way. > > Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish > Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci > Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > --- > board/qualcomm/dragonboard410c/dragonboard410c.c | 2 +- > board/qualcomm/dragonboard820c/dragonboard820c.c | 2 +- > drivers/button/button-qcom-pmic.c | 8 ++++---- > 3 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c > index fcbf2c3fe60f21bae1c6d64b542a4d9867c33826..d0d82489f53c4f31b7b08bcf6e4269730027874a 100644 > --- a/board/qualcomm/dragonboard410c/dragonboard410c.c > +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c > @@ -71,9 +71,9 @@ int misc_init_r(void) > struct udevice *btn; > int ret; > enum button_state_t state; > > - ret = button_get_by_label("vol_down", &btn); > + ret = button_get_by_label("Volume Down", &btn); > if (ret < 0) { > printf("Couldn't find power button!\n"); > return ret; > } > diff --git a/board/qualcomm/dragonboard820c/dragonboard820c.c b/board/qualcomm/dragonboard820c/dragonboard820c.c > index d3333a59db01caa940224a99df6b43a3375cacf8..12a9273ec4b9d240bc2eaed2834d5265290153ec 100644 > --- a/board/qualcomm/dragonboard820c/dragonboard820c.c > +++ b/board/qualcomm/dragonboard820c/dragonboard820c.c > @@ -105,9 +105,9 @@ int misc_init_r(void) > struct udevice *btn; > int ret; > enum button_state_t state; > > - ret = button_get_by_label("pwrkey", &btn); > + ret = button_get_by_label("Power Button", &btn); > if (ret < 0) { > printf("Couldn't find power button!\n"); > return ret; > } > diff --git a/drivers/button/button-qcom-pmic.c b/drivers/button/button-qcom-pmic.c > index f9f0948ae095f433e35ecfc0f98741ab1a850742..e3bb9bd758aca819b3a10aac84787e703c55d36a 100644 > --- a/drivers/button/button-qcom-pmic.c > +++ b/drivers/button/button-qcom-pmic.c > @@ -72,27 +72,27 @@ static const struct qcom_pmic_btn_data qcom_pmic_btn_data_table[] = { > { > .compatible = "qcom,pm8941-pwrkey", > .status_bit = PON_KPDPWR_N_SET, > .code = KEY_ENTER, > - .label = "pwrkey", > + .label = "Power Button", > }, > { > .compatible = "qcom,pm8941-resin", > .status_bit = PON_RESIN_N_SET, > .code = KEY_DOWN, > - .label = "vol_down", > + .label = "Volume Down", > }, > { > .compatible = "qcom,pmk8350-pwrkey", > .status_bit = PON_GEN3_KPDPWR_N_SET, > .code = KEY_ENTER, > - .label = "pwrkey", > + .label = "Power Button", > }, > { > .compatible = "qcom,pmk8350-resin", > .status_bit = PON_GEN3_RESIN_N_SET, > .code = KEY_DOWN, > - .label = "vol_down", > + .label = "Volume Down", > }, > }; > > static const struct qcom_pmic_btn_data *button_qcom_pmic_match(ofnode node) > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c index fcbf2c3fe60f21bae1c6d64b542a4d9867c33826..d0d82489f53c4f31b7b08bcf6e4269730027874a 100644 --- a/board/qualcomm/dragonboard410c/dragonboard410c.c +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c @@ -71,9 +71,9 @@ int misc_init_r(void) struct udevice *btn; int ret; enum button_state_t state; - ret = button_get_by_label("vol_down", &btn); + ret = button_get_by_label("Volume Down", &btn); if (ret < 0) { printf("Couldn't find power button!\n"); return ret; } diff --git a/board/qualcomm/dragonboard820c/dragonboard820c.c b/board/qualcomm/dragonboard820c/dragonboard820c.c index d3333a59db01caa940224a99df6b43a3375cacf8..12a9273ec4b9d240bc2eaed2834d5265290153ec 100644 --- a/board/qualcomm/dragonboard820c/dragonboard820c.c +++ b/board/qualcomm/dragonboard820c/dragonboard820c.c @@ -105,9 +105,9 @@ int misc_init_r(void) struct udevice *btn; int ret; enum button_state_t state; - ret = button_get_by_label("pwrkey", &btn); + ret = button_get_by_label("Power Button", &btn); if (ret < 0) { printf("Couldn't find power button!\n"); return ret; } diff --git a/drivers/button/button-qcom-pmic.c b/drivers/button/button-qcom-pmic.c index f9f0948ae095f433e35ecfc0f98741ab1a850742..e3bb9bd758aca819b3a10aac84787e703c55d36a 100644 --- a/drivers/button/button-qcom-pmic.c +++ b/drivers/button/button-qcom-pmic.c @@ -72,27 +72,27 @@ static const struct qcom_pmic_btn_data qcom_pmic_btn_data_table[] = { { .compatible = "qcom,pm8941-pwrkey", .status_bit = PON_KPDPWR_N_SET, .code = KEY_ENTER, - .label = "pwrkey", + .label = "Power Button", }, { .compatible = "qcom,pm8941-resin", .status_bit = PON_RESIN_N_SET, .code = KEY_DOWN, - .label = "vol_down", + .label = "Volume Down", }, { .compatible = "qcom,pmk8350-pwrkey", .status_bit = PON_GEN3_KPDPWR_N_SET, .code = KEY_ENTER, - .label = "pwrkey", + .label = "Power Button", }, { .compatible = "qcom,pmk8350-resin", .status_bit = PON_GEN3_RESIN_N_SET, .code = KEY_DOWN, - .label = "vol_down", + .label = "Volume Down", }, }; static const struct qcom_pmic_btn_data *button_qcom_pmic_match(ofnode node)