Skip to content

Commit

Permalink
Merge tag 'mfd-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/lee/mfd

Pull MFD fixes from Lee Jones:
 - Avoid platform ID collision in da9052
 - Skip caching volatile registers in tps65218
 - Use correct address base in tps65218
 - Repair deadlock on suspend in rtsx_usb

* tag 'mfd-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
  mfd: rtsx_usb: Fix runtime PM deadlock
  mfd: tps65218: Make INT1 our status_base register
  mfd: tps65218: Make INT[12] and STATUS registers volatile
  mfd: da9052-core: Fix platform-device id collision
  • Loading branch information
Linus Torvalds committed Jan 21, 2015
2 parents b97f880 + b166010 commit 7c4bb81
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion drivers/mfd/da9052-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,8 @@ int da9052_device_init(struct da9052 *da9052, u8 chip_id)
return ret;
}

ret = mfd_add_devices(da9052->dev, -1, da9052_subdev_info,
ret = mfd_add_devices(da9052->dev, PLATFORM_DEVID_AUTO,
da9052_subdev_info,
ARRAY_SIZE(da9052_subdev_info), NULL, 0, NULL);
if (ret) {
dev_err(da9052->dev, "mfd_add_devices failed: %d\n", ret);
Expand Down
12 changes: 0 additions & 12 deletions drivers/mfd/rtsx_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,21 +681,9 @@ static void rtsx_usb_disconnect(struct usb_interface *intf)
#ifdef CONFIG_PM
static int rtsx_usb_suspend(struct usb_interface *intf, pm_message_t message)
{
struct rtsx_ucr *ucr =
(struct rtsx_ucr *)usb_get_intfdata(intf);

dev_dbg(&intf->dev, "%s called with pm message 0x%04x\n",
__func__, message.event);

/*
* Call to make sure LED is off during suspend to save more power.
* It is NOT a permanent state and could be turned on anytime later.
* Thus no need to call turn_on when resunming.
*/
mutex_lock(&ucr->dev_mutex);
rtsx_usb_turn_off_led(ucr);
mutex_unlock(&ucr->dev_mutex);

return 0;
}

Expand Down
12 changes: 12 additions & 0 deletions drivers/mfd/tps65218.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,21 @@ int tps65218_clear_bits(struct tps65218 *tps, unsigned int reg,
}
EXPORT_SYMBOL_GPL(tps65218_clear_bits);

static const struct regmap_range tps65218_yes_ranges[] = {
regmap_reg_range(TPS65218_REG_INT1, TPS65218_REG_INT2),
regmap_reg_range(TPS65218_REG_STATUS, TPS65218_REG_STATUS),
};

static const struct regmap_access_table tps65218_volatile_table = {
.yes_ranges = tps65218_yes_ranges,
.n_yes_ranges = ARRAY_SIZE(tps65218_yes_ranges),
};

static struct regmap_config tps65218_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.cache_type = REGCACHE_RBTREE,
.volatile_table = &tps65218_volatile_table,
};

static const struct regmap_irq tps65218_irqs[] = {
Expand Down Expand Up @@ -193,6 +204,7 @@ static struct regmap_irq_chip tps65218_irq_chip = {

.num_regs = 2,
.mask_base = TPS65218_REG_INT_MASK1,
.status_base = TPS65218_REG_INT1,
};

static const struct of_device_id of_tps65218_match_table[] = {
Expand Down

0 comments on commit 7c4bb81

Please sign in to comment.