Re: [PATCH] mfd/ab8500: support AB9540 variant

From: Mark Brown
Date: Wed Feb 01 2012 - 09:49:26 EST


On Wed, Feb 01, 2012 at 03:42:59PM +0100, Linus Walleij wrote:

> For newer ASICs we solve it by not providing platform data
> and instead fall back to reading chip revision.

Given all that it sounds like it'd be more accurate to say that for old
chips we fall back on platform data - fall back sounds like it's a
failure mode but it seems like the opposite is true.

A more idiomatic way of doing this would be to register the device with
the appropriate name and then use driver data in the i2c_device_id to
pick the appropriate variant data up - this has the added bonus of
getting you a free device tree binding.

Attachment: signature.asc
Description: Digital signature