Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbfd2cd7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull mfd fixes from Samuel Ortiz:
 "This is the first batch of MFD fixes for 3.10.

  It's bigger than I would like, most of it is due to the big ab/db8500
  merge that went through during the 3.10 merge window.

  So we have:

   - Some build fixes for the tps65912 and ab8500 drivers.
   - A couple of build fixes for the the si476x driver with pre 4.3 gcc
     compilers.
   - A few runtime breakage fixes (probe failures or oopses) for the
     ab8500 and db8500 drivers.
   - Some sparse or regular gcc warning fixes for the si476x, ab8500 and
     cros_ec drivers."

* tag 'mfd-fixes-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes:
  mfd: ab8500-sysctrl: Let sysctrl driver work without pdata
  mfd: db8500-prcmu: Update stored DSI PLL divider value
  mfd: ab8500-sysctrl: Always enable pm_power_off handler
  mfd: ab8500-core: Pass GPADC compatible string to MFD core
  mfd: db8500-prcmu: Supply the pdata_size attribute for db8500-thermal
  mfd: ab8500-core: Use the correct driver name when enabling gpio/pinctrl
  mfd: ab8500: Pass AB8500 IRQ to debugfs code by resource
  mfd: ab8500-gpadc: Suppress 'ignoring regulator_enable() return value' warning
  mfd: ab8500-sysctrl: Set sysctrl_dev during probe
  mfd: ab8500-sysctrl: Fix sparse warning
  mfd: abx500-core: Fix sparse warning
  mfd: ab8500: Debugfs code depends on gpadc
  mfd: si476x: Use get_unaligned_be16() for unaligned be16 loads
  mfd: cros_ec_spi: Use %z to format pointer differences
  mfd: si476x: Do not use binary constants
  mfd: tps65912: Select MFD_CORE
parents 94f1be97 5649d8f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -579,7 +579,7 @@ config AB8500_CORE

config AB8500_DEBUG
       bool "Enable debug info via debugfs"
       depends on AB8500_CORE && DEBUG_FS
       depends on AB8500_GPADC && DEBUG_FS
       default y if DEBUG_FS
       help
         Select this option if you want debug information using the debug
@@ -818,6 +818,7 @@ config MFD_TPS65910
config MFD_TPS65912
	bool "TI TPS65912 Power Management chip"
	depends on GPIOLIB
	select MFD_CORE
	help
	  If you say yes here you get support for the TPS65912 series of
	  PM chips.
+21 −3
Original line number Diff line number Diff line
@@ -867,6 +867,15 @@ static struct resource ab8500_chargalg_resources[] = {};

#ifdef CONFIG_DEBUG_FS
static struct resource ab8500_debug_resources[] = {
	{
		.name	= "IRQ_AB8500",
		/*
		 * Number will be filled in. NOTE: this is deliberately
		 * not flagged as an IRQ in ordet to avoid remapping using
		 * the irqdomain in the MFD core, so that this IRQ passes
		 * unremapped to the debug code.
		 */
	},
	{
		.name	= "IRQ_FIRST",
		.start	= AB8500_INT_MAIN_EXT_CH_NOT_OK,
@@ -1051,6 +1060,7 @@ static struct mfd_cell ab8500_devs[] = {
	},
	{
		.name = "ab8500-gpadc",
		.of_compatible = "stericsson,ab8500-gpadc",
		.num_resources = ARRAY_SIZE(ab8500_gpadc_resources),
		.resources = ab8500_gpadc_resources,
	},
@@ -1097,7 +1107,7 @@ static struct mfd_cell ab8500_devs[] = {
		.of_compatible = "stericsson,ab8500-denc",
	},
	{
		.name = "ab8500-gpio",
		.name = "pinctrl-ab8500",
		.of_compatible = "stericsson,ab8500-gpio",
	},
	{
@@ -1208,6 +1218,7 @@ static struct mfd_cell ab8505_devs[] = {
	},
	{
		.name = "ab8500-gpadc",
		.of_compatible = "stericsson,ab8500-gpadc",
		.num_resources = ARRAY_SIZE(ab8505_gpadc_resources),
		.resources = ab8505_gpadc_resources,
	},
@@ -1234,7 +1245,7 @@ static struct mfd_cell ab8505_devs[] = {
		.name = "ab8500-leds",
	},
	{
		.name = "ab8500-gpio",
		.name = "pinctrl-ab8505",
	},
	{
		.name = "ab8500-usb",
@@ -1271,6 +1282,7 @@ static struct mfd_cell ab8540_devs[] = {
	},
	{
		.name = "ab8500-gpadc",
		.of_compatible = "stericsson,ab8500-gpadc",
		.num_resources = ARRAY_SIZE(ab8505_gpadc_resources),
		.resources = ab8505_gpadc_resources,
	},
@@ -1302,7 +1314,7 @@ static struct mfd_cell ab8540_devs[] = {
		.resources = ab8500_temp_resources,
	},
	{
		.name = "ab8500-gpio",
		.name = "pinctrl-ab8540",
	},
	{
		.name = "ab8540-usb",
@@ -1712,6 +1724,12 @@ static int ab8500_probe(struct platform_device *pdev)
	if (ret)
		return ret;

#if CONFIG_DEBUG_FS
	/* Pass to debugfs */
	ab8500_debug_resources[0].start = ab8500->irq;
	ab8500_debug_resources[0].end = ab8500->irq;
#endif

	if (is_ab9540(ab8500))
		ret = mfd_add_devices(ab8500->dev, 0, ab9540_devs,
				ARRAY_SIZE(ab9540_devs), NULL,
+12 −4
Original line number Diff line number Diff line
@@ -91,12 +91,10 @@
#include <linux/ctype.h>
#endif

/* TODO: this file should not reference IRQ_DB8500_AB8500! */
#include <mach/irqs.h>

static u32 debug_bank;
static u32 debug_address;

static int irq_ab8500;
static int irq_first;
static int irq_last;
static u32 *irq_count;
@@ -1589,7 +1587,7 @@ void ab8500_debug_register_interrupt(int line)
{
	if (line < num_interrupt_lines) {
		num_interrupts[line]++;
		if (suspend_test_wake_cause_interrupt_is_mine(IRQ_DB8500_AB8500))
		if (suspend_test_wake_cause_interrupt_is_mine(irq_ab8500))
			num_wake_interrupts[line]++;
	}
}
@@ -2941,6 +2939,7 @@ static int ab8500_debug_probe(struct platform_device *plf)
	struct dentry *file;
	int ret = -ENOMEM;
	struct ab8500 *ab8500;
	struct resource *res;
	debug_bank = AB8500_MISC;
	debug_address = AB8500_REV_REG & 0x00FF;

@@ -2959,6 +2958,15 @@ static int ab8500_debug_probe(struct platform_device *plf)
	if (!event_name)
		goto out_freedev_attr;

	res = platform_get_resource_byname(plf, 0, "IRQ_AB8500");
	if (!res) {
		dev_err(&plf->dev, "AB8500 irq not found, err %d\n",
			irq_first);
		ret = -ENXIO;
		goto out_freeevent_name;
	}
	irq_ab8500 = res->start;

	irq_first = platform_get_irq_byname(plf, "IRQ_FIRST");
	if (irq_first < 0) {
		dev_err(&plf->dev, "First irq not found, err %d\n",
+5 −2
Original line number Diff line number Diff line
@@ -907,14 +907,17 @@ static int ab8500_gpadc_suspend(struct device *dev)
static int ab8500_gpadc_resume(struct device *dev)
{
	struct ab8500_gpadc *gpadc = dev_get_drvdata(dev);
	int ret;

	regulator_enable(gpadc->regu);
	ret = regulator_enable(gpadc->regu);
	if (ret)
		dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret);

	pm_runtime_mark_last_busy(gpadc->dev);
	pm_runtime_put_autosuspend(gpadc->dev);

	mutex_unlock(&gpadc->ab8500_gpadc_lock);
	return 0;
	return ret;
}

static int ab8500_gpadc_probe(struct platform_device *pdev)
+10 −5
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@

static struct device *sysctrl_dev;

void ab8500_power_off(void)
static void ab8500_power_off(void)
{
	sigset_t old;
	sigset_t all;
@@ -104,7 +104,7 @@ void ab8500_restart(char mode, const char *cmd)

	plat = dev_get_platdata(sysctrl_dev->parent);
	pdata = plat->sysctrl;
	if (pdata->reboot_reason_code)
	if (pdata && pdata->reboot_reason_code)
		reason = pdata->reboot_reason_code(cmd);
	else
		pr_warn("[%s] No reboot reason set. Default reason %d\n",
@@ -188,14 +188,15 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)

	plat = dev_get_platdata(pdev->dev.parent);

	if (!(plat && plat->sysctrl))
	if (!plat)
		return -EINVAL;

	if (plat->pm_power_off)
	sysctrl_dev = &pdev->dev;

	if (!pm_power_off)
		pm_power_off = ab8500_power_off;

	pdata = plat->sysctrl;

	if (pdata) {
		int last, ret, i, j;

@@ -226,6 +227,10 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
static int ab8500_sysctrl_remove(struct platform_device *pdev)
{
	sysctrl_dev = NULL;

	if (pm_power_off == ab8500_power_off)
		pm_power_off = NULL;

	return 0;
}

Loading