- New Drivers

- Add support for Intel's Platform Monitoring Technology (PMT)
 
  - New Device Support
    - Add support for PM660/PM660L to QCom SPMI PMIC
    - Add support for lots of new devices to Kontron Core
 
  - New Functionality
    - Provide syscon_regmap_lookup_by_phandle_optional() to SysCon API
 
  - Fix-ups
    - Constify; da9xxx-core; intel_*, tps65xxx, wm8xxx-core, lp8788,
                stmpe, sun4i-gpadc, 88pm800, hi655x-pmic, ioc3, etc
    - Remove superfluous code; madera, tps65910
    - Use raw APIs (rid abstractions); tps65911-comparator, tps65910
    - Whitespace/formatting fix-ups; tps65910
    - Device Tree changes/updates; bd71837-pmic, syscon
    - Use helpers/APIs (no hand rolling); altera-sysmgr
    - Mark of_match tables as __maybe_unused; twl6030-irq
    - Fix spelling; si476x-core
 
  - Bug Fixes
    - Reset on resume to ensure known state; madera-core
    - Correct ordering issues; madera-core, tps65910, kempld-core
    - Remove erroneous passing of of_compatible strings; at91-usart
    - Fix potential I2C adaptor leak; htc-i2cpld
    - Correct errorneous defines; rt5033-private
    - Resolve Kconfig issues; MFD_SL28CPLD, MFD_OMAP_USB_HOST
    - Fix dev_err_probe() handling; stmfx
    - Repair interrupt regression; motorola-cpcap
    - Allow ACPI matching of DT tables; bcm590xx, da9xx, ene-kb3930,
                                        fsl-imx25-tsadc, max77650,
 				       mt6397-core, rt5033, stmfx,
 				       max77686, sun4i-gpadc,
 				       wm8994-core, axp20x-i2c
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAl/ZunYACgkQUa+KL4f8
 d2GDQhAAj8ykIJOerbw8wxO/Lt4jCsbrqIX0/fnKfmDTuJ/K18F7Hox6BNEgte7l
 SIC45b7O6RCT6w7jMTX+ml2QFKcUf4cR3lHHDerWSITCP05VKqtktmQF3bN+mATZ
 QafN9uhV1E6BGPebRFAMllUTee4Il+7iZR+g8lxYl4AVKpSpGoi9J2H2VLHTDGLC
 hOq7glkpt02rQYRnIdNj0Jm/IBvnDAhJeTeexw41P9bpbnC6jiXAJsgApNduUazm
 TjfZBUGUIOQssWe6wdr4+v3L+OmKfj9STdJCUOAat9CbarQYDHxBHuSOPk8Q5kVY
 LQ3WkV1xdUmLldUmmt/eGn1EgIZb5VbfStrXF8Ih2PSitAKlocmtdu67W4SPX06B
 baZcgQ11qPfmecF6NEUEB9BEBPiwuEp+9Hfxmv3EjyN++AnD7sytFou4KP6d3uHL
 PC4dK5hHPYMSdl2irFJgxyXOVjglULp/ukwYG4cO6rzKbxYKZAkclXk5vdWhBlJd
 NnL+OgByRdTO6fimMDlauUAkrI/xgx0YmK0WTzFtSchc0GRkiCR/yME13pYaNktE
 drQLNTNm8NXRh3bfN0HNpZxa1wlLY2lF2p3hEFMUloaCulYtXiL3hCIkTQ6iN+c+
 1xwYDaj1Gxg37O7KRp3PAJBwDcZsO54FMRZu9FGA5vhanW000sY=
 =Qp9q
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Drivers
   - Add support for Intel's Platform Monitoring Technology (PMT)

  New Device Support:
   - Add support for PM660/PM660L to QCom SPMI PMIC
   - Add support for lots of new devices to Kontron Core

  New Functionality:
   - Provide syscon_regmap_lookup_by_phandle_optional() to SysCon API

  Fix-ups:
   - Constify; da9xxx-core; intel_*, tps65xxx, wm8xxx-core, lp8788,
     stmpe, sun4i-gpadc, 88pm800, hi655x-pmic, ioc3, etc
   - Remove superfluous code; madera, tps65910
   - Use raw APIs (rid abstractions); tps65911-comparator, tps65910
   - Whitespace/formatting fix-ups; tps65910
   - Device Tree changes/updates; bd71837-pmic, syscon
   - Use helpers/APIs (no hand rolling); altera-sysmgr
   - Mark of_match tables as __maybe_unused; twl6030-irq
   - Fix spelling; si476x-core

  Bug Fixes:
   - Reset on resume to ensure known state; madera-core
   - Correct ordering issues; madera-core, tps65910, kempld-core
   - Remove erroneous passing of of_compatible strings; at91-usart
   - Fix potential I2C adaptor leak; htc-i2cpld
   - Correct errorneous defines; rt5033-private
   - Resolve Kconfig issues; MFD_SL28CPLD, MFD_OMAP_USB_HOST
   - Fix dev_err_probe() handling; stmfx
   - Repair interrupt regression; motorola-cpcap
   - Allow ACPI matching of DT tables; bcm590xx, da9xx, ene-kb3930,
     fsl-imx25-tsadc, max77650, mt6397-core, rt5033, stmfx, max77686,
     sun4i-gpadc, wm8994-core, axp20x-i2c"

[ The PMT updates already came in through the x86 platform tree ]

* tag 'mfd-next-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (48 commits)
  mfd: kempld-core: Add support for additional devices
  mfd: si476x-core.h: Fix "regulator" spelling in comment
  mfd: twl6030: Mark of_device_id table as maybe unused
  mfd: axp20x: Skip of_device_id table when !CONFIG_OF
  mfd: wm8994: Drop of_match_ptr from of_device_id table
  mfd: sun4i: Drop of_match_ptr from of_device_id table
  mfd: max77686: Drop of_match_ptr from of_device_id table
  mfd: stmfx: Drop of_match_ptr from of_device_id table
  mfd: rt5033: Drop of_match_ptr from of_device_id table
  mfd: mt6397: Drop of_match_ptr from of_device_id table
  mfd: max77650: Drop of_match_ptr from of_device_id table
  mfd: fsl-imx25: Drop of_match_ptr from of_device_id table
  mfd: ene-kb3930: Drop of_match_ptr from of_device_id table
  mfd: da9150: Drop of_match_ptr from of_device_id table
  mfd: da9063: Drop of_match_ptr from of_device_id table
  mfd: da9062: Drop of_match_ptr from of_device_id table
  mfd: da9055: Drop of_match_ptr from of_device_id table
  mfd: bcm590xx: Drop of_match_ptr from of_device_id table
  mfd: omap-usb: Depend on COMMON_CLK to fix compile tests
  mfd: kempld-core: Check for DMI definition before ACPI
  ...
This commit is contained in:
Linus Torvalds 2020-12-16 14:48:32 -08:00
commit 278f54c461
62 changed files with 410 additions and 974 deletions

View File

@ -32,9 +32,15 @@ properties:
clocks:
maxItems: 1
clock-names:
const: osc
"#clock-cells":
const: 0
clock-output-names:
const: pmic_clk
# The BD718x7 supports two different HW states as reset target states. States
# are called as SNVS and READY. At READY state all the PMIC power outputs go
# down and OTP is reload. At the SNVS state all other logic and external

View File

@ -44,6 +44,10 @@ properties:
- hisilicon,peri-subctrl
- microchip,sparx5-cpu-syscon
- mstar,msc313-pmsleep
- rockchip,px30-qos
- rockchip,rk3066-qos
- rockchip,rk3288-qos
- rockchip,rk3399-qos
- samsung,exynos3-sysreg
- samsung,exynos4-sysreg
- samsung,exynos5-sysreg

View File

