mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
platform-drivers-x86 for 4.10-2
Move and add registration for the mlx-platform driver. Introduce button and lid drivers for the surface3 (different from the surface3-pro). Add BXT PMIC TMU support. Add Y700 to existing ideapad-laptop quirk. ideapad-laptop: - Add Y700 15-ACZ to no_hw_rfkill DMI list surface3_button: - Introduce button support for the Surface 3 surface3-wmi: - Add custom surface3 platform device for controlling LID - Balance locking on error path mlx-platform: - Add mlxcpld-hotplug driver registration - Fix semicolon.cocci warnings - Move module from arch/x86 platform/x86: - Add Whiskey Cove PMIC TMU support -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJYVxXxAAoJEKbMaAwKp364mDAIAL750zoO/liY1qfFGktkY2zS xknJqh4UeIVW6iN9hEq7jQD3jkFl7hNuXgFyogLZgJQge8gfufsOD7ljkhp2wVF2 3Ir437f4GdcUeuhO6PwuPZnn++Y6oH2rLZc1d+5anZRikW470tnXitrXs5hsqG57 74KiSFa+v+Uj1kqU4Gjt0QDSfmQc185Wn5xieHPpZrcjDaut+N4t06+MDMcH7fjk 6nJ+tvo/dreZojA+AklljaNB2BioIGbEOGamnxOJ9Rjs0jV2d0A1c/6XBHDe+Xtu SkWqvjdrLOSxAjErBpB97VYnYihjCDXfl+DIABOdumGO6hJz01DvbZ+VVLwGM0E= =YH31 -----END PGP SIGNATURE----- Merge tag 'platform-drivers-x86-v4.10-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull more x86 platform driver updates from Darren Hart: "Move and add registration for the mlx-platform driver. Introduce button and lid drivers for the surface3 (different from the surface3-pro). Add BXT PMIC TMU support. Add Y700 to existing ideapad-laptop quirk. Summary: ideapad-laptop: - Add Y700 15-ACZ to no_hw_rfkill DMI list surface3_button: - Introduce button support for the Surface 3 surface3-wmi: - Add custom surface3 platform device for controlling LID - Balance locking on error path mlx-platform: - Add mlxcpld-hotplug driver registration - Fix semicolon.cocci warnings - Move module from arch/x86 platform/x86: - Add Whiskey Cove PMIC TMU support" * tag 'platform-drivers-x86-v4.10-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: platform/x86: surface3-wmi: Balance locking on error path platform/x86: Add Whiskey Cove PMIC TMU support platform/x86: ideapad-laptop: Add Y700 15-ACZ to no_hw_rfkill DMI list platform/x86: Introduce button support for the Surface 3 platform/x86: Add custom surface3 platform device for controlling LID platform/x86: mlx-platform: Add mlxcpld-hotplug driver registration platform/x86: mlx-platform: Fix semicolon.cocci warnings platform/x86: mlx-platform: Move module from arch/x86
This commit is contained in:
commit
8421c60446
13 changed files with 897 additions and 19 deletions
|
|
@ -42,6 +42,7 @@
|
|||
#define BXTWC_GPIOIRQ0 0x4E0B
|
||||
#define BXTWC_GPIOIRQ1 0x4E0C
|
||||
#define BXTWC_CRITIRQ 0x4E0D
|
||||
#define BXTWC_TMUIRQ 0x4FB6
|
||||
|
||||
/* Interrupt MASK Registers */
|
||||
#define BXTWC_MIRQLVL1 0x4E0E
|
||||
|
|
@ -59,6 +60,7 @@
|
|||
#define BXTWC_MGPIO0IRQ 0x4E19
|
||||
#define BXTWC_MGPIO1IRQ 0x4E1A
|
||||
#define BXTWC_MCRITIRQ 0x4E1B
|
||||
#define BXTWC_MTMUIRQ 0x4FB7
|
||||
|
||||
/* Whiskey Cove PMIC share same ACPI ID between different platforms */
|
||||
#define BROXTON_PMIC_WC_HRV 4
|
||||
|
|
@ -92,6 +94,7 @@ enum bxtwc_irqs_level2 {
|
|||
BXTWC_GPIO0_IRQ,
|
||||
BXTWC_GPIO1_IRQ,
|
||||
BXTWC_CRIT_IRQ,
|
||||
BXTWC_TMU_IRQ,
|
||||
};
|
||||
|
||||
static const struct regmap_irq bxtwc_regmap_irqs[] = {
|
||||
|
|
@ -120,6 +123,10 @@ static const struct regmap_irq bxtwc_regmap_irqs_level2[] = {
|
|||
REGMAP_IRQ_REG(BXTWC_CRIT_IRQ, 9, 0x03),
|
||||
};
|
||||
|
||||
static const struct regmap_irq bxtwc_regmap_irqs_tmu[] = {
|
||||
REGMAP_IRQ_REG(BXTWC_TMU_IRQ, 0, 0x06),
|
||||
};
|
||||
|
||||
static struct regmap_irq_chip bxtwc_regmap_irq_chip = {
|
||||
.name = "bxtwc_irq_chip",
|
||||
.status_base = BXTWC_IRQLVL1,
|
||||
|
|
@ -138,6 +145,15 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_level2 = {
|
|||
.num_regs = 10,
|
||||
};
|
||||
|
||||
static struct regmap_irq_chip bxtwc_regmap_irq_chip_tmu = {
|
||||
.name = "bxtwc_irq_chip_tmu",
|
||||
.status_base = BXTWC_TMUIRQ,
|
||||
.mask_base = BXTWC_MTMUIRQ,
|
||||
.irqs = bxtwc_regmap_irqs_tmu,
|
||||
.num_irqs = ARRAY_SIZE(bxtwc_regmap_irqs_tmu),
|
||||
.num_regs = 1,
|
||||
};
|
||||
|
||||
static struct resource gpio_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(BXTWC_GPIO0_IRQ, "GPIO0"),
|
||||
DEFINE_RES_IRQ_NAMED(BXTWC_GPIO1_IRQ, "GPIO1"),
|
||||
|
|
@ -166,6 +182,10 @@ static struct resource bcu_resources[] = {
|
|||
DEFINE_RES_IRQ_NAMED(BXTWC_BCU_IRQ, "BCU"),
|
||||
};
|
||||
|
||||
static struct resource tmu_resources[] = {
|
||||
DEFINE_RES_IRQ_NAMED(BXTWC_TMU_IRQ, "TMU"),
|
||||
};
|
||||
|
||||
static struct mfd_cell bxt_wc_dev[] = {
|
||||
{
|
||||
.name = "bxt_wcove_gpadc",
|
||||
|
|
@ -192,6 +212,12 @@ static struct mfd_cell bxt_wc_dev[] = {
|
|||
.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),
|
||||
|
|
@ -402,6 +428,15 @@ static int bxtwc_probe(struct platform_device *pdev)
|
|||
goto err_irq_chip_level2;
|
||||
}
|
||||
|
||||
ret = regmap_add_irq_chip(pmic->regmap, pmic->irq,
|
||||
IRQF_ONESHOT | IRQF_SHARED,
|
||||
0, &bxtwc_regmap_irq_chip_tmu,
|
||||
&pmic->irq_chip_data_tmu);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to add TMU IRQ chip\n");
|
||||
goto err_irq_chip_tmu;
|
||||
}
|
||||
|
||||
ret = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, bxt_wc_dev,
|
||||
ARRAY_SIZE(bxt_wc_dev), NULL, 0,
|
||||
NULL);
|
||||
|
|
@ -431,6 +466,8 @@ static int bxtwc_probe(struct platform_device *pdev)
|
|||
err_sysfs:
|
||||
mfd_remove_devices(&pdev->dev);
|
||||
err_mfd:
|
||||
regmap_del_irq_chip(pmic->irq, pmic->irq_chip_data_tmu);
|
||||
err_irq_chip_tmu:
|
||||
regmap_del_irq_chip(pmic->irq, pmic->irq_chip_data_level2);
|
||||
err_irq_chip_level2:
|
||||
regmap_del_irq_chip(pmic->irq, pmic->irq_chip_data);
|
||||
|
|
@ -446,6 +483,7 @@ static int bxtwc_remove(struct platform_device *pdev)
|
|||
mfd_remove_devices(&pdev->dev);
|
||||
regmap_del_irq_chip(pmic->irq, pmic->irq_chip_data);
|
||||
regmap_del_irq_chip(pmic->irq, pmic->irq_chip_data_level2);
|
||||
regmap_del_irq_chip(pmic->irq, pmic->irq_chip_data_tmu);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue