@@ -53,6 +53,7 @@ struct mtk_pmic_keys_regs {
struct mtk_pmic_keys_pdata {
const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT];
u32 pmic_rst_reg;
+ bool has_key_release_irqs;
};
static const struct mtk_pmic_keys_pdata mt6397_pdata = {
@@ -83,6 +84,7 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = {
MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
0x8, MT6358_PSC_TOP_INT_CON0, 0xa),
.pmic_rst_reg = MT6358_TOP_RST_MISC,
+ .has_key_release_irqs = true,
};
struct mtk_pmic_keys_info {
@@ -319,7 +321,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev)
return keys->keys[index].irq;
}
- if (of_device_is_compatible(node, "mediatek,mt6358-keys")) {
+ if (mtk_pmic_keys_pdata->has_key_release_irqs) {
keys->keys[index].irq_r = platform_get_irq_byname(pdev,
irqnames_r[index]);