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

Commit 7b11778f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes Iccf0daad,I4a494e98 into msm-next

* changes:
  spmi: pmic_arb: add a print in cleanup_irq
  regmap: Make regmap debugfs write optional
parents 79955d20 9b7caa51
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -36,3 +36,12 @@ config REGMAP_MMIO

config REGMAP_IRQ
	bool

config REGMAP_ALLOW_WRITE_DEBUGFS
	depends on REGMAP && DEBUG_FS
	bool "Allow REGMAP debugfs write"
	default n
	help
	  Say 'y' here to allow the regmap debugfs write. Regmap debugfs write
	  could be risky when accessing some essential hardwares, so it is not
	  recommended to enable this option on any production device.
+3 −4
Original line number Diff line number Diff line
@@ -269,8 +269,7 @@ static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf,
				   count, ppos);
}

#define REGMAP_ALLOW_WRITE_DEBUGFS
#ifdef REGMAP_ALLOW_WRITE_DEBUGFS
#ifdef CONFIG_REGMAP_ALLOW_WRITE_DEBUGFS
/*
 * This can be dangerous especially when we have clients such as
 * PMICs, therefore don't provide any real compile time configuration option
@@ -340,7 +339,7 @@ static ssize_t regmap_data_read_file(struct file *file, char __user *user_buf,
			new_count, ppos);
}

#ifdef REGMAP_ALLOW_WRITE_DEBUGFS
#ifdef CONFIG_REGMAP_ALLOW_WRITE_DEBUGFS
static ssize_t regmap_data_write_file(struct file *file,
				     const char __user *user_buf,
				     size_t count, loff_t *ppos)
@@ -633,7 +632,7 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
	if (map->max_register || regmap_readable(map, 0)) {
		umode_t registers_mode;

#if defined(REGMAP_ALLOW_WRITE_DEBUGFS)
#ifdef CONFIG_REGMAP_ALLOW_WRITE_DEBUGFS
		registers_mode = 0600;
#else
		registers_mode = 0400;
+2 −0
Original line number Diff line number Diff line
@@ -497,6 +497,8 @@ static void cleanup_irq(struct spmi_pmic_arb *pmic_arb, u16 apid, int id)
	u8 per = ppid & 0xFF;
	u8 irq_mask = BIT(id);

	dev_err_ratelimited(&pmic_arb->spmic->dev, "%s apid=%d sid=0x%x per=0x%x irq=%d\n",
			__func__, apid, sid, per, id);
	writel_relaxed(irq_mask, pmic_arb->ver_ops->irq_clear(pmic_arb, apid));

	if (pmic_arb_write_cmd(pmic_arb->spmic, SPMI_CMD_EXT_WRITEL, sid,