@ -28,7 +28,7 @@ static int tps65910_gpio_get(struct gpio_chip *gc, unsigned offset)
struct tps65910 *tps65910 = tps65910_gpio->tps65910;
unsigned int val;
tps65910_reg_read(tps65910, TPS65910_GPIO0 + offset, &val);
regmap_read(tps65910->regmap, TPS65910_GPIO0 + offset, &val);
if (val & GPIO_STS_MASK)
return 1;
@ -43,10 +43,10 @@ static void tps65910_gpio_set(struct gpio_chip *gc, unsigned offset,
struct tps65910 *tps65910 = tps65910_gpio->tps65910;
if (value)
tps65910_reg_set_bits(tps65910, TPS65910_GPIO0 + offset,
regmap_set_bits(tps65910->regmap, TPS65910_GPIO0 + offset,
GPIO_SET_MASK);
else
tps65910_reg_clear_bits(tps65910, TPS65910_GPIO0 + offset,
regmap_clear_bits(tps65910->regmap, TPS65910_GPIO0 + offset,
GPIO_SET_MASK);
}
@ -59,7 +59,7 @@ static int tps65910_gpio_output(struct gpio_chip *gc, unsigned offset,
/* Set the initial value */
tps65910_gpio_set(gc, offset, value);
return tps65910_reg_set_bits(tps65910, TPS65910_GPIO0 + offset,
return regmap_set_bits(tps65910->regmap, TPS65910_GPIO0 + offset,
GPIO_CFG_MASK);
}
@ -68,7 +68,7 @@ static int tps65910_gpio_input(struct gpio_chip *gc, unsigned offset)
struct tps65910_gpio *tps65910_gpio = gpiochip_get_data(gc);
struct tps65910 *tps65910 = tps65910_gpio->tps65910;
return tps65910_reg_clear_bits(tps65910, TPS65910_GPIO0 + offset,
return regmap_clear_bits(tps65910->regmap, TPS65910_GPIO0 + offset,
GPIO_CFG_MASK);
}
@ -157,7 +157,7 @@ static int tps65910_gpio_probe(struct platform_device *pdev)
if (!pdata->en_gpio_sleep[i])
continue;
ret = tps65910_reg_set_bits(tps65910,
ret = regmap_set_bits(tps65910->regmap,
TPS65910_GPIO0 + i, GPIO_SLEEP_MASK);
if (ret < 0)
dev_warn(tps65910->dev,

View File

@ -121,7 +121,7 @@ static const struct i2c_device_id pm80x_id_table[] = {
};
MODULE_DEVICE_TABLE(i2c, pm80x_id_table);
static struct resource rtc_resources[] = {
static const struct resource rtc_resources[] = {
{
.name = "88pm80x-rtc",
.start = PM800_IRQ_RTC,

View File

@ -26,99 +26,99 @@
#define INT_STATUS_NUM 3
static struct resource bk0_resources[] = {
static const struct resource bk0_resources[] = {
{2, 2, "duty cycle", IORESOURCE_REG, },
{3, 3, "always on", IORESOURCE_REG, },
{3, 3, "current", IORESOURCE_REG, },
};
static struct resource bk1_resources[] = {
static const struct resource bk1_resources[] = {
{4, 4, "duty cycle", IORESOURCE_REG, },
{5, 5, "always on", IORESOURCE_REG, },
{5, 5, "current", IORESOURCE_REG, },
};
static struct resource bk2_resources[] = {
static const struct resource bk2_resources[] = {
{6, 6, "duty cycle", IORESOURCE_REG, },
{7, 7, "always on", IORESOURCE_REG, },
{5, 5, "current", IORESOURCE_REG, },
};
static struct resource led0_resources[] = {
static const struct resource led0_resources[] = {
/* RGB1 Red LED */
{0xd, 0xd, "control", IORESOURCE_REG, },
{0xc, 0xc, "blink", IORESOURCE_REG, },
};
static struct resource led1_resources[] = {
static const struct resource led1_resources[] = {
/* RGB1 Green LED */
{0xe, 0xe, "control", IORESOURCE_REG, },
{0xc, 0xc, "blink", IORESOURCE_REG, },
};
static struct resource led2_resources[] = {
static const struct resource led2_resources[] = {
/* RGB1 Blue LED */
{0xf, 0xf, "control", IORESOURCE_REG, },
{0xc, 0xc, "blink", IORESOURCE_REG, },
};
static struct resource led3_resources[] = {
static const struct resource led3_resources[] = {
/* RGB2 Red LED */
{0x9, 0x9, "control", IORESOURCE_REG, },
{0x8, 0x8, "blink", IORESOURCE_REG, },
};
static struct resource led4_resources[] = {
static const struct resource led4_resources[] = {
/* RGB2 Green LED */
{0xa, 0xa, "control", IORESOURCE_REG, },
{0x8, 0x8, "blink", IORESOURCE_REG, },
};
static struct resource led5_resources[] = {
static const struct resource led5_resources[] = {
/* RGB2 Blue LED */
{0xb, 0xb, "control", IORESOURCE_REG, },
{0x8, 0x8, "blink", IORESOURCE_REG, },
};
static struct resource buck1_resources[] = {
static const struct resource buck1_resources[] = {
{0x24, 0x24, "buck set", IORESOURCE_REG, },
};
static struct resource buck2_resources[] = {
static const struct resource buck2_resources[] = {
{0x25, 0x25, "buck set", IORESOURCE_REG, },
};
static struct resource buck3_resources[] = {
static const struct resource buck3_resources[] = {
{0x26, 0x26, "buck set", IORESOURCE_REG, },
};
static struct resource ldo1_resources[] = {
static const struct resource ldo1_resources[] = {
{0x10, 0x10, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo2_resources[] = {
static const struct resource ldo2_resources[] = {
{0x11, 0x11, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo3_resources[] = {
static const struct resource ldo3_resources[] = {
{0x12, 0x12, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo4_resources[] = {
static const struct resource ldo4_resources[] = {
{0x13, 0x13, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo5_resources[] = {
static const struct resource ldo5_resources[] = {
{0x14, 0x14, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo6_resources[] = {
static const struct resource ldo6_resources[] = {
{0x15, 0x15, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo7_resources[] = {
static const struct resource ldo7_resources[] = {
{0x16, 0x16, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo8_resources[] = {
static const struct resource ldo8_resources[] = {
{0x17, 0x17, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo9_resources[] = {
static const struct resource ldo9_resources[] = {
{0x18, 0x18, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo10_resources[] = {
static const struct resource ldo10_resources[] = {
{0x19, 0x19, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo12_resources[] = {
static const struct resource ldo12_resources[] = {
{0x1a, 0x1a, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo_vibrator_resources[] = {
static const struct resource ldo_vibrator_resources[] = {
{0x28, 0x28, "ldo set", IORESOURCE_REG, },
};
static struct resource ldo14_resources[] = {
static const struct resource ldo14_resources[] = {
{0x1b, 0x1b, "ldo set", IORESOURCE_REG, },
};

View File

@ -730,33 +730,9 @@ config MFD_KEMPLD
select MFD_CORE
help
This is the core driver for the PLD (Programmable Logic Device) found
on some Kontron ETX and COMexpress (ETXexpress) modules. The PLD
device may provide functions like watchdog, GPIO, UART and I2C bus.
The following modules are supported:
* COMe-bBD#
* COMe-bBL6
* COMe-bHL6
* COMe-bSL6
* COMe-bIP#
* COMe-bKL6
* COMe-bPC2 (ETXexpress-PC)
* COMe-bSC# (ETXexpress-SC T#)
* COMe-cAL6
* COMe-cBL6
* COMe-cBT6
* COMe-cBW6
* COMe-cCT6
* COMe-cDC2 (microETXexpress-DC)
* COMe-cHL6
* COMe-cKL6
* COMe-cPC2 (microETXexpress-PC)
* COMe-cSL6
* COMe-mAL10
* COMe-mBT10
* COMe-mCT10
* COMe-mTT10 (nanoETXexpress-TT)
* ETX-OH
on some Kontron ETX and nearly all COMexpress (ETXexpress) modules as
well as on some other Kontron products. The PLD device may provide
functions like watchdog, GPIO, UART and I2C bus.
This driver can also be built as a module. If so, the module
will be called kempld-core.
@ -1199,6 +1175,7 @@ config MFD_SIMPLE_MFD_I2C
config MFD_SL28CPLD
tristate "Kontron sl28cpld Board Management Controller"
depends on I2C
depends on ARCH_LAYERSCAPE || COMPILE_TEST
select MFD_SIMPLE_MFD_I2C
help
Say yes here to enable support for the Kontron sl28cpld board
@ -1442,6 +1419,7 @@ config MFD_TI_LMU
config MFD_OMAP_USB_HOST
bool "TI OMAP USBHS core and TLL driver"
depends on USB_EHCI_HCD_OMAP || USB_OHCI_HCD_OMAP3
depends on COMMON_CLK
default y
help
This is the core driver for the OAMP EHCI and OHCI drivers.

View File

@ -152,7 +152,7 @@ static int sysmgr_probe(struct platform_device *pdev)
if (!base)
return -ENOMEM;
sysmgr_config.max_register = res->end - res->start - 3;
sysmgr_config.max_register = resource_size(res) - 3;
regmap = devm_regmap_init_mmio(dev, base, &sysmgr_config);
}

View File

@ -15,15 +15,11 @@
#include <linux/of.h>
#include <linux/property.h>
static const struct mfd_cell at91_usart_spi_subdev = {
.name = "at91_usart_spi",
.of_compatible = "microchip,at91sam9g45-usart-spi",
};
static const struct mfd_cell at91_usart_spi_subdev =
MFD_CELL_NAME("at91_usart_spi");
static const struct mfd_cell at91_usart_serial_subdev = {
.name = "atmel_usart_serial",
.of_compatible = "atmel,at91rm9200-usart-serial",
};
static const struct mfd_cell at91_usart_serial_subdev =
MFD_CELL_NAME("atmel_usart_serial");
static int at91_usart_mode_probe(struct platform_device *pdev)
{

View File

@ -57,6 +57,7 @@ static int axp20x_i2c_remove(struct i2c_client *i2c)
return axp20x_device_remove(axp20x);
}
#ifdef CONFIG_OF
static const struct of_device_id axp20x_i2c_of_match[] = {
{ .compatible = "x-powers,axp152", .data = (void *)AXP152_ID },
{ .compatible = "x-powers,axp202", .data = (void *)AXP202_ID },
@ -68,6 +69,7 @@ static const struct of_device_id axp20x_i2c_of_match[] = {
{ },
};
MODULE_DEVICE_TABLE(of, axp20x_i2c_of_match);
#endif
static const struct i2c_device_id axp20x_i2c_id[] = {
{ "axp152", 0 },

View File

@ -107,7 +107,7 @@ MODULE_DEVICE_TABLE(i2c, bcm590xx_i2c_id);
static struct i2c_driver bcm590xx_i2c_driver = {
.driver = {
.name = "bcm590xx",
.of_match_table = of_match_ptr(bcm590xx_of_match),
.of_match_table = bcm590xx_of_match,
},
.probe = bcm590xx_i2c_probe,
.id_table = bcm590xx_i2c_id,

View File

@ -254,14 +254,14 @@ const struct regmap_config da9055_regmap_config = {
};
EXPORT_SYMBOL_GPL(da9055_regmap_config);
static struct resource da9055_onkey_resource = {
static const struct resource da9055_onkey_resource = {
.name = "ONKEY",
.start = DA9055_IRQ_NONKEY,
.end = DA9055_IRQ_NONKEY,
.flags = IORESOURCE_IRQ,
};
static struct resource da9055_rtc_resource[] = {
static const struct resource da9055_rtc_resource[] = {
{
.name = "ALM",
.start = DA9055_IRQ_ALARM,
@ -276,14 +276,14 @@ static struct resource da9055_rtc_resource[] = {
},
};
static struct resource da9055_hwmon_resource = {
static const struct resource da9055_hwmon_resource = {
.name = "HWMON",
.start = DA9055_IRQ_HWMON,
.end = DA9055_IRQ_HWMON,
.flags = IORESOURCE_IRQ,
};
static struct resource da9055_ld05_6_resource = {
static const struct resource da9055_ld05_6_resource = {
.name = "REGULATOR",
.start = DA9055_IRQ_REGULATOR,
.end = DA9055_IRQ_REGULATOR,

View File

@ -74,7 +74,7 @@ static struct i2c_driver da9055_i2c_driver = {
.id_table = da9055_i2c_id,
.driver = {
.name = "da9055-pmic",
.of_match_table = of_match_ptr(da9055_of_match),
.of_match_table = da9055_of_match,
},
};

View File

@ -160,23 +160,23 @@ static struct regmap_irq_chip da9062_irq_chip = {
.ack_base = DA9062AA_EVENT_A,
};
static struct resource da9061_core_resources[] = {
static const struct resource da9061_core_resources[] = {
DEFINE_RES_IRQ_NAMED(DA9061_IRQ_VDD_WARN, "VDD_WARN"),
};
static struct resource da9061_regulators_resources[] = {
static const struct resource da9061_regulators_resources[] = {
DEFINE_RES_IRQ_NAMED(DA9061_IRQ_LDO_LIM, "LDO_LIM"),
};
static struct resource da9061_thermal_resources[] = {
static const struct resource da9061_thermal_resources[] = {
DEFINE_RES_IRQ_NAMED(DA9061_IRQ_TEMP, "THERMAL"),
};
static struct resource da9061_wdt_resources[] = {
static const struct resource da9061_wdt_resources[] = {
DEFINE_RES_IRQ_NAMED(DA9061_IRQ_WDG_WARN, "WD_WARN"),
};
static struct resource da9061_onkey_resources[] = {
static const struct resource da9061_onkey_resources[] = {
DEFINE_RES_IRQ_NAMED(DA9061_IRQ_ONKEY, "ONKEY"),
};
@ -211,32 +211,32 @@ static const struct mfd_cell da9061_devs[] = {
},
};
static struct resource da9062_core_resources[] = {
static const struct resource da9062_core_resources[] = {
DEFINE_RES_NAMED(DA9062_IRQ_VDD_WARN, 1, "VDD_WARN", IORESOURCE_IRQ),
};
static struct resource da9062_regulators_resources[] = {
static const struct resource da9062_regulators_resources[] = {
DEFINE_RES_NAMED(DA9062_IRQ_LDO_LIM, 1, "LDO_LIM", IORESOURCE_IRQ),
};
static struct resource da9062_thermal_resources[] = {
static const struct resource da9062_thermal_resources[] = {
DEFINE_RES_NAMED(DA9062_IRQ_TEMP, 1, "THERMAL", IORESOURCE_IRQ),
};
static struct resource da9062_wdt_resources[] = {
static const struct resource da9062_wdt_resources[] = {
DEFINE_RES_NAMED(DA9062_IRQ_WDG_WARN, 1, "WD_WARN", IORESOURCE_IRQ),
};
static struct resource da9062_rtc_resources[] = {
static const struct resource da9062_rtc_resources[] = {
DEFINE_RES_NAMED(DA9062_IRQ_ALARM, 1, "ALARM", IORESOURCE_IRQ),
DEFINE_RES_NAMED(DA9062_IRQ_TICK, 1, "TICK", IORESOURCE_IRQ),
};
static struct resource da9062_onkey_resources[] = {
static const struct resource da9062_onkey_resources[] = {
DEFINE_RES_NAMED(DA9062_IRQ_ONKEY, 1, "ONKEY", IORESOURCE_IRQ),
};
static struct resource da9062_gpio_resources[] = {
static const struct resource da9062_gpio_resources[] = {
DEFINE_RES_NAMED(DA9062_IRQ_GPI0, 1, "GPI0", IORESOURCE_IRQ),
DEFINE_RES_NAMED(DA9062_IRQ_GPI1, 1, "GPI1", IORESOURCE_IRQ),
DEFINE_RES_NAMED(DA9062_IRQ_GPI2, 1, "GPI2", IORESOURCE_IRQ),
@ -736,7 +736,7 @@ MODULE_DEVICE_TABLE(i2c, da9062_i2c_id);
static struct i2c_driver da9062_i2c_driver = {
.driver = {
.name = "da9062",
.of_match_table = of_match_ptr(da9062_dt_ids),
.of_match_table = da9062_dt_ids,
},
.probe = da9062_i2c_probe,
.remove = da9062_i2c_remove,

View File

@ -29,7 +29,7 @@
#include <linux/uaccess.h>
static struct resource da9063_regulators_resources[] = {
static const struct resource da9063_regulators_resources[] = {
{
.name = "LDO_LIM",
.start = DA9063_IRQ_LDO_LIM,
@ -38,7 +38,7 @@ static struct resource da9063_regulators_resources[] = {
},
};
static struct resource da9063_rtc_resources[] = {
static const struct resource da9063_rtc_resources[] = {
{
.name = "ALARM",
.start = DA9063_IRQ_ALARM,
@ -53,7 +53,7 @@ static struct resource da9063_rtc_resources[] = {
}
};
static struct resource da9063_onkey_resources[] = {
static const struct resource da9063_onkey_resources[] = {
{
.name = "ONKEY",
.start = DA9063_IRQ_ONKEY,
@ -62,7 +62,7 @@ static struct resource da9063_onkey_resources[] = {
},
};
static struct resource da9063_hwmon_resources[] = {
static const struct resource da9063_hwmon_resources[] = {
{
.start = DA9063_IRQ_ADC_RDY,
.end = DA9063_IRQ_ADC_RDY,

View File

@ -455,7 +455,7 @@ MODULE_DEVICE_TABLE(i2c, da9063_i2c_id);
static struct i2c_driver da9063_i2c_driver = {
.driver = {
.name = "da9063",
.of_match_table = of_match_ptr(da9063_dt_ids),
.of_match_table = da9063_dt_ids,
},
.probe = da9063_i2c_probe,
.id_table = da9063_i2c_id,

View File

@ -350,18 +350,18 @@ static const struct regmap_irq_chip da9150_regmap_irq_chip = {
.num_irqs = ARRAY_SIZE(da9150_irqs),
};
static struct resource da9150_gpadc_resources[] = {
static const struct resource da9150_gpadc_resources[] = {
DEFINE_RES_IRQ_NAMED(DA9150_IRQ_GPADC, "GPADC"),
};
static struct resource da9150_charger_resources[] = {
static const struct resource da9150_charger_resources[] = {
DEFINE_RES_IRQ_NAMED(DA9150_IRQ_CHG, "CHG_STATUS"),
DEFINE_RES_IRQ_NAMED(DA9150_IRQ_TJUNC, "CHG_TJUNC"),
DEFINE_RES_IRQ_NAMED(DA9150_IRQ_VFAULT, "CHG_VFAULT"),
DEFINE_RES_IRQ_NAMED(DA9150_IRQ_VBUS, "CHG_VBUS"),
};
static struct resource da9150_fg_resources[] = {
static const struct resource da9150_fg_resources[] = {
DEFINE_RES_IRQ_NAMED(DA9150_IRQ_FG, "FG"),
};
@ -511,7 +511,7 @@ MODULE_DEVICE_TABLE(of, da9150_of_match);
static struct i2c_driver da9150_driver = {
.driver = {
.name = "da9150",
.of_match_table = of_match_ptr(da9150_of_match),
.of_match_table = da9150_of_match,
},
.probe = da9150_probe,
.remove = da9150_remove,

View File

@ -202,7 +202,7 @@ static struct i2c_driver kb3930_driver = {
.remove = kb3930_remove,
.driver = {
.name = "ene-kb3930",
.of_match_table = of_match_ptr(kb3930_dt_ids),
.of_match_table = kb3930_dt_ids,
},
};
module_i2c_driver(kb3930_driver);

View File

@ -196,7 +196,7 @@ MODULE_DEVICE_TABLE(of, mx25_tsadc_ids);
static struct platform_driver mx25_tsadc_driver = {
.driver = {
.name = "mx25-tsadc",
.of_match_table = of_match_ptr(mx25_tsadc_ids),
.of_match_table = mx25_tsadc_ids,
},
.probe = mx25_tsadc_probe,
.remove = mx25_tsadc_remove,

View File

@ -49,7 +49,7 @@ static struct regmap_config hi655x_regmap_config = {
.max_register = HI655X_BUS_ADDR(0x400) - HI655X_STRIDE,
};
static struct resource pwrkey_resources[] = {
static const struct resource pwrkey_resources[] = {
{
.name = "down",
.start = PWRON_D20R_INT,

View File

@ -346,6 +346,7 @@ static int htcpld_register_chip_i2c(
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_READ_BYTE_DATA)) {
dev_warn(dev, "i2c adapter %d non-functional\n",
pdata->i2c_adapter_id);
i2c_put_adapter(adapter);
return -EINVAL;
}
@ -360,6 +361,7 @@ static int htcpld_register_chip_i2c(
/* I2C device registration failed, contineu with the next */
dev_warn(dev, "Unable to add I2C device for 0x%x\n",
plat_chip_data->addr);
i2c_put_adapter(adapter);
return PTR_ERR(client);
}

View File

@ -50,23 +50,23 @@ struct intel_msic {
void __iomem *irq_base;
};
static struct resource msic_touch_resources[] = {
static const struct resource msic_touch_resources[] = {
DEFINE_RES_IRQ(0),
};
static struct resource msic_adc_resources[] = {
static const struct resource msic_adc_resources[] = {
DEFINE_RES_IRQ(0),
};
static struct resource msic_battery_resources[] = {
static const struct resource msic_battery_resources[] = {
DEFINE_RES_IRQ(0),
};
static struct resource msic_gpio_resources[] = {
static const struct resource msic_gpio_resources[] = {
DEFINE_RES_IRQ(0),
};
static struct resource msic_audio_resources[] = {
static const struct resource msic_audio_resources[] = {
DEFINE_RES_IRQ_NAMED(0, "IRQ"),
/*
* We will pass IRQ_BASE to the driver now but this can be removed
@ -75,19 +75,19 @@ static struct resource msic_audio_resources[] = {
DEFINE_RES_MEM_NAMED(MSIC_IRQ_STATUS_ACCDET, 1, "IRQ_BASE"),
};
static struct resource msic_hdmi_resources[] = {
static const struct resource msic_hdmi_resources[] = {
DEFINE_RES_IRQ(0),
};
static struct resource msic_thermal_resources[] = {
static const struct resource msic_thermal_resources[] = {
DEFINE_RES_IRQ(0),
};
static struct resource msic_power_btn_resources[] = {
static const struct resource msic_power_btn_resources[] = {
DEFINE_RES_IRQ(0),
};
static struct resource msic_ocd_resources[] = {
static const struct resource msic_ocd_resources[] = {
DEFINE_RES_IRQ(0),
};

View File

@ -72,7 +72,7 @@ static const struct dmi_system_id dmi_platform_info[] = {
{}
};
static struct resource intel_quark_i2c_res[] = {
static const struct resource intel_quark_i2c_res[] = {
[INTEL_QUARK_IORES_MEM] = {
.flags = IORESOURCE_MEM,
},
@ -85,7 +85,7 @@ static struct mfd_cell_acpi_match intel_quark_acpi_match_i2c = {
.adr = MFD_ACPI_MATCH_I2C,
};
static struct resource intel_quark_gpio_res[] = {
static const struct resource intel_quark_gpio_res[] = {
[INTEL_QUARK_IORES_MEM] = {
.flags = IORESOURCE_MEM,
},

View File

@ -200,32 +200,32 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_crit = {
.num_regs = 1,
};
static struct resource gpio_resources[] = {
static const struct resource gpio_resources[] = {
DEFINE_RES_IRQ_NAMED(BXTWC_GPIO_LVL1_IRQ, "GPIO"),
};
static struct resource adc_resources[] = {
static const struct resource adc_resources[] = {
DEFINE_RES_IRQ_NAMED(BXTWC_ADC_IRQ, "ADC"),
};
static struct resource usbc_resources[] = {
static const struct resource usbc_resources[] = {
DEFINE_RES_IRQ(BXTWC_USBC_IRQ),
};
static struct resource charger_resources[] = {
static const struct resource charger_resources[] = {
DEFINE_RES_IRQ_NAMED(BXTWC_CHGR0_IRQ, "CHARGER"),
DEFINE_RES_IRQ_NAMED(BXTWC_CHGR1_IRQ, "CHARGER1"),
};
static struct resource thermal_resources[] = {
static const struct resource thermal_resources[] = {
DEFINE_RES_IRQ(BXTWC_THRM_LVL1_IRQ),
};
static struct resource bcu_resources[] = {
static const struct resource bcu_resources[] = {
DEFINE_RES_IRQ_NAMED(BXTWC_BCU_IRQ, "BCU"),
};
static struct resource tmu_resources[] = {
static const struct resource tmu_resources[] = {
DEFINE_RES_IRQ_NAMED(BXTWC_TMU_IRQ, "TMU"),
};

View File

@ -32,23 +32,23 @@ enum {
CHTDC_TI_CCEOCAL = 7, /* battery */
};
static struct resource power_button_resources[] = {
static const struct resource power_button_resources[] = {
DEFINE_RES_IRQ(CHTDC_TI_PWRBTN),
};
static struct resource thermal_resources[] = {
static const struct resource thermal_resources[] = {
DEFINE_RES_IRQ(CHTDC_TI_DIETMPWARN),
};
static struct resource adc_resources[] = {
static const struct resource adc_resources[] = {
DEFINE_RES_IRQ(CHTDC_TI_ADCCMPL),
};
static struct resource pwrsrc_resources[] = {
static const struct resource pwrsrc_resources[] = {
DEFINE_RES_IRQ(CHTDC_TI_VBUSDET),
};
static struct resource battery_resources[] = {
static const struct resource battery_resources[] = {
DEFINE_RES_IRQ(CHTDC_TI_VBATLOW),
DEFINE_RES_IRQ(CHTDC_TI_CCEOCAL),
};

View File

@ -41,11 +41,11 @@ enum {
CHT_WC_CRIT_IRQ = 7,
};
static struct resource cht_wc_pwrsrc_resources[] = {
static const struct resource cht_wc_pwrsrc_resources[] = {
DEFINE_RES_IRQ(CHT_WC_PWRSRC_IRQ),
};
static struct resource cht_wc_ext_charger_resources[] = {
static const struct resource cht_wc_ext_charger_resources[] = {
DEFINE_RES_IRQ(CHT_WC_EXT_CHGR_IRQ),
};

View File

@ -28,23 +28,23 @@
#define CRYSTAL_COVE_IRQ_GPIO 5
#define CRYSTAL_COVE_IRQ_VHDMIOCP 6
static struct resource gpio_resources[] = {
static const struct resource gpio_resources[] = {
DEFINE_RES_IRQ_NAMED(CRYSTAL_COVE_IRQ_GPIO, "GPIO"),
};
static struct resource pwrsrc_resources[] = {
static const struct resource pwrsrc_resources[] = {
DEFINE_RES_IRQ_NAMED(CRYSTAL_COVE_IRQ_PWRSRC, "PWRSRC"),
};
static struct resource adc_resources[] = {
static const struct resource adc_resources[] = {
DEFINE_RES_IRQ_NAMED(CRYSTAL_COVE_IRQ_ADC, "ADC"),
};
static struct resource thermal_resources[] = {
static const struct resource thermal_resources[] = {
DEFINE_RES_IRQ_NAMED(CRYSTAL_COVE_IRQ_THRM, "THERMAL"),
};
static struct resource bcu_resources[] = {
static const struct resource bcu_resources[] = {
DEFINE_RES_IRQ_NAMED(CRYSTAL_COVE_IRQ_BCU, "BCU"),
};

View File

@ -158,13 +158,13 @@ err:
return -ENOMEM;
}
static struct resource ioc3_uarta_resources[] = {
static const struct resource ioc3_uarta_resources[] = {
DEFINE_RES_MEM(offsetof(struct ioc3, sregs.uarta),
sizeof_field(struct ioc3, sregs.uarta)),
DEFINE_RES_IRQ(IOC3_IRQ_SERIAL_A)
};
static struct resource ioc3_uartb_resources[] = {
static const struct resource ioc3_uartb_resources[] = {
DEFINE_RES_MEM(offsetof(struct ioc3, sregs.uartb),
sizeof_field(struct ioc3, sregs.uartb)),
DEFINE_RES_IRQ(IOC3_IRQ_SERIAL_B)
@ -213,7 +213,7 @@ static int ioc3_serial_setup(struct ioc3_priv_data *ipd)
return 0;
}
static struct resource ioc3_kbd_resources[] = {
static const struct resource ioc3_kbd_resources[] = {
DEFINE_RES_MEM(offsetof(struct ioc3, serio),
sizeof_field(struct ioc3, serio)),
DEFINE_RES_IRQ(IOC3_IRQ_KBD)
@ -242,7 +242,7 @@ static int ioc3_kbd_setup(struct ioc3_priv_data *ipd)
return 0;
}
static struct resource ioc3_eth_resources[] = {
static const struct resource ioc3_eth_resources[] = {
DEFINE_RES_MEM(offsetof(struct ioc3, eth),
sizeof_field(struct ioc3, eth)),
DEFINE_RES_MEM(offsetof(struct ioc3, ssram),
@ -250,7 +250,7 @@ static struct resource ioc3_eth_resources[] = {
DEFINE_RES_IRQ(0)
};
static struct resource ioc3_w1_resources[] = {
static const struct resource ioc3_w1_resources[] = {
DEFINE_RES_MEM(offsetof(struct ioc3, mcr),
sizeof_field(struct ioc3, mcr)),
};
@ -294,7 +294,7 @@ static int ioc3_eth_setup(struct ioc3_priv_data *ipd)
return 0;
}
static struct resource ioc3_m48t35_resources[] = {
static const struct resource ioc3_m48t35_resources[] = {
DEFINE_RES_MEM(IOC3_BYTEBUS_DEV0, M48T35_REG_SIZE)
};
@ -326,7 +326,7 @@ static struct ds1685_rtc_platform_data ip30_rtc_platform_data = {
.access_type = ds1685_reg_indirect,
};
static struct resource ioc3_rtc_ds1685_resources[] = {
static const struct resource ioc3_rtc_ds1685_resources[] = {
DEFINE_RES_MEM(IOC3_BYTEBUS_DEV1, 1),
DEFINE_RES_MEM(IOC3_BYTEBUS_DEV2, 1),
DEFINE_RES_IRQ(0)
@ -359,7 +359,7 @@ static int ioc3_ds1685_setup(struct ioc3_priv_data *ipd)
};
static struct resource ioc3_leds_resources[] = {
static const struct resource ioc3_leds_resources[] = {
DEFINE_RES_MEM(offsetof(struct ioc3, gppr[0]),
sizeof_field(struct ioc3, gppr[0])),
DEFINE_RES_MEM(offsetof(struct ioc3, gppr[1]),

View File

@ -125,7 +125,6 @@ static const struct kempld_platform_data kempld_platform_data_generic = {
};
static struct platform_device *kempld_pdev;
static bool kempld_acpi_mode;
static int kempld_create_platform_device(const struct dmi_system_id *id)
{
@ -501,8 +500,6 @@ static int kempld_probe(struct platform_device *pdev)
ret = kempld_get_acpi_data(pdev);
if (ret)
return ret;
kempld_acpi_mode = true;
} else if (kempld_pdev != pdev) {
/*
* The platform device we are probing is not the one we
@ -555,6 +552,7 @@ static int kempld_remove(struct platform_device *pdev)
#ifdef CONFIG_ACPI
static const struct acpi_device_id kempld_acpi_table[] = {
{ "KEM0000", (kernel_ulong_t)&kempld_platform_data_generic },
{ "KEM0001", (kernel_ulong_t)&kempld_platform_data_generic },
{}
};
@ -565,7 +563,6 @@ static struct platform_driver kempld_driver = {
.driver = {
.name = "kempld",
.acpi_match_table = ACPI_PTR(kempld_acpi_table),
.probe_type = PROBE_FORCE_SYNCHRONOUS,
},
.probe = kempld_probe,
.remove = kempld_remove,
@ -588,6 +585,14 @@ static const struct dmi_system_id kempld_dmi_table[] __initconst = {
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "BDV7",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
DMI_MATCH(DMI_BOARD_NAME, "COMe-bDV7"),
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "BHL6",
.matches = {
@ -652,6 +657,14 @@ static const struct dmi_system_id kempld_dmi_table[] __initconst = {
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "CDV7",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
DMI_MATCH(DMI_BOARD_NAME, "COMe-cDV7"),
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "CHL6",
.matches = {
@ -771,6 +784,22 @@ static const struct dmi_system_id kempld_dmi_table[] __initconst = {
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "A203",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
DMI_MATCH(DMI_BOARD_NAME, "KBox A-203"),
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "M4A1",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
DMI_MATCH(DMI_BOARD_NAME, "COMe-m4AL"),
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "MAL1",
.matches = {
@ -779,6 +808,14 @@ static const struct dmi_system_id kempld_dmi_table[] __initconst = {
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "MAPL",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
DMI_MATCH(DMI_BOARD_NAME, "mITX-APL"),
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "MBR1",
.matches = {
@ -827,6 +864,30 @@ static const struct dmi_system_id kempld_dmi_table[] __initconst = {
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "PAPL",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
DMI_MATCH(DMI_BOARD_NAME, "pITX-APL"),
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "SXAL",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
DMI_MATCH(DMI_BOARD_NAME, "SMARC-sXAL"),
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "SXAL4",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
DMI_MATCH(DMI_BOARD_NAME, "SMARC-sXA4"),
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "UNP1",
.matches = {
@ -867,8 +928,7 @@ static const struct dmi_system_id kempld_dmi_table[] __initconst = {
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
},
{
}, {
.ident = "UTH6",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
@ -876,6 +936,14 @@ static const struct dmi_system_id kempld_dmi_table[] __initconst = {
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
}, {
.ident = "Q7AL",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Kontron"),
DMI_MATCH(DMI_BOARD_NAME, "Qseven-Q7AL"),
},
.driver_data = (void *)&kempld_platform_data_generic,
.callback = kempld_create_platform_device,
},
{}
};
@ -884,7 +952,6 @@ MODULE_DEVICE_TABLE(dmi, kempld_dmi_table);
static int __init kempld_init(void)
{
const struct dmi_system_id *id;
int ret;
if (force_device_id[0]) {
for (id = kempld_dmi_table;
@ -894,24 +961,11 @@ static int __init kempld_init(void)
break;
if (id->matches[0].slot == DMI_NONE)
return -ENODEV;
} else {
dmi_check_system(kempld_dmi_table);
}
ret = platform_driver_register(&kempld_driver);
if (ret)
return ret;
/*
* With synchronous probing the device should already be probed now.
* If no device id is forced and also no ACPI definition for the
* device was found, scan DMI table as fallback.
*
* If drivers_autoprobing is disabled and the device is found here,
* only that device can be bound manually later.
*/
if (!kempld_pdev && !kempld_acpi_mode)
dmi_check_system(kempld_dmi_table);
return 0;
return platform_driver_register(&kempld_driver);
}
static void __exit kempld_exit(void)

View File

@ -34,7 +34,7 @@
.num_resources = num_resource, \
}
static struct resource chg_irqs[] = {
static const struct resource chg_irqs[] = {
/* Charger Interrupts */
{
.start = LP8788_INT_CHG_INPUT_STATE,
@ -58,7 +58,7 @@ static struct resource chg_irqs[] = {
},
};
static struct resource rtc_irqs[] = {
static const struct resource rtc_irqs[] = {
{
.start = LP8788_INT_RTC_ALARM1,
.end = LP8788_INT_RTC_ALARM2,

View File

@ -38,6 +38,9 @@
#define MADERA_RESET_MIN_US 2000
#define MADERA_RESET_MAX_US 3000
#define ERRATA_DCVDD_MIN_US 10000
#define ERRATA_DCVDD_MAX_US 15000
static const char * const madera_core_supplies[] = {
"AVDD",
"DBVDD1",
@ -291,6 +294,9 @@ static int __maybe_unused madera_runtime_resume(struct device *dev)
dev_dbg(dev, "Leaving sleep mode\n");
if (!madera->reset_errata)
madera_enable_hard_reset(madera);
ret = regulator_enable(madera->dcvdd);
if (ret) {
dev_err(dev, "Failed to enable DCVDD: %d\n", ret);
@ -300,7 +306,22 @@ static int __maybe_unused madera_runtime_resume(struct device *dev)
regcache_cache_only(madera->regmap, false);
regcache_cache_only(madera->regmap_32bit, false);
usleep_range(MADERA_RESET_MIN_US, MADERA_RESET_MAX_US);
if (madera->reset_errata)
usleep_range(ERRATA_DCVDD_MIN_US, ERRATA_DCVDD_MAX_US);
else
madera_disable_hard_reset(madera);
if (!madera->pdata.reset || madera->reset_errata) {
ret = madera_wait_for_boot(madera);
if (ret)
goto err;
ret = madera_soft_reset(madera);
if (ret) {
dev_err(dev, "Failed to reset: %d\n", ret);
goto err;
}
}
ret = madera_wait_for_boot(madera);
if (ret)
@ -489,6 +510,8 @@ int madera_dev_init(struct madera *madera)
*/
switch (madera->type) {
case CS47L15:
madera->reset_errata = true;
break;
case CS47L35:
case CS47L90:
case CS47L91:
@ -539,13 +562,19 @@ int madera_dev_init(struct madera *madera)
goto err_dcvdd;
}
if (madera->reset_errata)
madera_disable_hard_reset(madera);
ret = regulator_enable(madera->dcvdd);
if (ret) {
dev_err(dev, "Failed to enable DCVDD: %d\n", ret);
goto err_enable;
}
madera_disable_hard_reset(madera);
if (madera->reset_errata)
usleep_range(ERRATA_DCVDD_MIN_US, ERRATA_DCVDD_MAX_US);
else
madera_disable_hard_reset(madera);
regcache_cache_only(madera->regmap, false);
regcache_cache_only(madera->regmap_32bit, false);
@ -653,7 +682,7 @@ int madera_dev_init(struct madera *madera)
* It looks like a device we support. If we don't have a hard reset
* we can now attempt a soft reset.
*/
if (!madera->pdata.reset) {
if (!madera->pdata.reset || madera->reset_errata) {
ret = madera_soft_reset(madera);
if (ret)
goto err_reset;

View File

@ -221,7 +221,7 @@ MODULE_DEVICE_TABLE(of, max77650_of_match);
static struct i2c_driver max77650_i2c_driver = {
.driver = {
.name = "max77650",
.of_match_table = of_match_ptr(max77650_of_match),
.of_match_table = max77650_of_match,
},
.probe_new = max77650_i2c_probe,
};

View File

@ -270,7 +270,7 @@ static struct i2c_driver max77686_i2c_driver = {
.driver = {
.name = "max77686",
.pm = &max77686_pm,
.of_match_table = of_match_ptr(max77686_pmic_dt_match),
.of_match_table = max77686_pmic_dt_match,
},
.probe_new = max77686_i2c_probe,
};

View File

@ -19,7 +19,7 @@
#include <linux/of.h>
#include <linux/of_platform.h>
static struct resource bk_resources[] = {
static const struct resource bk_resources[] = {
{ 0x84, 0x84, "mode control", IORESOURCE_REG, },
{ 0x85, 0x85, "control", IORESOURCE_REG, },
};
@ -33,7 +33,7 @@ static struct mfd_cell bk_devs[] = {
},
};
static struct resource touch_resources[] = {
static const struct resource touch_resources[] = {
{
.name = "max8925-tsc",
.start = MAX8925_TSC_IRQ,
@ -51,7 +51,7 @@ static const struct mfd_cell touch_devs[] = {
},
};
static struct resource power_supply_resources[] = {
static const struct resource power_supply_resources[] = {
{
.name = "max8925-power",
.start = MAX8925_CHG_IRQ1,
@ -69,7 +69,7 @@ static const struct mfd_cell power_devs[] = {
},
};
static struct resource rtc_resources[] = {
static const struct resource rtc_resources[] = {
{
.name = "max8925-rtc",
.start = MAX8925_IRQ_RTC_ALARM0,
@ -87,7 +87,7 @@ static const struct mfd_cell rtc_devs[] = {
},
};
static struct resource onkey_resources[] = {
static const struct resource onkey_resources[] = {
{
.name = "max8925-onkey",
.start = MAX8925_IRQ_GPM_SW_R,
@ -110,95 +110,95 @@ static const struct mfd_cell onkey_devs[] = {
},
};
static struct resource sd1_resources[] = {
static const struct resource sd1_resources[] = {
{0x06, 0x06, "sdv", IORESOURCE_REG, },
};
static struct resource sd2_resources[] = {
static const struct resource sd2_resources[] = {
{0x09, 0x09, "sdv", IORESOURCE_REG, },
};
static struct resource sd3_resources[] = {
static const struct resource sd3_resources[] = {
{0x0c, 0x0c, "sdv", IORESOURCE_REG, },
};
static struct resource ldo1_resources[] = {
static const struct resource ldo1_resources[] = {
{0x1a, 0x1a, "ldov", IORESOURCE_REG, },
};
static struct resource ldo2_resources[] = {
static const struct resource ldo2_resources[] = {
{0x1e, 0x1e, "ldov", IORESOURCE_REG, },
};
static struct resource ldo3_resources[] = {
static const struct resource ldo3_resources[] = {
{0x22, 0x22, "ldov", IORESOURCE_REG, },
};
static struct resource ldo4_resources[] = {
static const struct resource ldo4_resources[] = {
{0x26, 0x26, "ldov", IORESOURCE_REG, },
};
static struct resource ldo5_resources[] = {
static const struct resource ldo5_resources[] = {
{0x2a, 0x2a, "ldov", IORESOURCE_REG, },
};
static struct resource ldo6_resources[] = {
static const struct resource ldo6_resources[] = {
{0x2e, 0x2e, "ldov", IORESOURCE_REG, },
};
static struct resource ldo7_resources[] = {
static const struct resource ldo7_resources[] = {
{0x32, 0x32, "ldov", IORESOURCE_REG, },
};
static struct resource ldo8_resources[] = {
static const struct resource ldo8_resources[] = {
{0x36, 0x36, "ldov", IORESOURCE_REG, },
};
static struct resource ldo9_resources[] = {
static const struct resource ldo9_resources[] = {
{0x3a, 0x3a, "ldov", IORESOURCE_REG, },
};
static struct resource ldo10_resources[] = {
static const struct resource ldo10_resources[] = {
{0x3e, 0x3e, "ldov", IORESOURCE_REG, },
};
static struct resource ldo11_resources[] = {
static const struct resource ldo11_resources[] = {
{0x42, 0x42, "ldov", IORESOURCE_REG, },
};
static struct resource ldo12_resources[] = {
static const struct resource ldo12_resources[] = {
{0x46, 0x46, "ldov", IORESOURCE_REG, },
};
static struct resource ldo13_resources[] = {
static const struct resource ldo13_resources[] = {
{0x4a, 0x4a, "ldov", IORESOURCE_REG, },
};
static struct resource ldo14_resources[] = {
static const struct resource ldo14_resources[] = {
{0x4e, 0x4e, "ldov", IORESOURCE_REG, },
};
static struct resource ldo15_resources[] = {
static const struct resource ldo15_resources[] = {
{0x52, 0x52, "ldov", IORESOURCE_REG, },
};
static struct resource ldo16_resources[] = {
static const struct resource ldo16_resources[] = {
{0x12, 0x12, "ldov", IORESOURCE_REG, },
};
static struct resource ldo17_resources[] = {
static const struct resource ldo17_resources[] = {
{0x16, 0x16, "ldov", IORESOURCE_REG, },
};
static struct resource ldo18_resources[] = {
static const struct resource ldo18_resources[] = {
{0x74, 0x74, "ldov", IORESOURCE_REG, },
};
static struct resource ldo19_resources[] = {
static const struct resource ldo19_resources[] = {
{0x5e, 0x5e, "ldov", IORESOURCE_REG, },
};
static struct resource ldo20_resources[] = {
static const struct resource ldo20_resources[] = {
{0x9e, 0x9e, "ldov", IORESOURCE_REG, },
};

View File

@ -97,7 +97,7 @@ static struct regmap_irq_chip cpcap_irq_chip[CPCAP_NR_IRQ_CHIPS] = {
.ack_base = CPCAP_REG_MI1,
.mask_base = CPCAP_REG_MIM1,
.use_ack = true,
.ack_invert = true,
.clear_ack = true,
},
{
.name = "cpcap-m2",
@ -106,7 +106,7 @@ static struct regmap_irq_chip cpcap_irq_chip[CPCAP_NR_IRQ_CHIPS] = {
.ack_base = CPCAP_REG_MI2,
.mask_base = CPCAP_REG_MIM2,
.use_ack = true,
.ack_invert = true,
.clear_ack = true,
},
{
.name = "cpcap1-4",
@ -115,7 +115,7 @@ static struct regmap_irq_chip cpcap_irq_chip[CPCAP_NR_IRQ_CHIPS] = {
.ack_base = CPCAP_REG_INT1,
.mask_base = CPCAP_REG_INTM1,
.use_ack = true,
.ack_invert = true,
.clear_ack = true,
},
};

View File

@ -237,7 +237,7 @@ static struct platform_driver mt6397_driver = {
.probe = mt6397_probe,
.driver = {
.name = "mt6397",
.of_match_table = of_match_ptr(mt6397_of_match),
.of_match_table = mt6397_of_match,
},
.id_table = mt6397_id,
};

View File

@ -36,6 +36,8 @@
#define PM8998_SUBTYPE 0x14
#define PMI8998_SUBTYPE 0x15
#define PM8005_SUBTYPE 0x18
#define PM660L_SUBTYPE 0x1A
#define PM660_SUBTYPE 0x1B
static const struct of_device_id pmic_spmi_id_table[] = {
{ .compatible = "qcom,spmi-pmic", .data = (void *)COMMON_SUBTYPE },
@ -57,6 +59,8 @@ static const struct of_device_id pmic_spmi_id_table[] = {
{ .compatible = "qcom,pm8998", .data = (void *)PM8998_SUBTYPE },
{ .compatible = "qcom,pmi8998", .data = (void *)PMI8998_SUBTYPE },
{ .compatible = "qcom,pm8005", .data = (void *)PM8005_SUBTYPE },
{ .compatible = "qcom,pm660l", .data = (void *)PM660L_SUBTYPE },
{ .compatible = "qcom,pm660", .data = (void *)PM660_SUBTYPE },
{ }
};

View File

@ -14,7 +14,7 @@
static struct rdc321x_wdt_pdata rdc321x_wdt_pdata;
static struct resource rdc321x_wdt_resource[] = {
static const struct resource rdc321x_wdt_resource[] = {
{
.name = "wdt-reg",
.start = RDC321X_WDT_CTRL,
@ -27,7 +27,7 @@ static struct rdc321x_gpio_pdata rdc321x_gpio_pdata = {
.max_gpios = RDC321X_NUM_GPIO,
};
static struct resource rdc321x_gpio_resources[] = {
static const struct resource rdc321x_gpio_resources[] = {
{
.name = "gpio-reg1",
.start = RDC321X_GPIO_CTRL_REG1,

View File

@ -45,7 +45,7 @@ struct retu_dev {
struct regmap_irq_chip_data *irq_data;
};
static struct resource retu_pwrbutton_res[] = {
static const struct resource retu_pwrbutton_res[] = {
{
.name = "retu-pwrbutton",
.start = RETU_INT_PWR,
@ -84,7 +84,7 @@ static struct regmap_irq_chip retu_irq_chip = {
/* Retu device registered for the power off. */
static struct retu_dev *retu_pm_power_off;
static struct resource tahvo_usb_res[] = {
static const struct resource tahvo_usb_res[] = {
{
.name = "tahvo-usb",
.start = TAHVO_INT_VBUS,

View File

@ -107,20 +107,20 @@ static const struct regmap_config rk817_regmap_config = {
.volatile_reg = rk817_is_volatile_reg,
};
static struct resource rtc_resources[] = {
static const struct resource rtc_resources[] = {
DEFINE_RES_IRQ(RK808_IRQ_RTC_ALARM),
};
static struct resource rk817_rtc_resources[] = {
static const struct resource rk817_rtc_resources[] = {
DEFINE_RES_IRQ(RK817_IRQ_RTC_ALARM),
};
static struct resource rk805_key_resources[] = {
static const struct resource rk805_key_resources[] = {
DEFINE_RES_IRQ(RK805_IRQ_PWRON_RISE),
DEFINE_RES_IRQ(RK805_IRQ_PWRON_FALL),
};
static struct resource rk817_pwrkey_resources[] = {
static const struct resource rk817_pwrkey_resources[] = {
DEFINE_RES_IRQ(RK817_IRQ_PWRON_RISE),
DEFINE_RES_IRQ(RK817_IRQ_PWRON_FALL),
};

View File

@ -122,7 +122,7 @@ MODULE_DEVICE_TABLE(of, rt5033_dt_match);
static struct i2c_driver rt5033_driver = {
.driver = {
.name = "rt5033",
.of_match_table = of_match_ptr(rt5033_dt_match),
.of_match_table = rt5033_dt_match,
},
.probe = rt5033_i2c_probe,
.id_table = rt5033_i2c_id,

View File

@ -329,11 +329,11 @@ static int stmfx_chip_init(struct i2c_client *client)
stmfx->vdd = devm_regulator_get_optional(&client->dev, "vdd");
ret = PTR_ERR_OR_ZERO(stmfx->vdd);
if (ret == -ENODEV) {
stmfx->vdd = NULL;
} else {
return dev_err_probe(&client->dev, ret,
"Failed to get VDD regulator\n");
if (ret) {
if (ret == -ENODEV)
stmfx->vdd = NULL;
else
return dev_err_probe(&client->dev, ret, "Failed to get VDD regulator\n");
}
if (stmfx->vdd) {
@ -548,7 +548,7 @@ MODULE_DEVICE_TABLE(of, stmfx_of_match);
static struct i2c_driver stmfx_driver = {
.driver = {
.name = "stmfx-core",
.of_match_table = of_match_ptr(stmfx_of_match),
.of_match_table = stmfx_of_match,
.pm = &stmfx_dev_pm_ops,
},
.probe = stmfx_probe,

View File

@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(stmpe_set_altfunc);
* GPIO (all variants)
*/
static struct resource stmpe_gpio_resources[] = {
static const struct resource stmpe_gpio_resources[] = {
/* Start and end filled dynamically */
{
.flags = IORESOURCE_IRQ,
@ -336,7 +336,7 @@ static const struct mfd_cell stmpe_gpio_cell_noirq = {
* Keypad (1601, 2401, 2403)
*/
static struct resource stmpe_keypad_resources[] = {
static const struct resource stmpe_keypad_resources[] = {
{
.name = "KEYPAD",
.flags = IORESOURCE_IRQ,
@ -357,7 +357,7 @@ static const struct mfd_cell stmpe_keypad_cell = {
/*
* PWM (1601, 2401, 2403)
*/
static struct resource stmpe_pwm_resources[] = {
static const struct resource stmpe_pwm_resources[] = {
{
.name = "PWM0",
.flags = IORESOURCE_IRQ,
@ -445,7 +445,7 @@ static struct stmpe_variant_info stmpe801_noirq = {
* Touchscreen (STMPE811 or STMPE610)
*/
static struct resource stmpe_ts_resources[] = {
static const struct resource stmpe_ts_resources[] = {
{
.name = "TOUCH_DET",
.flags = IORESOURCE_IRQ,
@ -467,7 +467,7 @@ static const struct mfd_cell stmpe_ts_cell = {
* ADC (STMPE811)
*/
static struct resource stmpe_adc_resources[] = {
static const struct resource stmpe_adc_resources[] = {
{
.name = "STMPE_TEMP_SENS",
.flags = IORESOURCE_IRQ,

View File

@ -18,7 +18,7 @@
#define ARCH_SUN5I_A13 1
#define ARCH_SUN6I_A31 2
static struct resource adc_resources[] = {
static const struct resource adc_resources[] = {
DEFINE_RES_IRQ_NAMED(SUN4I_GPADC_IRQ_FIFO_DATA, "FIFO_DATA_PENDING"),
DEFINE_RES_IRQ_NAMED(SUN4I_GPADC_IRQ_TEMP_DATA, "TEMP_DATA_PENDING"),
};
@ -166,7 +166,7 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
static struct platform_driver sun4i_gpadc_driver = {
.driver = {
.name = "sun4i-gpadc",
.of_match_table = of_match_ptr(sun4i_gpadc_of_match),
.of_match_table = sun4i_gpadc_of_match,
},
.probe = sun4i_gpadc_probe,
};

View File

@ -255,6 +255,24 @@ struct regmap *syscon_regmap_lookup_by_phandle_args(struct device_node *np,
}
EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_phandle_args);
/*
* It behaves the same as syscon_regmap_lookup_by_phandle() except where
* there is no regmap phandle. In this case, instead of returning -ENODEV,
* the function returns NULL.
*/
struct regmap *syscon_regmap_lookup_by_phandle_optional(struct device_node *np,
const char *property)
{
struct regmap *regmap;
regmap = syscon_regmap_lookup_by_phandle(np, property);
if (IS_ERR(regmap) && PTR_ERR(regmap) == -ENODEV)
return NULL;
return regmap;
}
EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_phandle_optional);
static int syscon_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;

View File

@ -141,7 +141,7 @@ out:
}
EXPORT_SYMBOL_GPL(tc3589x_set_bits);
static struct resource gpio_resources[] = {
static const struct resource gpio_resources[] = {
{
.start = TC3589x_INT_GPIIRQ,
.end = TC3589x_INT_GPIIRQ,
@ -149,7 +149,7 @@ static struct resource gpio_resources[] = {
},
};
static struct resource keypad_resources[] = {
static const struct resource keypad_resources[] = {
{
.start = TC3589x_INT_KBDIRQ,
.end = TC3589x_INT_KBDIRQ,

View File

@ -25,7 +25,7 @@ struct tc6387xb {
struct resource rscr;
};
static struct resource tc6387xb_mmc_resources[] = {
static const struct resource tc6387xb_mmc_resources[] = {
{
.start = 0x800,
.end = 0x9ff,

View File

@ -133,7 +133,7 @@ static int tc6393xb_nand_enable(struct platform_device *nand)
return 0;
}
static struct resource tc6393xb_nand_resources[] = {
static const struct resource tc6393xb_nand_resources[] = {
{
.start = 0x1000,
.end = 0x1007,
@ -151,7 +151,7 @@ static struct resource tc6393xb_nand_resources[] = {
},
};
static struct resource tc6393xb_mmc_resources[] = {
static const struct resource tc6393xb_mmc_resources[] = {
{
.start = 0x800,
.end = 0x9ff,
@ -192,7 +192,7 @@ static const struct resource tc6393xb_ohci_resources[] = {
},
};
static struct resource tc6393xb_fb_resources[] = {
static const struct resource tc6393xb_fb_resources[] = {
{
.start = 0x5000,
.end = 0x51ff,

View File

@ -38,7 +38,7 @@
#define TPS65090_INT2_MASK_OVERLOAD_FET6 6
#define TPS65090_INT2_MASK_OVERLOAD_FET7 7
static struct resource charger_resources[] = {
static const struct resource charger_resources[] = {
{
.start = TPS65090_IRQ_VAC_STATUS_CHANGE,
.end = TPS65090_IRQ_VAC_STATUS_CHANGE,

View File

@ -33,12 +33,12 @@
#include <linux/mfd/core.h>
#include <linux/mfd/tps65217.h>
static struct resource charger_resources[] = {
static const struct resource charger_resources[] = {
DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_AC, "AC"),
DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_USB, "USB"),
};
static struct resource pb_resources[] = {
static const struct resource pb_resources[] = {
DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_PB, "PB"),
};

View File

@ -92,7 +92,7 @@ static const struct tps6586x_irq_data tps6586x_irqs[] = {
[TPS6586X_INT_RTC_ALM2] = TPS6586X_IRQ(TPS6586X_INT_MASK4, 1 << 1),
};
static struct resource tps6586x_rtc_resources[] = {
static const struct resource tps6586x_rtc_resources[] = {
{
.start = TPS6586X_INT_RTC_ALM1,
.end = TPS6586X_INT_RTC_ALM1,

View File

@ -21,7 +21,7 @@
#include <linux/of.h>
#include <linux/of_device.h>
static struct resource rtc_resources[] = {
static const struct resource rtc_resources[] = {
{
.start = TPS65910_IRQ_RTC_ALARM,
.end = TPS65910_IRQ_RTC_ALARM,
@ -292,8 +292,8 @@ static int tps65910_ck32k_init(struct tps65910 *tps65910,
if (!pmic_pdata->en_ck32k_xtal)
return 0;
ret = tps65910_reg_clear_bits(tps65910, TPS65910_DEVCTRL,
DEVCTRL_CK32K_CTRL_MASK);
ret = regmap_clear_bits(tps65910->regmap, TPS65910_DEVCTRL,
DEVCTRL_CK32K_CTRL_MASK);
if (ret < 0) {
dev_err(tps65910->dev, "clear ck32k_ctrl failed: %d\n", ret);
return ret;
@ -314,17 +314,17 @@ static int tps65910_sleepinit(struct tps65910 *tps65910,
dev = tps65910->dev;
/* enabling SLEEP device state */
ret = tps65910_reg_set_bits(tps65910, TPS65910_DEVCTRL,
DEVCTRL_DEV_SLP_MASK);
ret = regmap_set_bits(tps65910->regmap, TPS65910_DEVCTRL,
DEVCTRL_DEV_SLP_MASK);
if (ret < 0) {
dev_err(dev, "set dev_slp failed: %d\n", ret);
goto err_sleep_init;
}
if (pmic_pdata->slp_keepon.therm_keepon) {
ret = tps65910_reg_set_bits(tps65910,
TPS65910_SLEEP_KEEP_RES_ON,
SLEEP_KEEP_RES_ON_THERM_KEEPON_MASK);
ret = regmap_set_bits(tps65910->regmap,
TPS65910_SLEEP_KEEP_RES_ON,
SLEEP_KEEP_RES_ON_THERM_KEEPON_MASK);
if (ret < 0) {
dev_err(dev, "set therm_keepon failed: %d\n", ret);
goto disable_dev_slp;
@ -332,9 +332,9 @@ static int tps65910_sleepinit(struct tps65910 *tps65910,
}
if (pmic_pdata->slp_keepon.clkout32k_keepon) {
ret = tps65910_reg_set_bits(tps65910,
TPS65910_SLEEP_KEEP_RES_ON,
SLEEP_KEEP_RES_ON_CLKOUT32K_KEEPON_MASK);
ret = regmap_set_bits(tps65910->regmap,
TPS65910_SLEEP_KEEP_RES_ON,
SLEEP_KEEP_RES_ON_CLKOUT32K_KEEPON_MASK);
if (ret < 0) {
dev_err(dev, "set clkout32k_keepon failed: %d\n", ret);
goto disable_dev_slp;
@ -342,9 +342,9 @@ static int tps65910_sleepinit(struct tps65910 *tps65910,
}
if (pmic_pdata->slp_keepon.i2chs_keepon) {
ret = tps65910_reg_set_bits(tps65910,
TPS65910_SLEEP_KEEP_RES_ON,
SLEEP_KEEP_RES_ON_I2CHS_KEEPON_MASK);
ret = regmap_set_bits(tps65910->regmap,
TPS65910_SLEEP_KEEP_RES_ON,
SLEEP_KEEP_RES_ON_I2CHS_KEEPON_MASK);
if (ret < 0) {
dev_err(dev, "set i2chs_keepon failed: %d\n", ret);
goto disable_dev_slp;
@ -354,8 +354,8 @@ static int tps65910_sleepinit(struct tps65910 *tps65910,
return 0;
disable_dev_slp:
tps65910_reg_clear_bits(tps65910, TPS65910_DEVCTRL,
DEVCTRL_DEV_SLP_MASK);
regmap_clear_bits(tps65910->regmap, TPS65910_DEVCTRL,
DEVCTRL_DEV_SLP_MASK);
err_sleep_init:
return ret;
@ -436,12 +436,18 @@ static void tps65910_power_off(void)
tps65910 = dev_get_drvdata(&tps65910_i2c_client->dev);
if (tps65910_reg_set_bits(tps65910, TPS65910_DEVCTRL,
DEVCTRL_PWR_OFF_MASK) < 0)
/*
* The PWR_OFF bit needs to be set separately, before transitioning
* to the OFF state. It enables the "sequential" power-off mode on
* TPS65911, it's a NO-OP on TPS65910.
*/
if (regmap_set_bits(tps65910->regmap, TPS65910_DEVCTRL,
DEVCTRL_PWR_OFF_MASK) < 0)
return;
tps65910_reg_clear_bits(tps65910, TPS65910_DEVCTRL,
DEVCTRL_DEV_ON_MASK);
regmap_update_bits(tps65910->regmap, TPS65910_DEVCTRL,
DEVCTRL_DEV_OFF_MASK | DEVCTRL_DEV_ON_MASK,
DEVCTRL_DEV_OFF_MASK);
}
static int tps65910_i2c_probe(struct i2c_client *i2c,

View File

@ -69,7 +69,7 @@ static int comp_threshold_set(struct tps65910 *tps65910, int id, int voltage)
return -EINVAL;
val = index << 1;
ret = tps65910_reg_write(tps65910, tps_comp.reg, val);
ret = regmap_write(tps65910->regmap, tps_comp.reg, val);
return ret;
}
@ -80,7 +80,7 @@ static int comp_threshold_get(struct tps65910 *tps65910, int id)
unsigned int val;
int ret;
ret = tps65910_reg_read(tps65910, tps_comp.reg, &val);
ret = regmap_read(tps65910->regmap, tps_comp.reg, &val);
if (ret < 0)
return ret;

View File

@ -34,7 +34,7 @@
#include <linux/regmap.h>
#include <linux/slab.h>
static struct resource tps80031_rtc_resources[] = {
static const struct resource tps80031_rtc_resources[] = {
{
.start = TPS80031_INT_RTC_ALARM,
.end = TPS80031_INT_RTC_ALARM,

View File

@ -356,7 +356,7 @@ static const struct irq_domain_ops twl6030_irq_domain_ops = {
.xlate = irq_domain_xlate_onetwocell,
};
static const struct of_device_id twl6030_of_match[] = {
static const struct of_device_id twl6030_of_match[] __maybe_unused = {
{.compatible = "ti,twl6030", &twl6030_interrupt_mapping},
{.compatible = "ti,twl6032", &twl6032_interrupt_mapping},
{ },

View File

@ -616,7 +616,7 @@ int wm831x_set_bits(struct wm831x *wm831x, unsigned short reg,
}
EXPORT_SYMBOL_GPL(wm831x_set_bits);
static struct resource wm831x_dcdc1_resources[] = {
static const struct resource wm831x_dcdc1_resources[] = {
{
.start = WM831X_DC1_CONTROL_1,
.end = WM831X_DC1_DVS_CONTROL,
@ -637,7 +637,7 @@ static struct resource wm831x_dcdc1_resources[] = {
};
static struct resource wm831x_dcdc2_resources[] = {
static const struct resource wm831x_dcdc2_resources[] = {
{
.start = WM831X_DC2_CONTROL_1,
.end = WM831X_DC2_DVS_CONTROL,
@ -657,7 +657,7 @@ static struct resource wm831x_dcdc2_resources[] = {
},
};
static struct resource wm831x_dcdc3_resources[] = {
static const struct resource wm831x_dcdc3_resources[] = {
{
.start = WM831X_DC3_CONTROL_1,
.end = WM831X_DC3_SLEEP_CONTROL,
@ -671,7 +671,7 @@ static struct resource wm831x_dcdc3_resources[] = {
},
};
static struct resource wm831x_dcdc4_resources[] = {
static const struct resource wm831x_dcdc4_resources[] = {
{
.start = WM831X_DC4_CONTROL,
.end = WM831X_DC4_SLEEP_CONTROL,
@ -685,7 +685,7 @@ static struct resource wm831x_dcdc4_resources[] = {
},
};
static struct resource wm8320_dcdc4_buck_resources[] = {
static const struct resource wm8320_dcdc4_buck_resources[] = {
{
.start = WM831X_DC4_CONTROL,
.end = WM832X_DC4_SLEEP_CONTROL,
@ -699,7 +699,7 @@ static struct resource wm8320_dcdc4_buck_resources[] = {
},
};
static struct resource wm831x_gpio_resources[] = {
static const struct resource wm831x_gpio_resources[] = {
{
.start = WM831X_IRQ_GPIO_1,
.end = WM831X_IRQ_GPIO_16,
@ -707,7 +707,7 @@ static struct resource wm831x_gpio_resources[] = {
},
};
static struct resource wm831x_isink1_resources[] = {
static const struct resource wm831x_isink1_resources[] = {
{
.start = WM831X_CURRENT_SINK_1,
.end = WM831X_CURRENT_SINK_1,
@ -720,7 +720,7 @@ static struct resource wm831x_isink1_resources[] = {
},
};
static struct resource wm831x_isink2_resources[] = {
static const struct resource wm831x_isink2_resources[] = {
{
.start = WM831X_CURRENT_SINK_2,
.end = WM831X_CURRENT_SINK_2,
@ -733,7 +733,7 @@ static struct resource wm831x_isink2_resources[] = {
},
};
static struct resource wm831x_ldo1_resources[] = {
static const struct resource wm831x_ldo1_resources[] = {
{
.start = WM831X_LDO1_CONTROL,
.end = WM831X_LDO1_SLEEP_CONTROL,
@ -747,7 +747,7 @@ static struct resource wm831x_ldo1_resources[] = {
},
};
static struct resource wm831x_ldo2_resources[] = {
static const struct resource wm831x_ldo2_resources[] = {
{
.start = WM831X_LDO2_CONTROL,
.end = WM831X_LDO2_SLEEP_CONTROL,
@ -761,7 +761,7 @@ static struct resource wm831x_ldo2_resources[] = {
},
};
static struct resource wm831x_ldo3_resources[] = {
static const struct resource wm831x_ldo3_resources[] = {
{
.start = WM831X_LDO3_CONTROL,
.end = WM831X_LDO3_SLEEP_CONTROL,
@ -775,7 +775,7 @@ static struct resource wm831x_ldo3_resources[] = {
},
};
static struct resource wm831x_ldo4_resources[] = {
static const struct resource wm831x_ldo4_resources[] = {
{
.start = WM831X_LDO4_CONTROL,
.end = WM831X_LDO4_SLEEP_CONTROL,
@ -789,7 +789,7 @@ static struct resource wm831x_ldo4_resources[] = {
},
};
static struct resource wm831x_ldo5_resources[] = {
static const struct resource wm831x_ldo5_resources[] = {
{
.start = WM831X_LDO5_CONTROL,
.end = WM831X_LDO5_SLEEP_CONTROL,
@ -803,7 +803,7 @@ static struct resource wm831x_ldo5_resources[] = {
},
};
static struct resource wm831x_ldo6_resources[] = {
static const struct resource wm831x_ldo6_resources[] = {
{
.start = WM831X_LDO6_CONTROL,
.end = WM831X_LDO6_SLEEP_CONTROL,
@ -817,7 +817,7 @@ static struct resource wm831x_ldo6_resources[] = {
},
};
static struct resource wm831x_ldo7_resources[] = {
static const struct resource wm831x_ldo7_resources[] = {
{
.start = WM831X_LDO7_CONTROL,
.end = WM831X_LDO7_SLEEP_CONTROL,
@ -831,7 +831,7 @@ static struct resource wm831x_ldo7_resources[] = {
},
};
static struct resource wm831x_ldo8_resources[] = {
static const struct resource wm831x_ldo8_resources[] = {
{
.start = WM831X_LDO8_CONTROL,
.end = WM831X_LDO8_SLEEP_CONTROL,
@ -845,7 +845,7 @@ static struct resource wm831x_ldo8_resources[] = {
},
};
static struct resource wm831x_ldo9_resources[] = {
static const struct resource wm831x_ldo9_resources[] = {
{
.start = WM831X_LDO9_CONTROL,
.end = WM831X_LDO9_SLEEP_CONTROL,
@ -859,7 +859,7 @@ static struct resource wm831x_ldo9_resources[] = {
},
};
static struct resource wm831x_ldo10_resources[] = {
static const struct resource wm831x_ldo10_resources[] = {
{
.start = WM831X_LDO10_CONTROL,
.end = WM831X_LDO10_SLEEP_CONTROL,
@ -873,7 +873,7 @@ static struct resource wm831x_ldo10_resources[] = {
},
};
static struct resource wm831x_ldo11_resources[] = {
static const struct resource wm831x_ldo11_resources[] = {
{
.start = WM831X_LDO11_ON_CONTROL,
.end = WM831X_LDO11_SLEEP_CONTROL,
@ -881,7 +881,7 @@ static struct resource wm831x_ldo11_resources[] = {
},
};
static struct resource wm831x_on_resources[] = {
static const struct resource wm831x_on_resources[] = {
{
.start = WM831X_IRQ_ON,
.end = WM831X_IRQ_ON,
@ -890,7 +890,7 @@ static struct resource wm831x_on_resources[] = {
};
static struct resource wm831x_power_resources[] = {
static const struct resource wm831x_power_resources[] = {
{
.name = "SYSLO",
.start = WM831X_IRQ_PPM_SYSLO,
@ -959,7 +959,7 @@ static struct resource wm831x_power_resources[] = {
},
};
static struct resource wm831x_rtc_resources[] = {
static const struct resource wm831x_rtc_resources[] = {
{
.name = "PER",
.start = WM831X_IRQ_RTC_PER,
@ -974,7 +974,7 @@ static struct resource wm831x_rtc_resources[] = {
},
};
static struct resource wm831x_status1_resources[] = {
static const struct resource wm831x_status1_resources[] = {
{
.start = WM831X_STATUS_LED_1,
.end = WM831X_STATUS_LED_1,
@ -982,7 +982,7 @@ static struct resource wm831x_status1_resources[] = {
},
};
static struct resource wm831x_status2_resources[] = {
static const struct resource wm831x_status2_resources[] = {
{
.start = WM831X_STATUS_LED_2,
.end = WM831X_STATUS_LED_2,
@ -990,7 +990,7 @@ static struct resource wm831x_status2_resources[] = {
},
};
static struct resource wm831x_touch_resources[] = {
static const struct resource wm831x_touch_resources[] = {
{
.name = "TCHPD",
.start = WM831X_IRQ_TCHPD,
@ -1005,7 +1005,7 @@ static struct resource wm831x_touch_resources[] = {
},
};
static struct resource wm831x_wdt_resources[] = {
static const struct resource wm831x_wdt_resources[] = {
{
.start = WM831X_IRQ_WDOG_TO,
.end = WM831X_IRQ_WDOG_TO,

View File

@ -40,7 +40,7 @@ static const struct mfd_cell wm8994_regulator_devs[] = {
},
};
static struct resource wm8994_codec_resources[] = {
static const struct resource wm8994_codec_resources[] = {
{
.start = WM8994_IRQ_TEMP_SHUT,
.end = WM8994_IRQ_TEMP_WARN,
@ -48,7 +48,7 @@ static struct resource wm8994_codec_resources[] = {
},
};
static struct resource wm8994_gpio_resources[] = {
static const struct resource wm8994_gpio_resources[] = {
{
.start = WM8994_IRQ_GPIO(1),
.end = WM8994_IRQ_GPIO(11),
@ -683,7 +683,7 @@ static struct i2c_driver wm8994_i2c_driver = {
.driver = {
.name = "wm8994",
.pm = &wm8994_pm_ops,
.of_match_table = of_match_ptr(wm8994_of_match),
.of_match_table = wm8994_of_match,
},
.probe = wm8994_i2c_probe,
.remove = wm8994_i2c_remove,

View File

@ -186,6 +186,7 @@ struct madera {
struct regulator_bulk_data core_supplies[MADERA_MAX_CORE_SUPPLIES];
struct regulator *dcvdd;
bool internal_dcvdd;
bool reset_errata;
struct madera_pdata pdata;

File diff suppressed because it is too large Load Diff

View File

@ -91,14 +91,14 @@ enum rt5033_reg {
#define RT5033_RT_HZ_MASK 0x01
/* RT5033 control register */
#define RT5033_CTRL_FCCM_BUCK_MASK 0x00
#define RT5033_CTRL_BUCKOMS_MASK 0x01
#define RT5033_CTRL_LDOOMS_MASK 0x02
#define RT5033_CTRL_SLDOOMS_MASK 0x03
#define RT5033_CTRL_EN_BUCK_MASK 0x04
#define RT5033_CTRL_EN_LDO_MASK 0x05
#define RT5033_CTRL_EN_SAFE_LDO_MASK 0x06
#define RT5033_CTRL_LDO_SLEEP_MASK 0x07
#define RT5033_CTRL_FCCM_BUCK_MASK BIT(0)
#define RT5033_CTRL_BUCKOMS_MASK BIT(1)
#define RT5033_CTRL_LDOOMS_MASK BIT(2)
#define RT5033_CTRL_SLDOOMS_MASK BIT(3)
#define RT5033_CTRL_EN_BUCK_MASK BIT(4)
#define RT5033_CTRL_EN_LDO_MASK BIT(5)
#define RT5033_CTRL_EN_SAFE_LDO_MASK BIT(6)
#define RT5033_CTRL_LDO_SLEEP_MASK BIT(7)
/* RT5033 BUCK control register */
#define RT5033_BUCK_CTRL_MASK 0x1f
@ -247,11 +247,11 @@ enum rt5033_fuel_reg {
#define RT5033_FUEL_BAT_PRESENT 0x02
/* RT5033 PMIC interrupts */
#define RT5033_PMIC_IRQ_BUCKOCP 2
#define RT5033_PMIC_IRQ_BUCKLV 3
#define RT5033_PMIC_IRQ_SAFELDOLV 4
#define RT5033_PMIC_IRQ_LDOLV 5
#define RT5033_PMIC_IRQ_OT 6
#define RT5033_PMIC_IRQ_VDDA_UV 7
#define RT5033_PMIC_IRQ_BUCKOCP BIT(2)
#define RT5033_PMIC_IRQ_BUCKLV BIT(3)
#define RT5033_PMIC_IRQ_SAFELDOLV BIT(4)
#define RT5033_PMIC_IRQ_LDOLV BIT(5)
#define RT5033_PMIC_IRQ_OT BIT(6)
#define RT5033_PMIC_IRQ_VDDA_UV BIT(7)
#endif /* __RT5033_PRIVATE_H__ */

View File

@ -57,7 +57,7 @@ enum si476x_mfd_cells {
* @SI476X_POWER_DOWN: In this state all regulators are turned off
* and the reset line is pulled low. The device is completely
* inactive.
* @SI476X_POWER_UP_FULL: In this state all the power regualtors are
* @SI476X_POWER_UP_FULL: In this state all the power regulators are
* turned on, reset line pulled high, IRQ line is enabled(polling is
* active for polling use scenario) and device is turned on with
* POWER_UP command. The device is ready to be used.

View File

@ -28,6 +28,9 @@ extern struct regmap *syscon_regmap_lookup_by_phandle_args(
const char *property,
int arg_count,
unsigned int *out_args);
extern struct regmap *syscon_regmap_lookup_by_phandle_optional(
struct device_node *np,
const char *property);
#else
static inline struct regmap *device_node_to_regmap(struct device_node *np)
{
@ -59,6 +62,14 @@ static inline struct regmap *syscon_regmap_lookup_by_phandle_args(
{
return ERR_PTR(-ENOTSUPP);
}
static inline struct regmap *syscon_regmap_lookup_by_phandle_optional(
struct device_node *np,
const char *property)
{
return NULL;
}
#endif
#endif /* __LINUX_MFD_SYSCON_H__ */

View File

@ -890,11 +890,6 @@ struct tps65910 {
struct regmap *regmap;
unsigned long id;
/* Client devices */
struct tps65910_pmic *pmic;
struct tps65910_rtc *rtc;
struct tps65910_power *power;
/* Device node parsed board data */
struct tps65910_board *of_plat_data;
@ -913,39 +908,4 @@ static inline int tps65910_chip_id(struct tps65910 *tps65910)
return tps65910->id;
}
static inline int tps65910_reg_read(struct tps65910 *tps65910, u8 reg,
unsigned int *val)
{
return regmap_read(tps65910->regmap, reg, val);
}
static inline int tps65910_reg_write(struct tps65910 *tps65910, u8 reg,
unsigned int val)
{
return regmap_write(tps65910->regmap, reg, val);
}
static inline int tps65910_reg_set_bits(struct tps65910 *tps65910, u8 reg,
u8 mask)
{
return regmap_update_bits(tps65910->regmap, reg, mask, mask);
}
static inline int tps65910_reg_clear_bits(struct tps65910 *tps65910, u8 reg,
u8 mask)
{
return regmap_update_bits(tps65910->regmap, reg, mask, 0);
}
static inline int tps65910_reg_update_bits(struct tps65910 *tps65910, u8 reg,
u8 mask, u8 val)
{
return regmap_update_bits(tps65910->regmap, reg, mask, val);
}
static inline int tps65910_irq_get_virq(struct tps65910 *tps65910, int irq)
{
return regmap_irq_get_virq(tps65910->irq_data, irq);
}
#endif /* __LINUX_MFD_TPS65910_H */