Lines Matching +full:irqs +full:- +full:reserved
1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2015-2017, 2022 Intel Corporation. All rights reserved.
144 .irqs = bxtwc_regmap_irqs,
153 .irqs = bxtwc_regmap_irqs_pwrbtn,
162 .irqs = bxtwc_regmap_irqs_tmu,
171 .irqs = bxtwc_regmap_irqs_bcu,
180 .irqs = bxtwc_regmap_irqs_adc,
189 .irqs = bxtwc_regmap_irqs_chgr,
198 .irqs = bxtwc_regmap_irqs_crit,
284 return -EINVAL; in regmap_ipc_byte_reg_read()
295 ret = intel_scu_ipc_dev_command(pmic->scu, PMC_PMIC_ACCESS, in regmap_ipc_byte_reg_read()
314 return -EINVAL; in regmap_ipc_byte_reg_write()
326 return intel_scu_ipc_dev_command(pmic->scu, PMC_PMIC_ACCESS, in regmap_ipc_byte_reg_write()
358 ret = regmap_read(pmic->regmap, bxtwc_reg_addr, &val); in val_show()
378 ret = regmap_write(pmic->regmap, bxtwc_reg_addr, val); in val_store()
421 return dev_err_probe(pmic->dev, irq, "Failed to get parent vIRQ(%d) for chip %s\n", in bxtwc_add_chained_irq_chip()
422 pirq, chip->name); in bxtwc_add_chained_irq_chip()
424 return devm_regmap_add_irq_chip(pmic->dev, pmic->regmap, irq, irq_flags, in bxtwc_add_chained_irq_chip()
430 struct device *dev = &pdev->dev; in bxtwc_probe()
438 return dev_err_probe(dev, -ENODEV, "Failed to get PMIC hardware revision\n"); in bxtwc_probe()
440 return dev_err_probe(dev, -ENODEV, "Invalid PMIC hardware revision: %llu\n", hrv); in bxtwc_probe()
444 return -ENOMEM; in bxtwc_probe()
449 pmic->irq = ret; in bxtwc_probe()
452 pmic->dev = dev; in bxtwc_probe()
454 pmic->scu = devm_intel_scu_ipc_dev_get(dev); in bxtwc_probe()
455 if (!pmic->scu) in bxtwc_probe()
456 return -EPROBE_DEFER; in bxtwc_probe()
458 pmic->regmap = devm_regmap_init(dev, NULL, pmic, &bxtwc_regmap_config); in bxtwc_probe()
459 if (IS_ERR(pmic->regmap)) in bxtwc_probe()
460 return dev_err_probe(dev, PTR_ERR(pmic->regmap), "Failed to initialise regmap\n"); in bxtwc_probe()
462 ret = devm_regmap_add_irq_chip(dev, pmic->regmap, pmic->irq, in bxtwc_probe()
465 &pmic->irq_chip_data); in bxtwc_probe()
469 ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data, in bxtwc_probe()
473 &pmic->irq_chip_data_pwrbtn); in bxtwc_probe()
477 ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data, in bxtwc_probe()
481 &pmic->irq_chip_data_tmu); in bxtwc_probe()
485 /* Add chained IRQ handler for BCU IRQs */ in bxtwc_probe()
486 ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data, in bxtwc_probe()
490 &pmic->irq_chip_data_bcu); in bxtwc_probe()
494 /* Add chained IRQ handler for ADC IRQs */ in bxtwc_probe()
495 ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data, in bxtwc_probe()
499 &pmic->irq_chip_data_adc); in bxtwc_probe()
503 /* Add chained IRQ handler for CHGR IRQs */ in bxtwc_probe()
504 ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data, in bxtwc_probe()
508 &pmic->irq_chip_data_chgr); in bxtwc_probe()
512 /* Add chained IRQ handler for CRIT IRQs */ in bxtwc_probe()
513 ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data, in bxtwc_probe()
517 &pmic->irq_chip_data_crit); in bxtwc_probe()
531 * to re-enable the charger interrupt. in bxtwc_probe()
533 regmap_update_bits(pmic->regmap, BXTWC_MIRQLVL1, BXTWC_MIRQLVL1_MCHGR, 0); in bxtwc_probe()
542 disable_irq(pmic->irq); in bxtwc_shutdown()
549 disable_irq(pmic->irq); in bxtwc_suspend()
558 enable_irq(pmic->irq); in bxtwc_resume()