Thread (8 messages) 8 messages, 3 authors, 2012-06-15
DORMANTno replies
Revisions (27)
  1. v0 [diff vs current]
  2. v0 [diff vs current]
  3. v0 [diff vs current]
  4. v0 [diff vs current]
  5. v0 current
  6. v1 [diff vs current]
  7. v1 [diff vs current]
  8. v1 [diff vs current]
  9. v1 [diff vs current]
  10. v1 [diff vs current]
  11. v1 [diff vs current]
  12. v1 [diff vs current]
  13. v1 [diff vs current]
  14. v2 [diff vs current]
  15. v2 [diff vs current]
  16. v2 [diff vs current]
  17. v2 [diff vs current]
  18. v3 [diff vs current]
  19. v3 [diff vs current]
  20. v3 [diff vs current]
  21. v3 [diff vs current]
  22. v4 [diff vs current]
  23. v4 [diff vs current]
  24. v5 [diff vs current]
  25. v5 [diff vs current]
  26. v6 [diff vs current]
  27. v7 [diff vs current]

[PATCH 1/3] mfd: support 88pm80x in 80x driver

From: Qiao Zhou <hidden>
Date: 2012-06-15 05:23:36

On 06/15/2012 02:43 AM, Mark Brown wrote:
On Thu, Jun 14, 2012 at 12:27:48PM +0000, Arnd Bergmann wrote:
quoted
On Wednesday 13 June 2012, Qiao Zhou wrote:
quoted
quoted
+static struct mfd_cell onkey_devs[] = {
+	{
+	 .name = "88pm80x-onkey",
+	 .num_resources = 1,
+	 .resources =&onkey_resources[0],
+	 .id = -1,
+	 },
+};
quoted
I wonder if it really makes sense to use the mfd_cell abstraction here, when each
array only contains a single device. Why not just use
platform_device_register_simple()?
mfd_cell does some other stuff like let you pass in bases for the various
resource ranges when you register which looks to be being used here.
quoted
quoted
+static irqreturn_t pm805_irq(int irq, void *data)
+{
+	struct pm80x_chip *chip = data;
+	struct pm80x_subchip *pm805_chip = chip->pm805_chip;
+	struct pm80x_irq_data *irq_data;
+	struct i2c_client *i2c;
+	int i, read_reg = -1, value = 0;
quoted
The functions for pm800 and pm805 look almost identical. Have you tried
consolidating them so you can use the same irqchip and code with different
init data structures?
Since you use regmap perhaps you can use regmap_irq and just convert
them into data?
Mark,

thanks for your suggestion, and would update accordingly.

-- 

Best Regards
Qiao
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help