Skip to content

Commit

Permalink
Merge tag 'mfd-next-5.11' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/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
  ...
  • Loading branch information
Linus Torvalds committed Dec 16, 2020
2 parents fff875a + 0cd3aa9 commit 278f54c
Show file tree
Hide file tree
Showing 62 changed files with 410 additions and 974 deletions.
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/mfd/rohm,bd71837-pmic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/mfd/syscon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions drivers/gpio/gpio-tps65910.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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);
}

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/88pm800.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
50 changes: 25 additions & 25 deletions drivers/mfd/88pm860x-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, },
};

Expand Down
32 changes: 5 additions & 27 deletions drivers/mfd/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/altera-sysmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
12 changes: 4 additions & 8 deletions drivers/mfd/at91-usart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 2 additions & 0 deletions drivers/mfd/axp20x-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/bcm590xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions drivers/mfd/da9055-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/da9055-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};

Expand Down
Loading

0 comments on commit 278f54c

Please sign in to comment.