mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge tag 'ASB-2025-02-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
https://source.android.com/docs/security/bulletin/2025-02-01 CVE-2024-53104 CVE-2025-0088 * tag 'ASB-2025-02-05_11-5.4' of https://android.googlesource.com/kernel/common: (449 commits) ANDROID: gki - change networking configuration ANDROID: kernelci build-break for 64-bit riscv clang builds (5.4 only) Revert "BACKPORT: RISC-V: Stop relying on GCC's register allocator's hueristics" Revert "ANDROID: declare sp_in_global outside of CONFIG_FRAME_POINTER" ANDROID: GKI: add Trimble symbol list UPSTREAM: selinux: ignore unknown extended permissions ANDROID: ABI: Update allowed list for galaxy Revert "netfilter: Replace zero-length array with flexible-array member" Revert "tracing: Constify string literal data member in struct trace_event_call" Revert "skb_expand_head() adjust skb->truesize incorrectly" Linux 5.4.289 ftrace: use preempt_enable/disable notrace macros to avoid double fault mm: vmscan: account for free pages to prevent infinite Loop in throttle_direct_reclaim() drm: adv7511: Drop dsi single lane support net/sctp: Prevent autoclose integer overflow in sctp_association_init() sky2: Add device ID 11ab:4373 for Marvell 88E8075 pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking RDMA/uverbs: Prevent integer overflow issue modpost: fix the missed iteration for the max bit in do_input() modpost: fix input MODULE_DEVICE_TABLE() built for 64-bit on 32-bit host ... Conflicts: arch/arm64/boot/dts/vendor/bindings/clock/adi,axi-clkgen.yaml arch/arm64/boot/dts/vendor/bindings/clock/axi-clkgen.txt drivers/rpmsg/qcom_glink_native.c drivers/soc/qcom/socinfo.c Change-Id: I60727e0cdd974fda5ca71f938bc2f984a8bbf19a
This commit is contained in:
commit
b9715311a2
397 changed files with 5082 additions and 4013 deletions
|
|
@ -37,7 +37,7 @@ static int da9052_spi_probe(struct spi_device *spi)
|
|||
spi_set_drvdata(spi, da9052);
|
||||
|
||||
config = da9052_regmap_config;
|
||||
config.read_flag_mask = 1;
|
||||
config.write_flag_mask = 1;
|
||||
config.reg_bits = 7;
|
||||
config.pad_bits = 1;
|
||||
config.val_bits = 8;
|
||||
|
|
|
|||
|
|
@ -226,16 +226,46 @@ static struct resource tmu_resources[] = {
|
|||
};
|
||||
|
||||
static struct mfd_cell bxt_wc_dev[] = {
|
||||
{
|
||||
.name = "bxt_wcove_gpadc",
|
||||
.num_resources = ARRAY_SIZE(adc_resources),
|
||||
.resources = adc_resources,
|
||||
},
|
||||
{
|
||||
.name = "bxt_wcove_thermal",
|
||||
.num_resources = ARRAY_SIZE(thermal_resources),
|
||||
.resources = thermal_resources,
|
||||
},
|
||||
{
|
||||
.name = "bxt_wcove_gpio",
|
||||
.num_resources = ARRAY_SIZE(gpio_resources),
|
||||
.resources = gpio_resources,
|
||||
},
|
||||
{
|
||||
.name = "bxt_wcove_region",
|
||||
},
|
||||
};
|
||||
|
||||
static const struct mfd_cell bxt_wc_tmu_dev[] = {
|
||||
{
|
||||
.name = "bxt_wcove_tmu",
|
||||
.num_resources = ARRAY_SIZE(tmu_resources),
|
||||
.resources = tmu_resources,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct mfd_cell bxt_wc_bcu_dev[] = {
|
||||
{
|
||||
.name = "bxt_wcove_bcu",
|
||||
.num_resources = ARRAY_SIZE(bcu_resources),
|
||||
.resources = bcu_resources,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct mfd_cell bxt_wc_adc_dev[] = {
|
||||
{
|
||||
.name = "bxt_wcove_gpadc",
|
||||
.num_resources = ARRAY_SIZE(adc_resources),
|
||||
.resources = adc_resources,
|
||||
},
|
||||
};
|
||||
|
||||
static struct mfd_cell bxt_wc_chgr_dev[] = {
|
||||
{
|
||||
.name = "bxt_wcove_usbc",
|
||||
.num_resources = ARRAY_SIZE(usbc_resources),
|
||||
|
|
@ -246,25 +276,6 @@ static struct mfd_cell bxt_wc_dev[] = {
|
|||
.num_resources = ARRAY_SIZE(charger_resources),
|
||||
.resources = charger_resources,
|
||||
},
|
||||
{
|
||||
.name = "bxt_wcove_bcu",
|
||||
.num_resources = ARRAY_SIZE(bcu_resources),
|
||||
.resources = bcu_resources,
|
||||
},
|
||||
{
|
||||
.name = "bxt_wcove_tmu",
|
||||
.num_resources = ARRAY_SIZE(tmu_resources),
|
||||
.resources = tmu_resources,
|
||||
},
|
||||
|
||||
{
|
||||
.name = "bxt_wcove_gpio",
|
||||
.num_resources = ARRAY_SIZE(gpio_resources),
|
||||
.resources = gpio_resources,
|
||||
},
|
||||
{
|
||||
.name = "bxt_wcove_region",
|
||||
},
|
||||
};
|
||||
|
||||
static int regmap_ipc_byte_reg_read(void *context, unsigned int reg,
|
||||
|
|
@ -414,19 +425,37 @@ static int bxtwc_add_chained_irq_chip(struct intel_soc_pmic *pmic,
|
|||
int irq;
|
||||
|
||||
irq = regmap_irq_get_virq(pdata, pirq);
|
||||
if (irq < 0) {
|
||||
dev_err(pmic->dev,
|
||||
"Failed to get parent vIRQ(%d) for chip %s, ret:%d\n",
|
||||
pirq, chip->name, irq);
|
||||
return irq;
|
||||
}
|
||||
if (irq < 0)
|
||||
return dev_err_probe(pmic->dev, irq, "Failed to get parent vIRQ(%d) for chip %s\n",
|
||||
pirq, chip->name);
|
||||
|
||||
return devm_regmap_add_irq_chip(pmic->dev, pmic->regmap, irq, irq_flags,
|
||||
0, chip, data);
|
||||
}
|
||||
|
||||
static int bxtwc_add_chained_devices(struct intel_soc_pmic *pmic,
|
||||
const struct mfd_cell *cells, int n_devs,
|
||||
struct regmap_irq_chip_data *pdata,
|
||||
int pirq, int irq_flags,
|
||||
const struct regmap_irq_chip *chip,
|
||||
struct regmap_irq_chip_data **data)
|
||||
{
|
||||
struct device *dev = pmic->dev;
|
||||
struct irq_domain *domain;
|
||||
int ret;
|
||||
|
||||
ret = bxtwc_add_chained_irq_chip(pmic, pdata, pirq, irq_flags, chip, data);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Failed to add %s IRQ chip\n", chip->name);
|
||||
|
||||
domain = regmap_irq_get_domain(*data);
|
||||
|
||||
return devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, cells, n_devs, NULL, 0, domain);
|
||||
}
|
||||
|
||||
static int bxtwc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
int ret;
|
||||
acpi_handle handle;
|
||||
acpi_status status;
|
||||
|
|
@ -435,15 +464,10 @@ static int bxtwc_probe(struct platform_device *pdev)
|
|||
|
||||
handle = ACPI_HANDLE(&pdev->dev);
|
||||
status = acpi_evaluate_integer(handle, "_HRV", NULL, &hrv);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
dev_err(&pdev->dev, "Failed to get PMIC hardware revision\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
if (hrv != BROXTON_PMIC_WC_HRV) {
|
||||
dev_err(&pdev->dev, "Invalid PMIC hardware revision: %llu\n",
|
||||
hrv);
|
||||
return -ENODEV;
|
||||
}
|
||||
if (ACPI_FAILURE(status))
|
||||
return dev_err_probe(dev, -ENODEV, "Failed to get PMIC hardware revision\n");
|
||||
if (hrv != BROXTON_PMIC_WC_HRV)
|
||||
return dev_err_probe(dev, -ENODEV, "Invalid PMIC hardware revision: %llu\n", hrv);
|
||||
|
||||
pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
|
||||
if (!pmic)
|
||||
|
|
@ -459,79 +483,59 @@ static int bxtwc_probe(struct platform_device *pdev)
|
|||
|
||||
pmic->regmap = devm_regmap_init(&pdev->dev, NULL, pmic,
|
||||
&bxtwc_regmap_config);
|
||||
if (IS_ERR(pmic->regmap)) {
|
||||
ret = PTR_ERR(pmic->regmap);
|
||||
dev_err(&pdev->dev, "Failed to initialise regmap: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
if (IS_ERR(pmic->regmap))
|
||||
return dev_err_probe(dev, PTR_ERR(pmic->regmap), "Failed to initialise regmap\n");
|
||||
|
||||
ret = devm_regmap_add_irq_chip(&pdev->dev, pmic->regmap, pmic->irq,
|
||||
IRQF_ONESHOT | IRQF_SHARED,
|
||||
0, &bxtwc_regmap_irq_chip,
|
||||
&pmic->irq_chip_data);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to add IRQ chip\n");
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Failed to add IRQ chip\n");
|
||||
|
||||
ret = bxtwc_add_chained_devices(pmic, bxt_wc_tmu_dev, ARRAY_SIZE(bxt_wc_tmu_dev),
|
||||
pmic->irq_chip_data,
|
||||
BXTWC_TMU_LVL1_IRQ,
|
||||
IRQF_ONESHOT,
|
||||
&bxtwc_regmap_irq_chip_tmu,
|
||||
&pmic->irq_chip_data_tmu);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
|
||||
BXTWC_PWRBTN_LVL1_IRQ,
|
||||
IRQF_ONESHOT,
|
||||
&bxtwc_regmap_irq_chip_pwrbtn,
|
||||
&pmic->irq_chip_data_pwrbtn);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to add PWRBTN IRQ chip\n");
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Failed to add PWRBTN IRQ chip\n");
|
||||
|
||||
ret = bxtwc_add_chained_devices(pmic, bxt_wc_bcu_dev, ARRAY_SIZE(bxt_wc_bcu_dev),
|
||||
pmic->irq_chip_data,
|
||||
BXTWC_BCU_LVL1_IRQ,
|
||||
IRQF_ONESHOT,
|
||||
&bxtwc_regmap_irq_chip_bcu,
|
||||
&pmic->irq_chip_data_bcu);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
|
||||
BXTWC_TMU_LVL1_IRQ,
|
||||
IRQF_ONESHOT,
|
||||
&bxtwc_regmap_irq_chip_tmu,
|
||||
&pmic->irq_chip_data_tmu);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to add TMU IRQ chip\n");
|
||||
ret = bxtwc_add_chained_devices(pmic, bxt_wc_adc_dev, ARRAY_SIZE(bxt_wc_adc_dev),
|
||||
pmic->irq_chip_data,
|
||||
BXTWC_ADC_LVL1_IRQ,
|
||||
IRQF_ONESHOT,
|
||||
&bxtwc_regmap_irq_chip_adc,
|
||||
&pmic->irq_chip_data_adc);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Add chained IRQ handler for BCU IRQs */
|
||||
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
|
||||
BXTWC_BCU_LVL1_IRQ,
|
||||
IRQF_ONESHOT,
|
||||
&bxtwc_regmap_irq_chip_bcu,
|
||||
&pmic->irq_chip_data_bcu);
|
||||
|
||||
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to add BUC IRQ chip\n");
|
||||
ret = bxtwc_add_chained_devices(pmic, bxt_wc_chgr_dev, ARRAY_SIZE(bxt_wc_chgr_dev),
|
||||
pmic->irq_chip_data,
|
||||
BXTWC_CHGR_LVL1_IRQ,
|
||||
IRQF_ONESHOT,
|
||||
&bxtwc_regmap_irq_chip_chgr,
|
||||
&pmic->irq_chip_data_chgr);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Add chained IRQ handler for ADC IRQs */
|
||||
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
|
||||
BXTWC_ADC_LVL1_IRQ,
|
||||
IRQF_ONESHOT,
|
||||
&bxtwc_regmap_irq_chip_adc,
|
||||
&pmic->irq_chip_data_adc);
|
||||
|
||||
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to add ADC IRQ chip\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Add chained IRQ handler for CHGR IRQs */
|
||||
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
|
||||
BXTWC_CHGR_LVL1_IRQ,
|
||||
IRQF_ONESHOT,
|
||||
&bxtwc_regmap_irq_chip_chgr,
|
||||
&pmic->irq_chip_data_chgr);
|
||||
|
||||
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to add CHGR IRQ chip\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Add chained IRQ handler for CRIT IRQs */
|
||||
ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
|
||||
|
|
@ -539,19 +543,13 @@ static int bxtwc_probe(struct platform_device *pdev)
|
|||
IRQF_ONESHOT,
|
||||
&bxtwc_regmap_irq_chip_crit,
|
||||
&pmic->irq_chip_data_crit);
|
||||
|
||||
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to add CRIT IRQ chip\n");
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Failed to add CRIT IRQ chip\n");
|
||||
|
||||
ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, bxt_wc_dev,
|
||||
ARRAY_SIZE(bxt_wc_dev), NULL, 0, NULL);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to add devices\n");
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Failed to add devices\n");
|
||||
|
||||
ret = sysfs_create_group(&pdev->dev.kobj, &bxtwc_group);
|
||||
if (ret) {
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ static int rt5033_i2c_probe(struct i2c_client *i2c,
|
|||
}
|
||||
dev_info(&i2c->dev, "Device found Device ID: %04x\n", dev_id);
|
||||
|
||||
ret = regmap_add_irq_chip(rt5033->regmap, rt5033->irq,
|
||||
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
|
||||
ret = devm_regmap_add_irq_chip(rt5033->dev, rt5033->regmap,
|
||||
rt5033->irq, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
|
||||
0, &rt5033_irq_chip, &rt5033->irq_data);
|
||||
if (ret) {
|
||||
dev_err(&i2c->dev, "Failed to request IRQ %d: %d\n",
|
||||
|
|
|
|||
|
|
@ -550,17 +550,13 @@ static int tps65010_probe(struct i2c_client *client,
|
|||
*/
|
||||
if (client->irq > 0) {
|
||||
status = request_irq(client->irq, tps65010_irq,
|
||||
IRQF_TRIGGER_FALLING, DRIVER_NAME, tps);
|
||||
IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN,
|
||||
DRIVER_NAME, tps);
|
||||
if (status < 0) {
|
||||
dev_dbg(&client->dev, "can't get IRQ %d, err %d\n",
|
||||
client->irq, status);
|
||||
return status;
|
||||
}
|
||||
/* annoying race here, ideally we'd have an option
|
||||
* to claim the irq now and enable it later.
|
||||
* FIXME genirq IRQF_NOAUTOEN now solves that ...
|
||||
*/
|
||||
disable_irq(client->irq);
|
||||
set_bit(FLAG_IRQ_ENABLE, &tps->flags);
|
||||
} else
|
||||
dev_warn(&client->dev, "IRQ not configured!\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue